It looks like if all the items inside a scroll widget (or possibly any
widget?) are larger than 32768 then bad things start happening.
For example we can modify the "pack.cxx" test app from the standard FLTK
sources:
--- pack.cxx.orig
+++ pack.cxx
@@ -65,6 +65,13 @@
pack = o;
o->box(FL_DOWN_FRAME);
//o->box(FL_ENGRAVED_FRAME);
+ for (int i = 0; i < 1311; i++)
+ {
+ char* label = new char[8];
+ sprintf(label, "b%d", i);
+ new Fl_Button(35+(10*i), 35+(10*i), 25, 25, label);
+ }
+/*
new Fl_Button(35, 35, 25, 25, "b1");
new Fl_Button(45, 45, 25, 25, "b2");
new Fl_Button(55, 55, 25, 25, "b3");
@@ -89,6 +96,7 @@
new Fl_Button(245, 245, 25, 25, "b22");
new Fl_Button(255, 255, 25, 25, "b23");
new Fl_Button(265, 265, 25, 25, "b24");
+*/
o->end();
w->resizable(o);
}
Try running that and then resizing the window. All the widgets will
disappear and scrolling through the list is no better. I tracked it
down to an overflow when the height goes over 32768 (in this case it's
1311 widgets of 25 height).
I'm having a hard time finding where this 16-bit "short" value is used
though. All widgets use integers for width/height AFAIK. Any ideas
where in the sources I should look?
Thanks!
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk