Maybe you don't even need to call insert() if your just moving
widgets around, since 'sorting' has more to do with the widget
x/y positions than it does with their position in the internal
arrays.
Exactly. I just add() the widgets, then sort the child
array by x/y position.
Right, so if you're just tweaking the x()/y() positions
of the widgets to sort, then call redraw() on the parent,
that should be pretty fast I'd think. Just a single array walk
would be involved to shuffle around the x()/y() values.
Just be sure your array walk loop doesn't involve a find()
for each widget lookup, as that would exponentially suck
cpu for each new widget added.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.