Laxkit  0.0.7.1

General Laxkit To Dos

gotta make a compiler aid:
 lax-config –cppflags –ldflags –libs –ldstaticflags –version –help –use* –cpp
            –make-laxrc <– dump a generic laxrc to stdout with lots of comments to say how to modify it.
Ultimately need to have pictures of the various widgets in the docs..
TODO RIGHT NOW:
fluid-esque code generation tool
start thinking about portability, particularly to osx, make a non-gnu file
 to provide gnu things like getline() and get_current_dir_name() that are not provided on,
 for instance, bsd-ish osx..
—GRAPHICS—
this could be part of a more comprehensive system that allows hotswapping the
whole graphics backend. The required bits are:
 font search and selection
 text out
 text out at angle
 text out by affine transform 
 line segments
 clear window
 polylines, optionally filled
 circles/ellipses at any angle
 Get/Set line width, color, dash, join, butt
 Get/Set drawing function: solid, or xor..
 image control (this is already abstracted enough):
  definitely loading, perhaps saving
  copy image
  blit image with additional transparency at any angle, by an arbitrary affine matrix
  get a generic buffer from an image, and set an image from a generic buffer
 don't think core lax uses more than that.
   dodads, like bevels, drawing triangle things like eject button etc. 
   could depend on the above..
This covers all the basic Laxkit controls. more specific drawing abilities are
wrapped in Displayer objects. Currently, the only implemented Displayer is based on
pure Xlib functions. there could be a CairoDisplayer, AntigrainDisplayer,
Imlib2Displayer, ImagemagickDisplayer, etc.
TO ENHANCE:
ini file to attribute converter
Could put all the pure math stuff in LaxMath namespace?
 this includes transformmath, vectors, and interfaces/bezier math
Could put strmanip.cc/.h in LaxStr namespace.
FEATURE WISHING:
 use graphicsmagick/fontconfig/Xft/freetype/Xrender, how about pango? antigrain?
 gl support
 auto double buffering?
 thread safety
 (in progress) drag n drop
–Thoughts on themes–
If more than just simple colors were to be changed, what would be required? seems
like each refresh of every function would have to be externally redefinable, which
would suck.. maybe just stick to simple color changes..
Otherwise would have to have Laxkit namespace classes use a similar objectfactory
setup as LaxInterfaces, and the theme modifies the factory to return subclasses
of all the core classes. Bleah!
Alternately, refreshing functions would need to isolate relevant data to pass to arbitrary functions.
Probably more trouble than it's worth.
—SHORTCUTS—
see also shortcut.cc (which is a work in progress)
from shortcut.cc:
 A window would define a list of actions, and store a list of shortcuts pointing to those actions.
 In the window's CharInput(ch,state) function, the action number is found from it's (redefinable) shortcuts
 and something like thewindow->action(shortcut->action) is called.
 The default shortcuts can be overridden in rc files such as the main ~/.lax/laxrc. They
 can be loaded and saved via the LaxFiles::Attribute sort of format.
 ***need mechanism for chaining key shortcuts:
 For instance, defining a shortcut that is shift-control-'a' followed by "chain", it is
 listed like this: — though chaining makes the input that much more complicated requires window
 remembering what's been pressed. or could lump yet ANOther chore on anXApp, which is to build up 
 the key shortcut based on the shortcut list stored by the window. that would mean restructuring
 anXWindow, since it is there that Xlib key codes are translated into keys.. that has to change
 anyway in conversion to utf8......
—WIDGET TODO—
number sliders, like Num: 255 [———-*—]
SliderInputPopup?== list to select from, or type in choice, remember last few typed in choices: 2 lists...
table frames
multirow/col frames
fuller print dialog
font dialog
detail selector/record selector
tree selector
color selection dialog
CLEAN UP:
FileDialog and FilePreviewer
no zoom, viewerwindow but with integers (ScrolledWindow)
SplitWindow
Focus handling, especially for popups REALLY SUCKS right now
MenuSelector and friends
BoxArrange/RowFrame and friends
put in whattypes for all classes
(in process) perhaps redo the whole events setup. relying on X atoms leaves quite a lot of
  residue in the X server..
when a child window is destroyed, sometimes the parent doesn't know it.
  perhaps there could be a built in procedure to keep track of that..
  related:****** popup up dialogs and other controls that have owners, if the owner is destroyed,
    then the window is no longer valid!

Specific To Dos


Interfaces Todo

transformers, so patch and paths can select many nodes, apply a transformer object
 shift the nodes, or attach transformer(s) to an image, ...
implement all the DumpUtility funtions for ALL data classes and interfaces!!! Particularly when what==-1,
then the dump_out() should dump out a psuedocode human readable mock up of what file
output for that class looks like. It should be documented enough so that someone
reading it can get a good idea of how to write code for that segment of the file.
put in a what in the dump_in_*, particularly for such like: PathsData::dump_in(FILE*, LAX_SVG)
It might be useful to separate the BlahData from BlahInterface in the *.cc and *.h
files. This enables processing all the data without the need of the windowing system.
some interfaces still don't have duplicate()
port ImagePatchInterface into the gimp to be used like the other
 rotate/perspective/etc transforms, because it is a feature that I CONSTANTLY ache for
 in the gimp!!!
perhaps have an Interface<template> : public InterfaceWithDp to knock out the basics easily..

anXApp todos

  TODO:
 *** VITAL!! improve focus handling, which currently REALLY SUCKS!
 ***  if leave a window, then enter again, put focus on what was focused last
 ***  focus handling generally pretty bad.
 ***  AFTER_CLICK_FOCUS???
 *** shortcuts, an event catch-all, if events propagate past topwindows.
 *** cooperate somewhat with various freedesktop.org guidelines
 ***    and/or import and export to how those guidelines say to keep track of things.
 *** readup window classes and imp as per said guidelines
 *** support for joysticks, wiimotes, tuio, osc, other
 *** gl, fontconfig/freetype support?
 *** multiple screen support
 *** be able to ensure some degree of thread safety
 *** WM_ICON_NAME, XGetIconSizes, ...
 *** WM_ICON_SIZE <- usually set by window manager?
 *** urgent hint in XWMHints??
 *** think some more about fltk's callbacks and gtkmm signal connecting... could implement something
 sort of similar (see ShortCut/action stuff shortcut.cc)
 
Member appendnstr (char *&dest, const char *src, int n)
*** question: is *&dest allowed to be NULL?
Group attributefileformat

****** the IntAttribute types of functions use functions like strtol, which will stop parsing at first character that is invalid for the conversion, but for a value to be truly converted, "34" is ok but "34g" is not a pure integer, for instance. there is no default check for things like that. It should be an option.

dump_in_from_buffer(const char *buf) and dump_out_to_buffer(char *buf) ?

update this!!!

***need some way to automatically set how many spaces a tab is equal to. it is currently 1, which is irritating when your editor automatically puts in a tab rather than spaces..

File bezutils.cc
should probably look into lib2geom
File boxarrange.cc
*** implement all the LRTB, ...
Group colors
this must be flexible enough to allow sets of colors (like the X11 color names), spot colors that cannot be scaled, Registration color, None color, and knockout, which is like an erase as opposed to simply being paper color...
Class EventFilter
perhaps key chaining can be done with a little popup up in the corner of the affected window? that would greatly relieve the particular window from having a special key chain mode.. it would just respond to a shortcut-command message..
Page How to use the Interfaces
At some point it might be prudent to separate rendering from the windowing. There would then be 3 components per interface: the object itself, the renderer, and the interface.
Member increment_file (const char *file)
should have "blah001.jpg"->"blah002.jpg", and perhaps optionally allow "blah.tar.gz" -> "blah2.tar.gz"
Group interfaces

*** BezInterface has many useful features that I haven't ported over to BezPathOperator yet. The others (including BezInterface) are a bit old, and somewhat broken with how interfaces are used currently. Same goes for LinesInterface

should there should be interfaces for all postscript language level 3 / pdf gradient types. linear, radial, and tensor/coons gradients are implemented more or less, but not the triangle strip and triangle lattice gradients.. nor the type 1 generic function gradients..

The bez patches are currently more like a bezier patch lattice, rather than how Postscript LL3 does it, which is a freeform bezier patch setup. Postscript has triangle lattices, but not bez patch lattices!! What a foolish oversight!! should be able to do the standard ps way in addition to the lattice way.

*** edit interface docs, do a better how to (see lax/interfaces/interfaces.txt)

Member intersection (flatline l1, flatline l2, flatpoint &p)
not threadsafe!!
Member lax_basename (const char *path)
maybe should move lax_basename(), lax_dirname(), and increment_file() to fileutils? they only in strmanip because they don't really need the filesystem to operate.
Class LaxFiles::Attribute

*** make sure that line is being freed where necessary...

most of the dump_in_* and dump_out_* could be put in standalone functions which would be more useful

Member LaxFiles::Attribute::dump_in (const char *filename, Attribute *defines=NULL)

*** this function is basically unimplemented.. just opens file, calls the other dump_in. need to implement the defines thingy

*** doesn't do a whole lot of sanity checking on names

*** when dumping in, it is sometimes useful to preserve what the position in the file at which the attribute is written. this would require an extra long variable in Attribute.. For instance for decent error checking, one wants to know where the error occured, but one might still want the ease of dumping in the whole file to an Attribute before parsing values..

Member LaxFiles::Attribute::dump_in (FILE *f, int Indent, Attribute **stopatsub=NULL)
make name==NULL (in file as "") and value=something like "1234\naeuo" behave in some sort of reasonable way, like have name become "" or ~ or something..
Member LaxFiles::Attribute::dump_out_full (FILE *f, int Indent)
make name==NULL and value=something like "1234\naeuo" behave in some sort of reasonable way, like have name become "" or ~ or something.. ... null name gets "", but problems still if name has whitespace..
Member LaxFiles::AttributeToXML (Attribute *att, char *&appendtothis, char **error_ret)
implement me!
Member LaxFiles::AttributeToXMLFile (FILE *f, Attribute *att, int indent)

perhaps have a niceness parameter, so to lay out XML attributes inside a tag on separate lines: <blah first="1" second="2">

*** this needs a lot of work for escaped quoted stuff....

Member LaxFiles::check_dirs (const char *dirs, char make_too)

*** on failure, should remove newly created directories... when doing that, should check that those new dirs are still empty?

*** always follows links, maybe should have some sanity check for that..

Member LaxFiles::CSSFileToAttribute (const char *cssfile, Attribute *att)
*** implement me!!
Member LaxFiles::cut_comment (char *str, const char *cm, char quote)

*** this could go in strmanip

there appears to be a snag when using dos files, the '\r' does not appear to be recognized as whitespace by isspace()....

Member LaxFiles::dump_out_escaped (FILE *f, const char *str, int n)

*** quote on escaped, quote on any ws, quote on initial or trailing ws, never quote, quote on escaped or ws, always quote

*** Currently assumes no newlines... could substitute '\n' for them...

Member LaxFiles::dump_out_value (FILE *f, int indent, const char *value, int noquotes)
note that this will almost always quote value, and it probably shouldn't for simple values
Member LaxFiles::DumpUtility::dump_in_atts (Attribute *att, int flag, Laxkit::anObject *loadcontext)=0
in future might have a flag somehow to remove atts that are processed (flag=1).. this will have to play nice with dump_in().
Member LaxFiles::DumpUtility::dump_out_atts (Attribute *att, int what, Laxkit::anObject *savecontext)
what==-1 should mean write out a definition snippet that represents what attributes can be passed in to this object. this would make it a snap to produce the Attribute equivalent of dtd information..
Member LaxFiles::get_bookmarks (const char *file, const char *filetype)
need to lock files on opening
Member LaxFiles::IntAttribute (const char *v, int *i, char **endptr)
warning, this will parse "200jjj" as 200, and return 1.
Member LaxFiles::IntListAttribute (const char *v, int **i, int *n_ret, char **endptr)
*** need to do some testing on this
Member LaxFiles::is_good_filename (const char *filename)
this could be broken down into is_good_path() and is_good_basename();
Member LaxFiles::make_filename_base (const char *f)
have something like "blah##-##.ext" -> "blah%02d-%02d.ext" and maybe "blah##\###" -> "blah%02d%03d"? pass in option to say how many fields there should be, and how many there ended up being
Member LaxFiles::one_of_them (const char *str, const char **list)
move this to strmanip.h?
Member LaxFiles::QuotedAttribute (const char *v, char **endptr)

****** on error, what happens to endptr?

**** all of v is copied right at the beginning, wasting much memory, should just crawl along v, copying chars to a smaller buf, reallocating that if necessary?

Member LaxFiles::readable_file (const char *filename, FILE **ff)

does not currently check sanity of file when opening.

add a return error string

Member LaxFiles::recently_used (const char *mimetype, const char *group, int includewhat)

support the other commonly used recent file: ~/.recently-used.xbel

not a whole lot of error checking in here yet.

Member LaxFiles::touch_recently_used (const char *file, const char *mime, const char *group, const char *timestamp)

there could be more error checking in here. If recent file spec changes, could well break this.

support the other commonly used recent file: ~/.recently-used.xbel

Member LaxFiles::TransformAttribute (const char *v, double *m, char **endptr)
*** implement me!
Member LaxFiles::XMLChunkToAttribute (Attribute *att, FILE *f, const char **stand_alone_tag_list)

this just reads in the whole file to memory then parses it, which might be rather inefficient, but it is easy to code..

must interpret !DOCTYPE and ?xml...? correctly...

Member LaxFiles::XMLChunkToAttribute (Attribute *att, const char *buf, long n, long *C, const char *until, const char **stand_alone_tag_list)

UNLESS there are only non-tagged characters between the tags. In that case, the text becomes the value of the given tag.

WARNING!! something like in html where img, br, hr, etc do not have closing tags are not dealt with properly... need to flesh out stand_alone_tag_list

this should be thoroughly gone over by someone who actually knows something about XML in current state is rather sloppy, and is just barely enough to be useful in most cases I've dealt with recently...

should have case sensitive switch

should have case sensitive switch

should have case sensitive switch

Member LaxFiles::XMLFileToAttribute (Attribute *att, const char *file, const char **stand_alone_tag_list)
WARNING!! something like in html where img, br, hr, etc do not have closing tags are not dealt with properly... need to implement stand_alone_tag_list.. it would be really clever to be able to figure out that list from a dtd..
Group laximages
In the future, will probably want some kind of load_image_to_buffer, but that means I have to understand color management much more thoroughly.
Member LaxInterfaces::anInterface::anInterface (anInterface *nowner, int nid)
*** this isn't so hot, maybe do some check to ensure that owner->child points here?
Member LaxInterfaces::CaptionData::FindBBox ()
*** must be able to find the actual extent of the text! right now, the interface must handle bbox finding.
Class LaxInterfaces::CaptionInterface
this could also be used for little sticky notes in the viewport, these would be text blocks that are not transformed with the viewport's matrix..
Member LaxInterfaces::CaptionInterface::newData ()
need some flag somewhere to auto flip vertically (for +y is up rather than down)
Member LaxInterfaces::CaptionInterface::Refresh ()
should work this to not need imlib, allowing a redefinable backend to render the text.
Class LaxInterfaces::ColorPatchData

*** this must be expanded to enable use of somewhat user definable functions for color determination, (see postscript spec for more). also should implement the coons patch as a special case of this.. the coons patch would simply interpolate the inner control points from the outer.

*** the implementation here is rather a mess

Member LaxInterfaces::ColorPatchData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context)
*** should allow floating point representation of colors in range [0.0, 0.1] and specification that colors are 8bit, or other bit depth, like have field "colordepth 16|8|float"
Member LaxInterfaces::ColorPatchData::subdivide (int r, double rt, int c, double ct)
*** clean me up! simplify me! there is probably an efficient way to extract bits of this and the other subdivide() to shorten the code...
Member LaxInterfaces::ColorPatchInterface::patchpoint (PatchRenderContext *context, double s1, double t1, double s2, double t2)
**** mondo problems with this one, keeps recursing forever
Member LaxInterfaces::ColorPatchInterface::patchpoint2 (PatchRenderContext *context)
optimize this a la imagepatchinterface....
Member LaxInterfaces::ColorPatchInterface::sendcolor (Laxkit::ScreenColor *col)
bit of a hack here.
Class LaxInterfaces::Coordinate
perhaps make this ref counting?
Member LaxInterfaces::CoordinateToSvg (Coordinate *points)
if the list is malformed, such as by having other than 2 control points between vertices, then this currently ignores extras...
Class LaxInterfaces::EllipseInterface

*** totally broken, needs some serious rewrite..

*** must be able to fill also?

Member LaxInterfaces::EllipseInterface::InterfaceOn ()
*** should push the RectInterface onto the viewport interfaces stack...
Member LaxInterfaces::EllipseInterface::MouseMove (int x, int y, unsigned int state)
*** focus move broken!
Member LaxInterfaces::EllipseInterface::scan (int x, int y)
*** doesn't pick wild,start,end, picks closest within a distance
Member LaxInterfaces::EllipseInterface::UseThis (Laxkit::anObject *nobj, unsigned int mask=0)
**** returns 1 with LineStyle, but does not take over it.. is that ok??
Member LaxInterfaces::EngraverFillData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context)
*** assumes data is from filename. It shouldn't. It might be random buffer information.
Class LaxInterfaces::FreehandInterface

***Currently, this sucks. Should figure out how Sodipodi/inkscape does it.

*** make closed when final point is close to first point

Member LaxInterfaces::FreehandInterface::MouseMove (int x, int y, unsigned int state, const Laxkit::LaxMouse *d)
*** this isn't very sophisticated, for elegance, should use some kind of bez curve fitting to cut down on unnecessary points should use a timer so stopping makes sharp corners and closer spaced points?
Member LaxInterfaces::FreehandInterface::Refresh ()
*** this is really cheezy, as it just copies bez->Refresh()
Member LaxInterfaces::getPolyT (double *N, double n, double t0)
this could be optimized a little
Class LaxInterfaces::GradientData

*** move the change between radial and linear to here from GradientInterface? or separate linear from radial.. editing radial is really obnoxious right now..

*** perhaps have the colors array be potentially read only (or make new on change), and be able to be stored elsewhere, thus be able to read stand alone gradient files....

*** care must be taken that final t != initial t (esp is ShiftPoint())!!

it is assumed here that p1<p2, maybe should make that explicit somehow?

Member LaxInterfaces::GradientData::renderToBuffer (unsigned char *buffer, int bufw, int bufh, int bufstride, int bufdepth, int bufchannels)

must rethink about rendering to buffers! must be able to handle 16 bit per channel buffers, but to be effective, this really means being able to handle arbitrary transformations, which in turn says what actually has to be rendered...

*** rendering radial gradients VERY inefficient here..

radial draw assumes argb

Member LaxInterfaces::GradientData::WhatColor (double t, double *col)
warning: assumes argb for now... ultimately, should be arranged according to the color system of the colors
Member LaxInterfaces::GradientDataSpot::dump_in (FILE *f, int indent, Laxkit::anObject *context, LaxFiles::Attribute **Att=NULL)
*** allow import of Gimp, Inkscape/svg, scribus gradients
Member LaxInterfaces::GradientDataSpot::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context)
could have rgba vs. rgba16
Class LaxInterfaces::GradientInterface
figure out how to incorporate color mapping functions..
Member LaxInterfaces::GradientInterface::drawRadial ()
this could be rather a lot smarter... like by finding how many XPoints to generate based on the radius of the given circle...
Member LaxInterfaces::GradientInterface::LBDown (int x, int y, unsigned int state, int count, const Laxkit::LaxMouse *d)
*** shift-click near an already selected but perhaps obscured point should not select the point that is obscuring it instead
Member LaxInterfaces::GradientInterface::Refresh ()
the control points should be drawn differently, p1 and p2 should be little triangles that point to each other, and r1 and r2 should point to each other.
Member LaxInterfaces::GradientInterface::SelectPoint (int c)
could have state passed in...
Member LaxInterfaces::GradientInterface::sendcolor (Laxkit::ScreenColor *col)
bit of a hack here.
Class LaxInterfaces::ImageData

In addition to have filename ande previewimage, perhaps make allowances for a transformedImageCache to facilitate use of ImagePatchData, for instance..... this is relevant because the ImageInterface has lots of drawing code, and it is easier to use a temp ImageData than an ImagePatchInterface, for instance, figuring out how to draw it itself?

should probably have an option for deferred loading? (not needed if using imlib, which basically does that automatically)

have flag: Don't display image|Use original|Use preview?

