Laxkit
0.0.7.1
|
Classes | |
class | LaxInterfaces::anInterface |
A class for key and mouse interfaces acting on particular windows. More... | |
class | LaxInterfaces::ColorPatchData |
Cubic tensor product patch with colors defined at each vertex. More... | |
class | LaxInterfaces::ColorPatchInterface |
Interface for dealing with ColorPatchData objects. More... | |
class | LaxInterfaces::EllipseData |
Data class for EllipseInterface. More... | |
class | LaxInterfaces::EllipseInterface |
*** fix me!Interface for EllipseData objects. More... | |
class | LaxInterfaces::EngraverFillData |
class | LaxInterfaces::EngraverFillInterface |
Interface for dealing with EngraverFillData objects. More... | |
class | LaxInterfaces::FillStyle |
Store various characteristics of a fill. More... | |
class | LaxInterfaces::FreehandInterface |
Interface to create bezier or straight lines from freehand motion. More... | |
class | LaxInterfaces::GradientDataSpot |
GradientData keeps a stack of these. More... | |
class | LaxInterfaces::GradientData |
Handled by GradientInterface. More... | |
class | LaxInterfaces::GradientInterface |
Manipulates GradientData objects. More... | |
class | LaxInterfaces::ImagePatchData |
Cubic tensor product patch with an image as the color source. More... | |
class | LaxInterfaces::ImagePatchInterface |
Interface for dealing with ImagePatchData objects. More... | |
class | LaxInterfaces::LinesData |
Data class for LinesInterface. More... | |
class | LaxInterfaces::LinesInterface |
Interface for LinesData, just straight point to point lines. More... | |
class | LaxInterfaces::LineStyle |
Store various characteristics of a line. More... | |
class | LaxInterfaces::MeasureInterface |
Measure length, angle and area in various ways. More... | |
class | LaxInterfaces::ObjectInterface |
Allows selecting and moving around several objects all at once. More... | |
class | LaxInterfaces::PatchData |
Plain old ordinary cubic tensor product patches, the base for mesh gradients and some image warping. More... | |
class | LaxInterfaces::PatchInterface |
Class to deal with PatchData objects. More... | |
class | LaxInterfaces::Path |
Path contains only one path. More... | |
class | LaxInterfaces::PathsData |
Basically a stack of Path objects with extra fill rules. More... | |
class | LaxInterfaces::PathOperator |
Abstract base class of path operators. More... | |
class | LaxInterfaces::PathInterface |
The maintainer of all PathOperator classes. More... | |
class | LaxInterfaces::PointWarpData |
class | LaxInterfaces::PointWarpInterface |
Class to deal with PointWarpData objects. More... | |
class | LaxInterfaces::RectData |
Basic rectangular selection, data type for RectInterface. More... | |
class | LaxInterfaces::RectInterface |
Handles RectData or works directly on the matrix of any SomeData. More... | |
class | LaxInterfaces::ObjectContext |
Class to make searching for objects convenient and expandable in a ViewportWindow. More... |
Functions | |
virtual void | LaxInterfaces::ColorPatchData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context) |
virtual void | LaxInterfaces::EngraverFillData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context) |
virtual void | LaxInterfaces::GradientData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context) |
virtual void | LaxInterfaces::ImageData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context) |
virtual void | LaxInterfaces::ImagePatchData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context) |
virtual void | LaxInterfaces::PathsData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context) |
virtual void | LaxInterfaces::SomeData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context) |
I/O | |
virtual void | LaxInterfaces::PatchData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context) |
I/O | |
virtual void | LaxInterfaces::PointWarpData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context) |
The Laxkit defines a number of useful interfaces to aid in manipulating various kinds of visual data. They all ultimately derive from anInterface. ViewportWindow and ViewerWindow are the usual classes that incorporate the interfaces into somewhat easy to use, scrollable, resizable system. Application programmers will typically subclass those to meet their needs.
If an interface has primary==1, then when the left button is clicked down, then it is ok to work on other data of the same type, but not on data of different types. If clicking down on empty space, then the interface makes a new object. primary==1 is like using a creation tool, rather than a select tool.
If primary==0, then clicking on blank space usually will deselect the object. If there is another object under the mouse, then that object is made the current one.
anInterfaces can work with a ViewportWindow, which provides various aids to manipulating the interface's Displayer, and provides means to search for objects. Search information is held in ObjectContext objects. Any ObjectContext an anInterface gets from a ViewportWindow should be considered to be opaque. That is, its internals should not be accessed by an interface, even if it can. Furthermore, interfaces should not create and pass ObjectContext objects by itself. They should only pass ObjectContext objects it gets from the ViewportWindow back to the same ViewportWindow.
All the event functions in anInterface must return 0 if they use the event, and nonzero if they do not. This is used in ViewportWindow to propagate events to different interfaces.
The currently available interfaces that basically work include:
These interfaces exist, but they are horribly implemented and need a lot of work to update to the current way of doing things:
|
virtual |
Dump out an ImagePatchData.
Something like:
filename blah.jpg iwidth 100 iheight 100 matrix 1 0 0 1 0 0 xsize 4 ysize 4 points \ 1 2 3 4 5 6
Calls PatchData::dump_out(f,indent,0,context), then puts out filename, and the pixel dimensions of the image in filename. If what==-1, then output a pseudocode mockup of the format. Otherwise output the format as above.
Reimplemented from LaxInterfaces::PatchData.
References LaxInterfaces::ImagePatchData::filename, LaxInterfaces::ImagePatchData::iheight, LaxFiles::is_in_subdir(), LaxInterfaces::ImagePatchData::iwidth, and LaxFiles::relative_file().
Referenced by LaxInterfaces::ImagePatchData::SetImage().
|
virtual |
Default dump for an ImageData. The width and height are saved, but beware that the actual width and height of the thing at filename may have different dimensions. This helps compensate for broken images when source files are moved around: you still save the working dimensions. On a dump in, if the image exists, then the dimensions at time of load are used, rather than what was saved in the file.
Note that ImageData::image is not consulted for any values.
Dumps:
width 34 height 234 filename filename.jpg previewfile .filename-preview.jpg description "Blah blah blah"
width and height are the integer pixel dimensions of the image.
If previewfile is not an absolute path, then it is relative to filename.
If what==-1, then dump out a psuedocode mockup of what gets dumped. This makes it very easy for programs to keep track of their file formats, that is, when the programmers remember to update this code as change happens. Otherwise dumps out in indented data format as above.
Reimplemented from LaxInterfaces::SomeData.
References LaxFiles::dump_out_value(), LaxFiles::is_in_subdir(), LaxInterfaces::ImageData::previewflag, and LaxFiles::relative_file().
Referenced by LaxInterfaces::ImageInterface::LBDown().
|
virtual |
Dump out a ColorColorPatchData
Something like:
matrix 1 0 0 1 0 0 griddivisions 10 xsize 4 ysize 4 points \ 1 2 0 65535 65535 65535 3 4 65535 0 65535 65535 5 6 65535 65535 0 65535
If what==-1, then output a pseudocode mockup of the format. Otherwise output the format as above.
Reimplemented from LaxInterfaces::PatchData.
|
virtual |
Dump out an EngraverFillData.
Something like:
filename blah.jpg iwidth 100 iheight 100 matrix 1 0 0 1 0 0 xsize 4 ysize 4 points \ 1 2 3 4 5 6
Calls PatchData::dump_out(f,indent,0,context), then puts out filename, and the pixel dimensions of the image in filename. If what==-1, then output a pseudocode mockup of the format. Otherwise output the format as above.
Reimplemented from LaxInterfaces::PatchData.
References Laxkit::PtrStack< T >::e.
|
virtual |
Dump out a GradientData. Prints matrix, p, v, and the spots.
If what==-1, then dump out a psuedocode mockup of what gets dumped. This makes it very easy for programs to keep track of their file formats, that is, when the programmers remember to update this code as change happens. Otherwise dumps out in indented data format as described in dump_in_atts().
Reimplemented from LaxInterfaces::SomeData.
References LaxInterfaces::GradientDataSpot::dump_out().
Referenced by LaxInterfaces::GradientInterface::LBDown().
|
virtual |
Dump out a PointWarpData:
matrix 1 0 0 1 0 0 numx 4 numy 4 points \ 0 0 1.5 0 ...
If what==-1, then output a pseudocode mockup of the format. Otherwise output the format as above.
Reimplemented from LaxInterfaces::SomeData.
|
virtual |
Dump out a SomeData, assume f is open already. prepend indent number of spaces before each line.
outputs something like:
matrix 1 0 0 1 0 0 minx 0 maxx 1 miny 0 maxy 1 bboxstyle 0
Ignores what. Uses 0 for it.
Reimplemented in LaxInterfaces::PathsData, LaxInterfaces::PatchData, LaxInterfaces::PointWarpData, LaxInterfaces::GradientData, LaxInterfaces::EngraverFillData, LaxInterfaces::CaptionData, LaxInterfaces::ColorPatchData, LaxInterfaces::ImageData, and LaxInterfaces::ImagePatchData.
|
virtual |
Dump out a PatchData:
matrix 1 0 0 1 0 0 griddivisions 10 xsize 4 ysize 4 points \ 0 0 1.5 0 ...
If what==-1, then output a pseudocode mockup of the format. Otherwise output the format as above.
Reimplemented from LaxInterfaces::SomeData.
Reimplemented in LaxInterfaces::EngraverFillData, LaxInterfaces::ColorPatchData, and LaxInterfaces::ImagePatchData.
|
virtual |
Dump out a PathsData, assume f is open already. prepend indent number of spaces before each line.
Something like:
matrix 1 0 0 1 0 0 defaultlinestyle ... style 2 path ...
Ignores what. Uses 0 for it.
Reimplemented from LaxInterfaces::SomeData.
References LaxInterfaces::FillStyle::dump_out(), LaxInterfaces::LineStyle::dump_out(), LaxInterfaces::Path::dump_out(), Laxkit::PtrStack< T >::e, LaxInterfaces::PathsData::fillstyle, LaxInterfaces::PathsData::linestyle, and Laxkit::PtrStack< T >::n.