DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2161 Version: 1.3-current Fl_Widget::flags_ is of type int, but there is an enum defined that sets individual bits. Maybe it would be better to define flags_ as unsigned int. Currently there are 12 bits (1-2048) defined, but they are in different places in the source files. Maybe it would be better to define all bits at one place: currently this would be FL/Fl_Widget.H, but maybe this could be moved to FL/Enumerations.H ? There are two bits multiply defined, with more or less risk of making problems: FL_MODAL = SHORTCUT_LABEL = 64 and NO_OVERLAY = CHANGED = 128 FL_MODAL is exclusively used for windows, but since windows don't do their own label drawing, there may be no conflicts so far. NO_OVERLAY and CHANGED may be critical. NO_OVERLAY is used for Fl_Menu_Window, and CHANGED is cleared after each callback. I don't know if this might make problems. There is some code (and a comment) in Fl_Window.cxx (line 153) that I don't understand: void Fl_Window::iconlabel(const char *iname) { // FIXME: 'flags' is 32 bit large! uchar saveflags = flags(); label(label(), iname); set_flag(saveflags); } This could easily be fixed, because saveflags is a local variable, but why did the author of this comment not do it ? Since we have enough free bits, I think that it would be a good idea to rearrange the double definitions, just to be sure, and define everything as one enumeration either in Fl_Widget.H or Enumerations.H, and make this an unsigned int. Any ideas or thoughts ? Link: http://www.fltk.org/str.php?L2161 Version: 1.3-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