Member LaxInterfaces::ImageData::Flip (int horiz)
perhaps this should be in SomeData, since it is not dependent on content
Member LaxInterfaces::ImageData::SetImage (Laxkit::LaxImage *newimage)
*** implement fit in here too
Member LaxInterfaces::ImageData::UsePreview (const char *npreview, int maxpx=0, int maxpy=0, char del=0)
Check that this works as intended.
Member LaxInterfaces::ImageInterface::duplicate (anInterface *dup)
dup max_preview dims, and make it one dim, not x and y?
Member LaxInterfaces::ImageInterface::newData ()
need some flag somewhere to auto flip vertically (for +y is up rather than down)
Member LaxInterfaces::ImageInterface::Refresh ()
**** must have check for very expanded images to only draw the section of the image that is actually onscreen, rather than massive image, which nearly freezes X
Member LaxInterfaces::ImageInterface::runImageDialog ()

after laxkit event mechanism gets rewritten, the return event would get sent back to this ImageInterface instance, but right now, curwindow has to somehow relay the event to the object in question.

*** at some point it might be worth laxkit's while to have a fairly abstracted general object factory, something to be able to say newObject("ImageDialog", (anObject that wants it), other config info)

Class LaxInterfaces::ImagePatchData
*** should have option to offset the color data within the patch!!!
Member LaxInterfaces::ImagePatchData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context)
*** assumes data is from filename. It shouldn't. It might be random buffer information.
Member LaxInterfaces::ImagePatchData::im [6]
*** implement me!!! also implement auto expand patch to include areas off the edges
Class LaxInterfaces::ImagePatchInterface
***when inserting new image, should have option to preserve the scale, so if aspect of old image was 2, and new image is 1, then do the same for the aspect of the patch as a whole, or have the image space map to a subset of the patch space, rather than always [0..1]
Member LaxInterfaces::ImagePatchInterface::drawpatch (int roff, int coff)
*** when there is no image should do something clever to indicate there is none, like drawing a bezier X across the patch.
Member LaxInterfaces::ImagePatchInterface::patchpoint (PatchRenderContext *context, double s0, double ds, double t0, double dt, int n)
*** optimize this baby! If going beyond resolution of what is in the color source, should be able back up and draw larger rect...
Member LaxInterfaces::ImagePatchInterface::runImageDialog ()
*** after laxkit event mechanism gets rewritten, the return event would get sent back to this ImageInterface instance, but right now, curwindow has to somehow relay the event to the object in question.
Class LaxInterfaces::LinesInterface
this is really old code and needs a good going over
Member LaxInterfaces::LinesInterface::UseThis (Laxkit::anObject *newdata, unsigned int mask=0)
does viewport->NewData(newdata).. maybe newdata exists in it already?
Class LaxInterfaces::LineStyle
int width; *** including invisible vs. hairline (==0)
Member LaxInterfaces::MeasureInterface::LBDown (int x, int y, unsigned int state, int count)
*** shift-click near an already selected but perhaps obscured point should not select the point that is obscuring it instead
Class LaxInterfaces::ObjectInterface
********* must have mechanism to get viewport events like layer up, home, end, etc, to affect all in selection!!
Member LaxInterfaces::ObjectInterface::GrabSelection (unsigned int state)

*** imp me with something more useful!!

have flag for select inrect or touchingrect

Member LaxInterfaces::ObjectInterface::LBDown (int x, int y, unsigned int state, int count, const Laxkit::LaxMouse *d)
Double click ought to switch to the objects proper tool.
Member LaxInterfaces::ObjectInterface::MouseMove (int x, int y, unsigned int state, const Laxkit::LaxMouse *d)
*** preserve aspect on a shift-resize
Member LaxInterfaces::PatchData::FindBBox ()
***this currently only does bounds for control points
Member LaxInterfaces::PatchData::inSubPatch (flatpoint p, int *r_ret, int *c_ret, double *t_ret, double *s_ret, double d)
*** could have inSubPatchBBox, to more easily search for point over a control point
Member LaxInterfaces::PatchData::patchpoint (PatchRenderContext *context, double s0, double ds, double t0, double dt, int n)
*** optimize this baby! If going beyond resolution of what is in the color source, should be able to back up and draw larger rect...
Member LaxInterfaces::PatchData::pointin (flatpoint pp, int pin=1)
should do actual bounds checking, not bounding box
Member LaxInterfaces::PatchData::renderToBuffer (unsigned char *buffer, int bufw, int bufh, int bufstride, int bufdepth, int bufchannels)
*** this is EXTREMELY innefficient
Member LaxInterfaces::PatchData::rpatchpoint (PatchRenderContext *context, flatpoint ul, flatpoint ur, flatpoint ll, flatpoint lr, double s1, double t1, double s2, double t2, int which)
*** this needs some serious optimizing. it is currently in the HEINOUS HACK stage right now..
Member LaxInterfaces::PatchData::subdivide (int r, double rt, int c, double ct)
*** clean me up! simplify me! there is probably an efficient way to extract bits of this and the other subdivide() to shorten the code...
Member LaxInterfaces::PatchData::zap ()
generally for somedatas, perhaps shouldn't really FindBBox() all the time, but instead do it on a check for modified, so as to not find bbox at every change?
Class LaxInterfaces::PatchInterface

*** add warping controls, such as control how to warp to circle, 3x3 matrix warp. maybe add some kind of generic TransformInterface to allow skewing,flipping of selected points

*** This does not implement the free form patch setup found in Postscript. that functionality might go in a separate class, as the needs are a little too different perhaps.

Member LaxInterfaces::PatchInterface::CharInput (unsigned int ch, const char *buffer, int len, unsigned int state, const Laxkit::LaxKeyboard *d)

*** l/r/u/d to shift selected points: plain-move rolls curpoints, shift-move adds to curpoints, control-move rolls without wraparound

whichcontrols or data->controls?

Member LaxInterfaces::PatchInterface::drawControlPoints ()
in the future someday, might be useful to only show control points for "active" subpatches, or when shift-hovering
Member LaxInterfaces::PatchInterface::MouseMove (int x, int y, unsigned int state, const Laxkit::LaxMouse *d)
revamp controls: plain click in, not on point, be like image
Member LaxInterfaces::PatchInterface::Refresh ()
*** maybe should break off drawing of various decorations to other functions, so for instance, the colorpatch can draw controls as little color bubbles, which is much more useful when in "outline" mode, if that ever gets implemented
Member LaxInterfaces::Path::PointAlongPath (double t, int tisdistance, flatpoint *point, flatpoint *tangent)

be able to wind around the path if continuous, or go backwards (for negative t)

must implement find tangent at clamped endpoints

*** note that if you have a loop of null points, and you are going along based on distance, than this will not break!!

Member LaxInterfaces::Path::Reverse ()
*** this ignores pathop ownership!
Member LaxInterfaces::Path::t_to_distance (double t, int *err)
If tt<0 this fails... it shouldn't!!
Class LaxInterfaces::PathInterface

PathInterface should be able to draw single Path objects, not just PathsData?

*** unknown PathOperators should be marked with a question mark at middle of path

*** MUST make sure that PathsData/Path heads are all vertices. That makes dealing with breakpoints easier

*** undo is very important for path editing!!

*** must incorporate shift-move on grid lines, angles on 0/90/45/30/60/custom, etc.

*** operations like make circle, arrange, flip, etc?

*** constrain x/y

Member LaxInterfaces::PathInterface::MakeCircle ()
need to weed out those points that have segment controls
Member LaxInterfaces::PathInterface::MouseMove (int x, int y, unsigned int state, const Laxkit::LaxMouse *mouse)
If you click on the middle of a straight line segment, there should be an option to move that line in direction perpendicular to itself, but keep adjacent (straight) line segments in same place, just adjust intersection with the moved line..
Member LaxInterfaces::PathInterface::Refresh ()
need mechanism to only draw what's necessary
Member LaxInterfaces::PathInterface::scannear (Coordinate *p, char u, double radius=5)
**** not yet implemented!
Member LaxInterfaces::PathOperator::getInterface (Laxkit::Displayer *dp, PathsData *data)=0
*** describe requirements of any interface returned here!!
Member LaxInterfaces::PathOperator::newPoint (flatpoint p)=0
*** also return which point should be currently selected!
Member LaxInterfaces::PathsData::dump_out (FILE *f, int indent, int what, Laxkit::anObject *context)
Make this access the basepathops in PathInterface to dump out the right owner info... right now, not calling any dump_out in Path or in Coordinate..
Member LaxInterfaces::PointWarpData::FindBBox ()
***this currently only does bounds for control points
Member LaxInterfaces::PointWarpData::subdivide (int r, double rt, int c, double ct)
*** clean me up! simplify me! there is probably an efficient way to extract bits of this and the other subdivide() to shorten the code...
Member LaxInterfaces::PointWarpInterface::MouseMove (int x, int y, unsigned int state, const Laxkit::LaxMouse *d)
revamp controls: plain click in, not on point, be like image
Member LaxInterfaces::PointWarpInterface::Refresh ()
*** maybe should break off drawing of various decorations to other functions, so for instance, the colorpatch can draw controls as little color bubbles, which is much more useful when in "outline" mode, if that ever gets implemented
Member LaxInterfaces::RectData::~RectData ()
decide whether to even have a linestyle in here.
Class LaxInterfaces::RectInterface

********* there appears to be a bit of memory corruption somewhere. frequently, data->griddivisions gets a crazy value...

*** update docs here!

*** differentiate move preserve aspect, and move with aspect==1 (as square) ***draw only whats necessary ***general debug, ISSQUARE *** a style to allow movement only, not resize, except on cntl??? VISIBLECENTER still allows a center for rotations if center is on a control point, be able to sequentially select point(s) beneath

*** should probably have a style where you just section off a plain, non rotated rectangle with no control points indicated. like for cropping

*** need mode to distinguish between modifying the min/max bounds, and modifying the matrix. When the matrix is adjusted so that w==0 or h==0, there are special problems to check for!! causes matrix to be degenerate...

