FLTK logo

is it safe to sort children?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

is it safe to sort children? Stan Mar 27, 2007  
 
At runtime, I'm stuffing a grid of widgets into an Fl_Scroll.
My program structure demands that the grid is generated
in column-major order, but I'd like a row-major tab order
when I'm done.

I implemented this by using insert() to add each component at its
(currently) correct position.  When the grid is large, this is
rather slow.  Performance is obviously much better if I add()
each component, then sort the Fl_Scroll's array of children
when I'm all done.  It seems to work, but I'm wondering if it's
safe to do.

TIA,
Stan


Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.