Stan wrote:
>>      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.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to