Member LaxInterfaces::RectInterface::MouseMove (int x, int y, unsigned int state, const Laxkit::LaxMouse *d)
*** preserve aspect on a shift-resize
Member LaxInterfaces::RectInterface::UseThis (Laxkit::anObject *newdata, unsigned int)
*** figure out how this jives with viewport window, especially when this is working on the same data that another interface is working on.. often this will be a child of another interface...
Member LaxInterfaces::renderTriangleToBuffer (unsigned char *buf, int bw, int bh, flatpoint p1, flatpoint p2, flatpoint p3, ScreenColor *col)
implement me!
Class LaxInterfaces::SomeData
***???make scalex(),scaley(),angle(),shear(),translatex(),translatey()? that would allow objects to respond when a change in the transformation takes place. There is only limited support for that kind of thing now: it can respond when single elements of the matrix are modified via m(int,double).
Member LaxInterfaces::SomeData::fitto (double *boxm, DoubleBBox *box, double alignx, double aligny, int whentoscale=2)
***this should maybe be fitto_aligned(), and a fitto() should be shifting and scaling so that this fits in the transformed box, which is also useful sometimes..
Member LaxInterfaces::SomeData::renderToBuffer (unsigned char *buffer, int bufw, int bufh, int bufstride, int bufdepth, int bufchannels)
perhaps create a version where one may apply a transform before writing to buffer, then blend onto it? ...maybe not, better off using some kind of Displayer for that
Member LaxInterfaces::SvgToCoordinate (const char *d, int how, char **endptr, int *totalpoints)

*** right now how&3 bits are ignored..

*** if d doesn't start with a move, what is the spec'd default starting point?? right now, failure results if not starting with a move

Class LaxInterfaces::ViewerWindow

It would be nice to have the scrollers/rulers/other in some sort of separate container, independent of the interface system... ScrolledWindow just has scrollers, not rulers.

rulers should always extend over whole viewport. Scrollers don't really have to.

have AddToTop/Bottom(other window, etc), AddToLeft/Right, which would sqeeze in other little windows where the scrollers are.

might be useful to have function to change the viewport at any time.

Member LaxInterfaces::ViewerWindow::CharInput (unsigned int ch, const char *buffer, int len, unsigned int state, const Laxkit::LaxKeyboard *d)
what about: +^'t' toggle lazy tool (whether the tool should stay same if click on object of another type)
Member LaxInterfaces::ViewerWindow::init ()
*** app->addwindow(viewport) is called here, which might be a little silly.
Member LaxInterfaces::ViewerWindow::SetRealUnits ()
**** IMPLEMENT ME!! should somehow use a syncwithscreen option in RulerWindow this is troublesome because the values returned by X are not very reliable
Class LaxInterfaces::ViewportWindow

must have some mechanism to notify anyone who wants to know where the mouse is, like mouse coordinate displays...***-> incorporate PanController that uses doubles?

the zoom handles on scrollers propagate shearing errors.. need to make a double scroller or something.

Member LaxInterfaces::ViewportWindow::ChangeObject (ObjectContext *oc, int switchtool)
*** need mechanism to pass the LBDown grab to the object's interface.. This function is most often called when interfaces cannot find objects of their own to work on on an LBDown.
Member LaxInterfaces::ViewportWindow::FindObject (int x, int y, const char *dtype, SomeData *exclude, int start, ObjectContext **oc)
*** this needs a little more clarification...
Member LaxInterfaces::ViewportWindow::FindObjects (Laxkit::DoubleBBox *box, char real, char ascurobj, SomeData ***data_ret, ObjectContext ***c_ret)
need flag for IN box or just TOUCHING box
Member LaxInterfaces::ViewportWindow::LBDown (int x, int y, unsigned int state, int count, const Laxkit::LaxMouse *d)
*** need mechanism to pass the LBDown grab to the object's interface.. This function is most often called when interfaces cannot find objects of their own to work on on an LBDown. most likely, this would require a flag for ChangeObject, which would get called from the interface...?
Member LaxInterfaces::ViewportWindow::MBDown (int x, int y, unsigned int state, int count, const Laxkit::LaxMouse *d)
*** have special behavior for middle button, which affects how the mouse wheel behaves. mb double click toggle between scroll up/down, scroll right/left, rotate, or zoom in/out
Member LaxInterfaces::ViewportWindow::postmessage (const char *mes)
*** implement a printf-ish postmessage("format string %d",i,....)
Member LaxInterfaces::ViewportWindow::Push (anInterface *i, int where, int absorbcount)
If the interface is already on the stack, then it and any descendents are brought to the top. *** that is not implemented yet, not sure if it should be.. just pushnodup's for now.
Member LaxInterfaces::ViewportWindow::SetSpace (double minx, double maxx, double miny, double maxy)
*** return value? success? on change?
Class LaxInterfaces::ViewportWithStack
*** occasionally might be useful to have the list of objects be external..
Member LaxInterfaces::ViewportWithStack::Event (const Laxkit::EventData *e, const char *mes)
*** should respond to an updateCurcolor, which interfaces can send when a new point is selected, for instance.
Member Laxkit::anXApp::addmousetimer (anXWindow *win)
maybe figure out how to make automatic turnoff when button up???
Member Laxkit::anXApp::checkOutClicks (EventReceiver *obj, MouseEventData *ee)
If there is any mouse in associated controls, should keep that group up.
Member Laxkit::anXApp::DefaultIcon (const char *file)

must implement checking for appropriate size for icons, currently just assumes 48x48 is proper, and that is what is in file...

must implement freedesktop _NET_WM_ICON. currently just does xwmhints

must implement some way to avoid direct dependence on Imlib

Member Laxkit::anXApp::DefaultIcon (LaxImage *image, int absorb_count)
this function should probably do existence checking, scaling, and freeing of old pixmaps..
Member Laxkit::anXApp::findDropCandidate (anXWindow *ref, int x, int y, anXWindow **drop, Window *xlib_window_ret)

cannot find windows that X knows about that the application doesn't, so cannot drop to other programs (yet)!

this needs work... especially when there are windows on different screens.. laxkit in general does not handle multiple screens well (ie, at all)..

***** this ignores stacking order!!!

Member Laxkit::anXApp::GetBuffer ()
*** this appears to be broken, cannot copy stuff from terminal...
Member Laxkit::anXApp::getlaxrc (const char *filename, const char *profile)
should probably flock() the file while reading in...
Member Laxkit::anXApp::idle (anXWindow *w)
remove this function? is do nothing now
Member Laxkit::anXApp::initNoX (int argc, char **argv)
*** this can be further broken down to call specialized functions for each task
Member Laxkit::anXApp::initX (int argc, char **argv)
*** this can be further broken down to call specialized functions for each task
Member Laxkit::anXApp::managefocus (anXWindow *ww, EventData *ev)
sometimes, my WM not sending FocusIn/Out on Enter/Leave, but is changing focus regardless... need to check if this is still true
Member Laxkit::anXApp::processdataevents ()
if event propagation ever really becomes an issue, it should probably be fleshed out here!
Member Laxkit::anXApp::reparent (anXWindow *kid, anXWindow *newparent)

maybe after reparenting, check to make sure window is on screen if it becomes top level

*** not sure, but there might problem when newparent is a child of kid...

implement reparenting to different screens

Member Laxkit::anXApp::Resource (LaxFiles::Attribute *resource)
might be wise to have reference counted resources, but that's maybe getting too complicated for what these resources are mainly meant for, that is: info used upon dialog creation
Member Laxkit::anXApp::run ()
must implement other file descriptor input for the call to select. This will allow listening for unusual input sources like wiimotes or socket communication..
Member Laxkit::anXApp::ttcount
maybe a negative value could signal that tooltips should pop up automatically when entering a new window. This would be when you hover over a window and get a tooltip, and the user wants to scan the tooltips of all adjacent windows without waiting the hover time.
Class Laxkit::anXWindow
implement ANXWIN_BARE to have no decorations, but move with the desktop?
Member Laxkit::anXWindow::close ()
is win_parent check really necessary? maybe just rely on ANXWIN_REMEMBER?
Member Laxkit::anXWindow::dump_in_atts (LaxFiles::Attribute *att, int flag, anObject *context)
at some point, must ensure that the dimensions read in are in part on screen.. though this is really an anXApp::addwindow() task.
Member Laxkit::anXWindow::dump_out_atts (LaxFiles::Attribute *att, int what, anObject *context)
maybe someday have option to overwrite existing attributes in att, but this opens up potential problems due to possible nesting. How deep would the replace function?
Member Laxkit::anXWindow::FocusOn (const FocusChangeData *e)
*** update this for multiple keyboard inputs.. right now, there is only one x input context at any one time, stored in anXApp::xim_ic. really I don't understand x input contexts, or any more modern way of doing it, so until then, this'll have to do.
Member Laxkit::anXWindow::getWinStyle (unsigned int stylebit)
like setWinStyle(), this is rather limited and needs further thought...
Member Laxkit::anXWindow::preinit ()
must incorporate _NET_FRAME_EXTENTS with ANXWIN_REMEMBER
Member Laxkit::anXWindow::Resize (int nw, int nh)
i want to remove this one, and only have MoveResize, but when I just have this function call MoveResize, it screws up RowFrame!! what the F? override_redirect funkiness? see icccm 4.2.9
Member Laxkit::anXWindow::SelectNextControl (const LaxDevice *d)
*** must focus the right keyboard!! and at the right time!!!!
Member Laxkit::anXWindow::setWinStyle (unsigned int stylebit, int newvalue)
must rethink window styling to make it more reasonable and adaptable. maybe better to have stylebit be more like an enum, so as to lock style types in laxkit namespace, rather then have a million goofy defines. It would then be up to the window to interperet the newvalue and set accordingly.
Member Laxkit::bez_bbox (flatpoint p, flatpoint c, flatpoint d, flatpoint q, DoubleBBox *bbox, double *extrema)
*** something is fishy with quad, occasionally finds way out extreme??
Member Laxkit::bez_near_point (flatpoint p, flatpoint *points, int n, int maxpoints, double *t_ret, int *i_ret)
I'm sure this could be optimized and improved somehow.
Member Laxkit::bez_point (double t, flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2)
*** make sure this is really optimized!
Member Laxkit::bez_points (flatpoint *to_points, flatpoint *from_points, int resolution, int ignorefirst)
optimize me
Member Laxkit::bez_visual_tangent (double t, flatpoint p1, flatpoint c1, flatpoint c2, flatpoint p2)
this could use L'Hopital's rule, which says if two functions in this case x(t) and y(t) approach 0, then x'(t) and y'(t) are such that x/y=x'/y' when limit x'/y' exists...
Member Laxkit::Button::draw ()
implement the b+w drawing.
Member Laxkit::Button::SetIcon (const char *filename, int makebw=0)
*** make black and white is not currently implemented.
Member Laxkit::Button::SetIcon (LaxImage *img, int makebw=0)
makebw
Class Laxkit::ButtonBase
could combine all the buttons: text button, iconbutton, checkbox into one thing...
Member Laxkit::ButtonDownInfo::whichdown (int afterthis, int button_id=0)
this fails when many buttons are down for the same device...
Member Laxkit::CheckBox::CheckBox (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long nowner, const char *nsendmes, const char *nnme=NULL, int npadx=0, int npady=0)
*** clear up setting initial size to be max of graphic height and the text height
Class Laxkit::ColorBox

would be neat to maintain a stack of previous colors?

might be nice to display number in window while dragging..

someday do a color managed version of this window

incorporate wheel movements to scroll the last accessed color

Member Laxkit::ColorBox::LBDown (int x, int y, unsigned int state, int count, const LaxMouse *d)
Double click to raise a Color Selection Dialog.
Class Laxkit::ColorSliders
Can toggle on or off groups of rgb, hsv, cmyk. Optional transparency.
Member Laxkit::CoreXlibPointer::ungrabDevice ()
what on earth does XUngrabPointer() actually return??
Class Laxkit::DeviceManager
*** the plan is to have a handler not only for Xinput1, Xinput2, but also any other devices, such as TUIO, wiimotes, midi, general osc, etc... still debating the best way to do this.
Member Laxkit::DeviceManager::SetFocus (anXWindow *win, LaxKeyboard *kb, clock_t t, int notifyonly)
*** need to figure out an mpx way of handling WM_TAKE_FOCUS!!
Class Laxkit::Displayer

*** this could be automated a little more, maybe the ruler could watch a panner too? or watch a displayer??? maybe not, rulers are doubles, panners are longs

*** have to coordinate panner->minsel/maxsel and upperbound/lowerbound.

***heell, perhaps combine displayer and panner to DoublePanner? would simplify some things...

*** require ctm and ictm be kept up always?? would make this just slightly faster

Member Laxkit::Displayer::drawfocusellipse (flatpoint focus1, flatpoint focus2, double c, double start_angle=0, double end_angle=0, int fill=0)
*** fails on circles
Member Laxkit::Displayer::imageout (LaxImage *image, double x, double y, double w, double h)=0
should be able to do partial drawing when an image is huge, and only a tiny portion of it actually should be rendered.
Member Laxkit::Displayer::LineAttributes (double width, int dash, int cap, int join)=0
should be able to set dash pattern somehow, and set line width based on current transform...
Member Laxkit::Displayer::ResizeSurface (int width, int height)=0
maybe preserve and position contents of old surface? like canvas resize??
Member Laxkit::Displayer::SetView (double minx, double maxx, double miny, double maxy)
*** this needs testing
Member Laxkit::Displayer::UseThisPanner (PanController *npanner)
wth? is this doc still true???
Member Laxkit::Displayer::WrapWindow (anXWindow *nw)
seems silly to wrap to this window, but not make all the other properties correspond to nw, such as connecting the drawing surface to the window.. needs more thought here.
Member Laxkit::DisplayerCairo::LineAttributes (double width, int dash, int cap, int join)
should be able to set dash pattern somehow, and set line width based on current transform...
Member Laxkit::DisplayerXlib::buildXPoints ()
shouldn't ignore multiple paths..
Member Laxkit::DisplayerXlib::imageout (LaxImage *image, double x, double y, double w, double h)
should be able to do partial drawing when an image is huge, and only a tiny portion of it actually should be rendered.
Member Laxkit::DisplayerXlib::LineAttributes (double width, int dash, int cap, int join)
should be able to set dash pattern somehow, and set line width based on current transform...
Member Laxkit::DisplayerXlib::Newmag (double xs, double ys=-1)
this could certainly be optimized.
Member Laxkit::DoubleBBox::intersect (double mix, double max, double miy, double may, int settointersection=0)
should me more specific about the kind of intersection: all inside, all outside, or just touching.
Member Laxkit::DoubleBBox::intersect (double *m, DoubleBBox *bbox, int touching, int settointersection)

*** this is not well implemented, settointersection not implemented.

*** this needs work so that there is option

Member Laxkit::draw_thing (aDrawable *win, double x, double y, double rx, double ry, int fill, DrawThingTypes thing)

*** implement the different fill options!!

double triangles, triangle pointing to line, eject. arrows, double sided arrows, pan arrow

Member Laxkit::draw_thing_coordinates (DrawThingTypes thing, flatpoint *buffer, int buffer_size, int *n_ret, double scale, DoubleBBox *bounds)
bounds is currently ignored
Class Laxkit::FileDialog

FILES_OPEN_ONE still allows multiple to be selected..

*** progressive update when typing file name in file slot. if file is not part of currently selected files, then reset filelist selection. each filelist file selection should update the file slot

***need a special path box to allow easy sanity checking... maybe not even allow editing in path or mask, only in file....or only file and mask

Member Laxkit::FileDialog::Cd (const char *to)
need sanity checking on to.
Member Laxkit::FileDialog::ClearFinalButton (int position)
this needs testing
Member Laxkit::FileDialog::Event (const EventData *e, const char *mes)
no sanity checking is done before mkdir(str)
Member Laxkit::FileDialog::FileDialog (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, unsigned long nowner, const char *nsend, unsigned long ndstyle, const char *nfile=NULL, const char *npath=NULL, const char *nmask=NULL, const char *nrecentgroup=NULL)

*** need to work out styles, and passing to RowFrame..

include prev?

Member Laxkit::FileDialog::getDirectory (const char *npath)

****** wrap this stuff into a FileMenuInfo!!!!!?? how to make the FileMenuItem have path/mask *** and don't forget about scandir!!

*** should return 0 success, nonzero error bad path, etc.

*** this needs much work to use multiple masks...

Member Laxkit::FileDialog::GetState (void **state)
****not necessary? ***would put a NULL terminated char ** list of files in state
Member Laxkit::FileDialog::init ()
*** fix quickselect button, it is totally broken at the moment
Member Laxkit::FileDialog::send (int id)
if FILES_OPEN_MANY but none selected in the menuselector, defaults to sending a StrEventData rather than a StrsEventData... should probably make it send StrsEventData with one string...?
Class Laxkit::FilePreviewer

***if text, should be able to toggle between ascii(latin-1)/utf-8, binary hex.

*** make this not depend on Imlib!

Member Laxkit::filterkeysym (KeySym keysym, unsigned int *state)
If the keysym corresponds to any of the keys in laxdefs.h, then it is mapped to those values. Otherwise...? CharInput() says if the returned value is > 0x1000000, then it is either a Laxkit value, or the X keysym plus 0x1000000, which is not quite how it is coded right now. need to check if the keysym can still be converted to a unicode value. keysyms correspond pretty well to it, and should have been converted to the buffer in event() if so, but not sure of that.
Class Laxkit::FuncFrame
needs a flag to say need to update sub boxes. else with each resize, all gets recomputed, and for mouse drag resizes, this causes way too much unnecessary computing
Member Laxkit::FuncFrame::AddVar (const char *var, int val)
no previous existence check is done! must implement that..
Member Laxkit::get_placement (LaxImage *image, const char *label, int gap, unsigned int how, int *w, int *h, int *tx, int *ty, int *ix, int *iy)
implement all of: LAX_ICON_ONLY (0) LAX_TEXT_ONLY (1) LAX_TEXT_ICON (2) LAX_ICON_TEXT (3) LAX_ICON_OVER_TEXT (4) LAX_TEXT_OVER_ICON (5) LAX_ICON_STYLE_MASK (7)
Member Laxkit::getextent (const char *str, int len, double *ex, double *ey, double *fasc, double *fdes, char r)

r doesn't work any more. returns height, but not sure how to get actual visual ascent and descent!

this is a little messy with mixup between advance and extent.

Member Laxkit::getextent (LaxFont *font, const char *str, int len, double *ex, double *ey, double *fasc, double *fdes, char r)

r doesn't work any more. returns height, but not sure how to get actual visual ascent and descent!

this is a little messy with mixup between advance and extent.

Class Laxkit::HistoryNode
*** should make this internal to prompt?
Class Laxkit::IconManager
Eventually, it might be in charge of generating pixmap icons from an icons.svg or icons.laidout or something of the kind.
Member Laxkit::IconManager::InstallIcon (const char *nname, int nid, Laxkit::LaxImage *img)
*** must check that the icon is not already installed
Class Laxkit::IconSelector
on off mover-on mover-off grayed *** must have a make_gray_pixmap *** MUST coordinate all the states in various controls to use new LAX_* defines
Class Laxkit::IconSlider
on to striconsliderpopup Gack!!
Member Laxkit::IconSlider::DeleteItem (int id)
*** imp me!
Class Laxkit::ImageDialog
implement tag editing, must switch ImageInfo to a Tagged subclass
Member Laxkit::ImageDialog::Event (const EventData *data, const char *mes)
should probably make the imageinfo fields set to NULL if the corresponding edits return blank strings or strings with only whitespace.
Member Laxkit::ImageDialog::ImageDialog (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long nowner, const char *nsend, unsigned long ndstyle, ImageInfo *inf)
*** need to work out styles, and passing to RowFrame..
Member Laxkit::ImageDialog::reallyGeneratePreview ()
*** need check for fd thumb locations to enforce proper sizing
Class Laxkit::ImageInfo
come to think of it, this could be mostly just a hash, which would make integration of exif info easier...
Member Laxkit::InputDialog::Event (const EventData *e, const char *mes)
*** enter from the lineedit makes focus jump to ok button?
Class Laxkit::ItemSlider
*** perhaps add basic popup mechanism to this class?
Member Laxkit::ItemSlider::Idle (int tid=0)
*** need to implement fast scrolling with shift/control!!
Member Laxkit::lark_id_from_str (const char *str, char createifabsent)
*** make threadsafe
Member Laxkit::lark_position (const char *str, int *c)
make this faster via binary search
Member Laxkit::lark_str_from_id (int id)
*** make threadsafe
Class Laxkit::LaxDevice
maybe have default device objects for LaxMouse, LaxKeyboard, Touchpad, MultiTouchPad, Midi, Wiimote
Class Laxkit::LaxFont
read up on Xft, and (?) FVontSets, have ability to maintain charwidths[] for multiple ranges, not just the basic Latin1/small [firstcharinfont + numcharsinfont]. Must be able to facilitate font subsetting
Member Laxkit::LaxFontCairo::charwidth (unsigned long chr, int real, double *width=NULL, double *height=NULL)
*** this is broken
Member Laxkit::LaxFontCairo::contextcharwidth (char *start, char *pos, int real, double *width=NULL, double *height=NULL)
This function as it stands is totally worthless and meaningless.
Class Laxkit::LaxFontXlib
read up on Xft, have ability to maintain charwidths[] for multiple ranges, not just the basic Latin1/small [firstcharinfont + numcharsinfont]. Must be able to facilitate font subsetting
Member Laxkit::LaxFontXlib::charwidth (unsigned long chr, int real, double *width=NULL, double *height=NULL)
*** this is broken
Member Laxkit::LaxFontXlib::contextcharwidth (char *start, char *pos, int real, double *width=NULL, double *height=NULL)
This function as it stands is totally worthless and meaningless.
Member Laxkit::LaxFontXlib::SetupMetrics ()
*** this is old and basically broken. is all core xlib
Class Laxkit::LaxImage
dataw() and datah() should be renamed pw() and ph(), plus might be useful to have a imagew() and imageh() for the dims of the thing that image points to.
Member Laxkit::LaxImage::~LaxImage ()
*** perhaps unlink also only if dataw()>0? not sure if that is accessible in destructor, might have to intercept dec_count().
Member Laxkit::laximlib_generate_preview (const char *original_file, const char *to_preview_file, const char *format, int width, int height, int fit)

*** afterwards, make sure preview was actually written

if making a freedesktop preview, must add proper tags to the resulting png

Member Laxkit::LaxImlibImage::Image (int which=0)
note that if image is already loaded, this function does not yet switch to the proper one..
Member Laxkit::LaxImlibImage::LaxImlibImage (const char *fname, Imlib_Image img=0, const char *npreviewfile=NULL, int maxx=0, int maxy=0, char del=0)

*** needs to be some error checking when generating new previews

scaling to maxx OR maxy if either 0 not implemented. both must currently be nonzero.

when generating preview, might be wise to have check for freedesktop thumb locations to enforce proper sizing

Class Laxkit::LaxKeyboard
*** XIM: x input context stuff is crazy! need either a good explanation with working examples, or some simpler system.
Class Laxkit::LaxOptions
perhaps allow duplicate options, like "-i some/dir -i some/other/dir"
Class Laxkit::LayerPicker

redo to use LAX_ON/LAX_OFF, and drawbevel()

this is very old code. is this widget really useful at all??

Class Laxkit::LineEdit

LINEEDIT_POPUP==LINEEDIT_DESTROY_ON_FOCUS_OFF|DESTROY_ON_SEND|LINEEDIT_GRAB_ON_MAP for things like menuselector edit in place, or strinputslider

***undo??? or be able to do 'esc' to revert to what edit was before focus?

*** RBDown should shift screen

*** maybe put in margins+pad

you know, this could be abstracted so the underlying text functions of TextEditBase and TextXEditBase could be an object rather than a parent class.. would make swapping out the back end easier, so wouldn't have to rewrite the interface from scratch each time.. thinking of using pango, also what about interface tools that use text? have to rewrite the whole character input mechanism again?!?

*** non actual moves must deselect selection

Member Laxkit::LineEdit::CharInput (unsigned int ch, const char *buffer, int len, unsigned int state, const LaxKeyboard *d)
ESC for reset to a copy of initial buffer
Member Laxkit::LineEdit::LBDown (int x, int y, unsigned int state, int count, const LaxMouse *d)
make finding position go to closest char division, not always to beginning of char
Member Laxkit::LineEdit::Modified (int m=1)
finish implementing this..
Member Laxkit::LineEdit::MouseMove (int x, int y, unsigned int state, const LaxMouse *d)
implement right button shift view
Member Laxkit::LineEdit::Replace (char *newstr, char *what, int all)
finish me!
Class Laxkit::LineInput
*** fix crash on NULL label...
Member Laxkit::LineInput::FocusOn (const FocusChangeData *e)
*** transfer focus to le
Class Laxkit::LinkedList< T >
***** this needs testing
Member Laxkit::ListBox::distributeBoxes (int setmetrics=0)
****** implement pad and penalty!!
Member Laxkit::ListBox::figureDimensions (ListBox *target, int *nextrow=NULL, SquishyBox **boxes=NULL, int n=0, double *squishx=NULL, double *squishy=NULL)

*** this must eventually be modified to use all the LRTB, LRBT, ...

****** implement pad and penalty!!

Member Laxkit::mapname (char *buf, int m)
be ablte use control, meta, and alt?
Class Laxkit::MemCachedObject
***** think about this!! Imlib2 does memory caching already... how I wonder?
Class Laxkit::MenuButton
should probably refcount menuinfos
Member Laxkit::MenuButton::MenuButton (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long nowner, const char *nsendmes, int nid=-1, MenuInfo *menu=NULL, int absorb=1, const char *nlabel=NULL, const char *filename=NULL, LaxImage *img=NULL, int npad=0, int ngap=0)
MENUBUTTON_DOWNARROW does faulty things
Class Laxkit::MenuInfo

*** RemoveItem

hot keys

Member Laxkit::MenuInfo::sort (int start, int end, int detail)
*** Really, there should be some other MenuItem based function pointer for the sorting, to accommodate sorting as text, or as numbers, or as some other format, without having to derive a new class???
Class Laxkit::MenuSelector

*** need style USE_ALL_OPEN, where all open submenus are used, should also be able to toggle wether the actual item text is displayed when the sub stuff is used: or put that in a TreeSelector?? item -item- <–item has open sub menu, the submenu's title is ignored sub1 -sub2- <–sub2 has open sub menu, the submenu's title is ignored subsub1 subsub1

*** implement hidden items

a lot of stuff, see class MenuSelector

Member Laxkit::MenuSelector::AddItems (const char **i, int n, int startid)
***this is cheap, should be optimized for large arrays?? add in one lump, then sort??
Member Laxkit::MenuSelector::arrangeItems (int forwrapping=0)
***Need to implement FIT_TO_WIDTH, or remove is as possibility...
Member Laxkit::MenuSelector::drawitem (MenuItem *mitem, IntRectangle *itemspot)

*** Highlighting should go right across the item, behind any other doodads put up, currently just goes across text...

*** set clip to intersection of itemspot and inrect??

Member Laxkit::MenuSelector::drawsubindicator (MenuItem *mitem, int x, int y)
for MENUSEL_SUB_FOLDER, draw an open or closed folder.
Member Laxkit::MenuSelector::editInPlace ()
*** imp me!
Member Laxkit::MenuSelector::Event (const EventData *e, const char *mes)
*** is just selecting a default keyboard, which might be unacceptible
Member Laxkit::MenuSelector::firstinw
*** should remove this variable, i don't think it is needed
Member Laxkit::MenuSelector::getgraphicextent (MenuItem *mitem, double *x, double *y)
*** incorporate icons/XImages/Pixmaps.. wait to do this until laxkit has more definite image handling setup
Member Laxkit::MenuSelector::Idle (int tid)
*** must autoscroll when mouse over arrow and FOLLOW_MOUSE
Member Laxkit::MenuSelector::item (int i, char skipcache=0)
maybe have option to force remapping==bypassing any search cache??
Member Laxkit::MenuSelector::LBUp (int x, int y, unsigned int state, const LaxMouse *d)

*** lbdown/up no drag on an already selected item should initiate EDIT_IN_PLACE

*** mousedragged==2 means a rearrangement might be required

Member Laxkit::MenuSelector::MouseMove (int x, int y, unsigned int state, const LaxMouse *d)

*** should implement speedy shifting with shift/cntl-RB drag

*** also, if right-click shifting, and is off screen, do a sort of auto scrolling, like if mouse above, then move if mouse moving up, but not if mouse is moving down?? or on timer?

Member Laxkit::MenuSelector::RBDown (int x, int y, unsigned int state, int count, const LaxMouse *d)
***perhaps someday have a hook so that right click on an item calls up some menu? like copy to, delete item, etc..
Member Laxkit::MenuSelector::Select (int which)
*** add state to it, for more control... that is be able to modify state of any element...
Member Laxkit::MenuSelector::send (int deviceid)

*** there needs to be option to send id or list of ids..

maybe send device id of the device that triggered the send

Member Laxkit::MenuSelector::SetFirst (int which, int x, int y)

*** no bounds check, should at least make sure something is in window?

*** fix me!

Member Laxkit::MenuSelector::Sort (int t)
*** should be able to sort only a subset, for instance all items between separators.
Member Laxkit::MenuSelector::WrapToPosition (int screen_x, int screen_y, int screen, anXWindow *onedgeofthis=NULL)
*** BROKEN! fix me!
Class Laxkit::MessageBar

*** need to implement wrapping style

*** SetText(char *s1,char *s2, ...)

Member Laxkit::MessageBar::SetText (const char *newtext)

this can use split()

*** implement MB_WRAP

Class Laxkit::MessageBox

standard buttons like OK or Cancel! or whole style like
Overwrite? Yes No Cancel
Save "blah"? Yes No Cancel
Save "blah" before quitting? Yes No
"blah" unsaved, quit anyway? Yes No

*** incorporate automatic Control Tab Loop thingy ***first button is always ok?? *** must have a constructor specifically for blocking popups that auto-wrap to message extent, and send a message back

Member Laxkit::MessageBox::MessageBox (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long nowner, const char *nsend, const char *mes)
prev is ignored
Member Laxkit::MessageBox::preinit ()

***check this!!

this needs a little more thought....

Class Laxkit::MouseEventData
implement adequate controls for retrieving attached valuator data like pressure, etc.
Class Laxkit::MultiLineEdit
*** lots of stuff, particularly adding scrollers, see class description....
Member Laxkit::MultiLineEdit::Event (const EventData *e, const char *mes)
*** not sure if this is ok since scrollers use the panner now...
Member Laxkit::MultiLineEdit::LBDown (int x, int y, unsigned int state, int count, const LaxMouse *d)
*** should put in drag and drop when lbdown on a selection
Member Laxkit::MultiLineEdit::makelinestart (int startline, long ulwc, int godown, int ifdelete)
*****put newyssize in mls?
Member Laxkit::MultiLineEdit::MouseMove (int x, int y, unsigned int state, const LaxMouse *d)
institute drag and drop for selections
Member Laxkit::MultiLineEdit::Replace (const char *oldstr, const char *newstr, int all)
*** this, like the others in base classes are wholly inadequate
Member Laxkit::MultiLineEdit::SetupScreen ()

*** if (xscroller && xscroller->win_on) xscroller->MoveResize(0,win_h-scrollwidth, win_w,scrollwidth);

*** if (yscroller && yscroller->win_on) yscroller->MoveResize(win_w-scrollwidth,0, scrollwidth,win_h);

Member Laxkit::MultiLineEdit::ShiftScreen (int x, long y)
*** need smart ShiftScreen XCopyArea
Member Laxkit::MultiLineEdit::UseTheseScrollers (Scroller *xscroll, Scroller *yscroll)
*** this needs work..
Member Laxkit::MultiLineEdit::wwinspect (int fromline=0)
*** perhaps an optimization would be wwinspect(fromline,scanAtLeastThisManyLines)
Class Laxkit::NumInputSlider
Double click should also jump to edit. A single normal click will inc or dec the value, and the double click should revert to previous value before entering the edit.
Member Laxkit::NumInputSlider::LBDown (int x, int y, unsigned int state, int count, const LaxMouse *d)
set focus on line edit with paired keyboard of d if d is mouse
Class Laxkit::NumSlider

optional label: [ Blah: 34 ]

super shift/ shift-but4 to move faster*** put that in itemslider

Member Laxkit::NumSlider::Refresh ()
*** show a faint arrow to say what will happen when you click on where mouse is hovering
Member Laxkit::NumStack< T >::pushnodup (T nd)
should probably have -2 for error, though currently no errors are caught.
Class Laxkit::Palette
*** needs better color management, have color space field, etc.... right now assumes ONLY rgb.
Member Laxkit::PaletteWindow::LoadPalette (const char *file)

*** check readability of the file...

*** make a default palette for file==NULL 32x8 rainbow

Member Laxkit::PaletteWindow::MouseMove (int x, int y, unsigned int state, const LaxMouse *d)
this could be used to show a temp color? buttondown-nodrag-up actually changes curcolor?
Class Laxkit::PanController

Get/set pagesize, clean up the Get/Set to be more like fltk (overloaded functions?)

*** must work out when messages are actually sent, by which functions.. don't want to unnecessarily duplicate messages.

*** please note that panuser/pancontroller setup is hell with threads..

Member Laxkit::PanController::PanController (long xmin, long xmax, long xstart, long xend, long ymin, long ymax, long ystart, long yend, int w, int h, unsigned long panstyle=PANC_ELEMENT_IS_PERCENT|PANC_PAGE_IS_PERCENT)
*** does no sanity checking yet....
Member Laxkit::PanController::sendMessages ()
send indication of what has changed? 1=x move change, 2=move ychange, 3=x selsize change, x wholesizechange, etc...
Member Laxkit::PanController::SetSelBounds (int which, long small, long big)
make sure the current selbox doesn't exceed bounds.
Class Laxkit::PanUser

***If this is made over to be anObject derived, then must ensure that all derived classes do ClassBlah : virtual ... PanUser, in any case, make sure that all the other classes derive properly (public vs. protected?)

*** maybe make the panner protected, functions public?

Class Laxkit::PanWindow
****** must be able to handle when the wholebox is less than the selbox... right now is screwed up...
Member Laxkit::PanWindow::Event (const EventData *e, const char *mes)
*** this is broken!! Must reimplement for mpx!!
Class Laxkit::PopupMenu

***** mondo needs work!!!!!!!!!! *** problem when menu is popped up from a running dialog, crossing over between the popped menus makes all events be blocked!!!

add support for tearoff menus

POPMENU_LEAVE_DESTROYS should abandon the windows if the mouse leaves a menu, and does not enter another one.

Class Laxkit::PrintDialog

Need a CancelPrint dialog class, initiated when printing commences...

save a printing context in a special laxrc type of place, or directly in ~/.lpoptions

Member Laxkit::PrintDialog::PrintDialog (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long nowner, const char *nsend, const char *nfiletoprint=NULL, PrintContext *pt=NULL)
*** need another constructor where you just pass an lpoption instance?
Member Laxkit::PrintDialog::send ()
maybe send note says sent to printer with job number?
Class Laxkit::ProgressBar

*** not currently implemented are the options to have Cancel and Pause/Resume buttons with the actual bar.. Might not even implement this ever!

*** have optional label and call function which would check just for pending map/unmap events, then Refresh().

need to add some kind of threaded mechanism to make this actually useful!!

Member Laxkit::ProgressBar::ProgressBar (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder)
***should add bounds, colors to the constructor!
Class Laxkit::PromptEdit
tab completion
Member Laxkit::PromptEdit::CharInput (unsigned int ch, const char *buffer, int len, unsigned int state, const LaxKeyboard *d)

*** clear to start of command line

*** clear to end of command line

*** clear whole command line

*** other readline-y things like searching? tab completion?

Class Laxkit::RowColBox

*** need to debug laying out where boxes put in fixed width, but the whole height wraps to the vertical extent of the child boxes

*** would be nice to auto layout in multiple columns if the boxes allow it.

*** need to incorporate internal creation of sub-rows and columns... maybe that should only be done in subclasses? it is easy enough to push a new SquishyBox, but classes like RowFrame have special needs..

Member Laxkit::RowColBox::arrangeBoxes (int distributetoo=0)
*** should implement all 8 LRTB, LRBT, ... Currently horizontal is only LRTB, and vertical is only TBLR.
Class Laxkit::RowFrame

make more clear all the layout options and padding, as well as implement them!!

***beware when deleting child windows, listbox stack becomes out of sync, it may have pointers to windows that have been delete'd already... maybe redefine deletekids to detect that?

Member Laxkit::RowFrame::RowFrame (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long owner, const char *mes, int npad=0)
Deal with ROWFRAME_LAYOUT_MASK and LRTB, etc better...
Class Laxkit::RulerWindow

***optionally make vertical writing on the vertical ruler

could make ruler automatically track mouse with mouseposition() every 10ms or so or respond to sent mouse move messages, and mouseposition() to get location...

should be able to move position when mouse is in this window!!!

placeable range indicators

Member Laxkit::RulerWindow::AddRange (int id, double start, double end)
do me!
Member Laxkit::RulerWindow::drawtext (double n, int pos, int &textpos, int toff)
*** this could use some work, particularly, vertical rulers should employ vertical text
Member Laxkit::RulerWindow::RulerWindow (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev=NULL, unsigned long nowner=0, const char *nsend=NULL, const char *base_units=NULL, int syncwithscreen=1)
If syncwithscreen, then based on the given units, try to set up so that units make sense on the given screen.
Member Laxkit::RulerWindow::Set (double strt, double fin)
*** does not adjust for screenoffset ***needs work
Member Laxkit::RulerWindow::Track ()
*** this is unimplemented
Class Laxkit::ScrolledWindow
*** should have option to either resize thewindow to fit within the space not taken by scrollers, and pass on panchange events to that window, OR have thewindow be just a huge window that the scrollbars automatically move around!!! That would be quite useful for containing dialogs....
Member Laxkit::ScrolledWindow::Event (const EventData *e, const char *mes)
*** this must respond to panner events and pass them on to the subwindows...
Member Laxkit::ScrolledWindow::syncWindows (int useinrect=0)

parameter useinrect is not used, in fact, i can't remember what I put it there for... maybe it'll come back to me..

*** window shifting rather than relay messages is not implemented yet

Class Laxkit::Scroller

*** all this assumes max>min, should allow min>max?? flip(pos) { return max-(pos-min); }

*** watch out for ALLOW_SMALL

implement 2 point zooming by dragging tracker with 2 devices

Member Laxkit::Scroller::CharInput (unsigned int ch, const char *buffer, int len, unsigned int state, const LaxKeyboard *d)
***: somehow there should be a mechanism to not grab the focus even if the mouse is clicked here.
Member Laxkit::Scroller::Idle (int id=0)

put in shift/control on idling too.. maybe have call to WheelUp/WheelDown

this does not properly distinguish between left and right clicks...

Class Laxkit::ShortcutHandler
maybe have name/file tags, to help loading and saving sets of shortcuts? for loading and saving, the actions stay the same, but key sets change. How to clarify what saves? At some point, would need access to mode names too. either that or have on ShortcutHandler per window mode? then shortcut manager keys could be "name-mode"
Member Laxkit::ShortcutManager::dump_out (FILE *f, int indent, int what, Laxkit::anObject *savecontext)
custom modifiers?
Class Laxkit::ShortcutTreeSelector
there should probably be a better way for parents to intercept input to kids...
Member Laxkit::SimplePrint::Event (const EventData *e, const char *mes)
Changes to printstart and end use the c function atoi() and do not check for things like "1ouaoeao" which it sees as 1.
Member Laxkit::SimplePrint::Print ()
*** printthis!=NULL needs testing/debugging
Class Laxkit::SliderPopup

******** needs work! update these docs

Make optional tab-completing input similar to NumInputSlider, perhaps in a subclass.

Member Laxkit::SliderPopup::LBDown (int x, int y, unsigned int state, int count, const LaxMouse *d)
*** work out how transfer focus
Member Laxkit::SliderPopup::SetState (int which, int extrastate, int on)
this is currently a little bit of a kludge to add SLIDER_IGNORE_ON_BROWSE. a more clean way would be to have it in AddItem, but due to the similarity mix of two AddItem() functions, lots of cleanup would have to happen to add an extra int for extrastate there.
Member Laxkit::SliderPopup::WrapToExtent ()
*** this only works before mapping because it sets win_w,win_h directly, rather than through Resize().. should probably think if this is good or not.
Class Laxkit::SplitWindow

*** Resizing should be redone, it is not reversible owning to integer rounding errors. perhaps have PlainWinBox have float x,y,w,h to shadow the windows actual values? or just finish imping validateX() and validateY()

*** maximize/minimize with alt-numpad-/ or some such

*** implement optional stack of windows for each pane. each is accessible how(??? tabbed window? through menu), then have option to spread out the stack into separate boxes?

Member Laxkit::SplitWindow::Add (anXWindow *win, unsigned int whichside=LAX_BOTTOM, int absorbcount=0)

*** TODO: If lots of adding goes on before creating the window, or just after creating when the dimensions are meaningless, should have some mechanism to keep the stacking order when the windows are scaled properly!! have a flag that gets turned off in init?

*** when head->window==0 and win is parented elsewhere, does this work correctly?

Member Laxkit::SplitWindow::GetAffected (int x, int y, const LaxMouse *m)
*** this should probably be redone to not be very dependent on space. that would allow recovering from resizing to really small windows easier..
Member Laxkit::SplitWindow::GetMenu ()
*** swap with....
Member Laxkit::SplitWindow::Join (int c, int whichside, char keepother=0)
*** test this
Member Laxkit::SplitWindow::joinwindow (int x, int y, char keepother)
*** when windows are joined, what happens to the vanquished one? store it in limbo?
Member Laxkit::SplitWindow::LBDown (int x, int y, unsigned int state, int count, const LaxMouse *d)
Straight clicking starts a move on the whole continuous segment. would be neat if double clicking moved only the primary windows.
Member Laxkit::SplitWindow::NewWindow (const char *wtype, anXWindow *likethis=NULL)
**** implement the SPLIT_*!!!!
Member Laxkit::SplitWindow::RBDown (int x, int y, unsigned int state, int count, const LaxMouse *d)
*** should only pop a menu if in a blank pane or in gutter.. this is because uncaught mouse events are propagated in anXWindow...
Member Laxkit::SplitWindow::RemoveCurbox ()
if the pane span is such that several windows might be expanded to cover it, then do that, rather than demand that 1 window can join to it.. The super fancy version would somehow figure out how to fill the void if no join is available (like a tatami mat)
Member Laxkit::SplitWindow::SetSpace (int spc)
this needs checking so that skinny windows do not get negative width/height
Member Laxkit::SplitWindow::Split (int c, int whichside, anXWindow *fillwindow=NULL)
*** test this
Member Laxkit::SplitWindow::validateX ()
***
Member Laxkit::SplitWindow::validateY ()
***
Member Laxkit::SquishyBox::fpen
***implement me!!
Member Laxkit::SquishyBox::hideBox (int yeshide)
must sync or tag needs to sync if necessary...
Class Laxkit::StackFrame

Currently, the window is not technically hidden, it is merely squashed to a width of 1. would be better to have real hidden capability so applications can respond with special behavior.

bevel should draw around whole window, not just in the crack

Member Laxkit::StackFrame::init ()
need enter/leave cursor adjustment, or shade bar so you know you can move it
Member Laxkit::StackFrame::MoveBar (int index, int pixelamount, int shift)
actually implement the shifting of adjacent bars
Member Laxkit::StackFrame::ReplaceWin (anXWindow *win, int absorbcount, int index)
maybe the AddWin(), ReplaceWin() functions should belong to a window container base class..
Member Laxkit::svgtransform (const char *v, double *m)

this needs thorough testing

should make the reverse too, breaking down to only scale, or only translate, if possible

Member Laxkit::TabFrame::Refresh ()
implement draw tab outlines style (like folder tabs), rather than default button style (a bevel)
Member Laxkit::TabFrame::SelectN (int which)
rearrange rows when a tab has to be brought forward!!
Class Laxkit::TableBox
***please note that this class is totally unimplemented.
Class Laxkit::TableData
***please note that this class is totally unimplemented.
Class Laxkit::Tagged
make some sort of tag manager, with special functions to build a tag cloud database, links to the tagged objects, be able to search by tag, and substitute tag aliases..
Class Laxkit::TextEditBaseUtf8

might be good idea to somehow define the encoding? Latin-1, utf8, ascii? probably much more hassle than it's worth.. simpler to do all in utf8.

*** thinks all utf8 chars are actually distinct chars... is this true? are some utf8 actually tags for vowel marks over a previous char? at times like these, pango is looking pretty good..

implement max/min textlen/numlines

***finish putting in Modified() to whatever modifies!!!

Member Laxkit::TextEditBaseUtf8::Find (const char *str, int fromcurs=1)
*** should optionally do case insensitive search
Member Laxkit::TextEditBaseUtf8::insstring (const char *blah, int after=0)
should probably validate blah. currently it is assumed that blah is valid utf8.
Member Laxkit::TextEditBaseUtf8::Replace (const char *newstr, const char *, int which)
*** this is basically unimplemented currently
Member Laxkit::TextEditBaseUtf8::WhichLine (long pos)
*** perhaps remove this from this class, it is not used here, and a 'line' is perhaps too much a many splendored thing. besides as implemented here is very inefficient.
Member Laxkit::textout (aDrawable *win, const char *thetext, int len, double x, double y, unsigned long align)

does Xft handle right to left rendering?

this is in serious hack stage. need some way to reasonably define the font and color to use

Class Laxkit::TextXEditBaseUtf8

*** a utf8 must have different simple get extent for compound characters???

how best to standardize text controls?

*** snafus with really long lines

*** makeinwindow if it can fit, it should fit

*** map space to tab for TABS_SPACES in charwidth(), tabwidth=' '*4

*** color in the pad space, put little bevel, etc

*** NO_TAB

*** paste nl conversion

*** DrawLineOfText should use a maxpix and a maxpos for refreshing and word wrapping convenience respectively

Member Laxkit::TextXEditBaseUtf8::Copy ()
*** figure out what's wrong with the copy/paste stuff.. should be able to copy right from the terminal, but that's not working..
Member Laxkit::TextXEditBaseUtf8::DrawLineOfText (int x, int y, long pos, long len, char &check, long eof=-1)

*** automatically blacks out x to eol, is this ok?

is clipping really necessary? Sure it leaks when text out of bounds.. only a problem when textrect is very different from window and nothing else covers up overflow..

Member Laxkit::TextXEditBaseUtf8::FocusOff (const FocusChangeData *e)
perhaps should also color the selection differently.
Member Laxkit::TextXEditBaseUtf8::GetExtent (long pos, long end, int lsofar=0, long eof=-1)
*** must fix the not taking into account missing chars..
Member Laxkit::TextXEditBaseUtf8::GetPos (long pos, int pix, int lsofar=0, long eof=-1)
mishandles missing chars
Member Laxkit::TextXEditBaseUtf8::TextOut (int x, int y, char *str, long len, long eof)
break off the actual string output to laxutils::textout()?
Class Laxkit::TimerInfo
for mouse button down timers, maybe use info field set to which button pressed, if it was a mouse timer, for instance, then have app check when the button is up, and remove the timer then?
Class Laxkit::ToolTip
This class is basically a MessageBar without the input handling, maybe use that one instead for automatic text wrapping?
Member Laxkit::transform_from_basics (double *result, double x, double y, double sx, double sy, double angle, double shear)
*** finish me!
Member Laxkit::TreeSelector::AddItems (const char **i, int n, int startid)
***this is cheap, should be optimized for large arrays?? add in one lump, then sort??
Member Laxkit::TreeSelector::drawitem (MenuItem *mitem, IntRectangle *itemspot)
*** set clip to intersection of itemspot and inrect??
Member Laxkit::TreeSelector::editInPlace (int which)
*** imp me!
Member Laxkit::TreeSelector::Idle (int tid)
*** must autoscroll when mouse over arrow and FOLLOW_MOUSE
Member Laxkit::TreeSelector::item (int i, char skipcache=0)
maybe have option to force remapping==bypassing any search cache??
Member Laxkit::TreeSelector::LBUp (int x, int y, unsigned int state, const LaxMouse *d)

*** lbdown/up no drag on an already selected item should initiate EDIT_IN_PLACE

*** mousedragmode==2 means a rearrangement might be required

Member Laxkit::TreeSelector::MouseMove (int x, int y, unsigned int state, const LaxMouse *d)

*** should implement speedy shifting with shift/cntl-RB drag

*** also, if right-click shifting, and is off screen, do a sort of auto scrolling, like if mouse above, then move if mouse moving up, but not if mouse is moving down?? or on timer?

Member Laxkit::TreeSelector::RBDown (int x, int y, unsigned int state, int count, const LaxMouse *d)
perhaps someday have a hook so that right click on an item calls up some menu? like copy to, delete item, etc..
Member Laxkit::TreeSelector::send (int deviceid)

*** there needs to be option to send id or list of ids..

maybe send device id of the device that triggered the send

Member Laxkit::TreeSelector::Sort (int t, int detail)
*** should be able to sort only a subset, for instance all items between separators.
Member Laxkit::TUIOListener::tuioHandler (int argc, lo_arg **argv, const char *types)
*** a set might occur before an alive for it, should be able to cope with that!
Group laxutils
*** It might be clever to have a basic hot-swappable graphics backend for the whole of Laxkit. This backend would be responsible for providing functions to make marks onto drawables, namely:
  • clear window text (+horizontal, angled, sheared),
  • line segments,
  • polylines (open or filled), ellipses (open or filled) (screen oriented done, but not rotated),
  • bevels,
  • changing fg/bg color,
  • linewidth, and
  • function. Also image loading for icons/images and cursors!! This could be achieved fairly easily by making the functions in laxutils.cc be function pointers that can be changed by an application. Notable backends could be plain Xlib, Imlib2, cairo, opengl, antigrain.
Group math
*** must add in and make available the bez/bezpatch matrix utils from bezinterface.cc and patchinterface.cc
Page Math Primer

***todo: a page for affine/rotate/shear/3x3 persp transforms

*** explain where the hell that patch equation came from)

Member replaceall (const char *dest, const char *old, const char *newn, int s, int e)
**** this needs work and testing
Group shortcuts

The trick here is to have this accessible enough, that you can dump out a list of key commands at runtime. In the interest of saving space, maybe windows could just have pointer to a list, or ActionList() to return a list of available actions, that might have any key set to them, as well as ShortcutList() for actual bindings.

perhaps key chaining can be done with a little popup up in the corner of the affected window? that would greatly relieve the particular window from having a special key chain mode.. it would just respond to a shortcut-command message..

there could be a global ShortcutManager hash, where key is something like "ImageInterface" or "ViewwerWindow", and the value is a ShortcutHandler object. That way, shortcuts are synchronized across all interfaces of the same type

Member split (const char *str, char delim, int *n_ret)
investigate strtok strsep, make a split version that puts '\0' on delimiters, does not allocate new strings, returns new'd array of char* that point to start of each field..
Group Strman

***convert to using memcpy and memmove instead of stuff like s[c]=s[c+1]

*** some functions that have a dest and a src must be careful not to delete[] dest if src==dest, must go through and check for that

make a strprintf(&str,"format",args), would have to step through format, and figure out how big a string is needed, then allocate it for str.

perhaps wrap this in LaxStr namespace?

Group templates
implement a doubly linked list of pointers (PtrList).
Page The Laxkit API
this may change. The anXWindow class may be reference counted at some point.
Page The Laxrc File

directories and fonts are still basically unimplemented..

many windows still need to pay attention to some of these settings, like pad and bevel

Class XInput2Keyboard
figure out a rational way to handle WM_TAKE_FOCUS.
Page Xlib Primer for Laxkit
this page needs updating!!

Mon Feb 17 2014 11:52:57, Laxkit