DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2083 Version: 1.3-feature Yes, I'd agree on consistency with what's in FLTK 1.x already when it comes to naming and int return values. It seems the FLTK API seems to like to use set_xxx() to set something, and xxx() to get it, eg: widget->set_visible(); // make it visible if ( widget->visible() ) { .. } // check if visible widget->set_changed(); // change it if ( widget->changed() ) { .. } // get it widget->set_modal(); // set it if ( modal() ) { .. } // get it So to be 'consistent', I guess that's what should be used, if that's the doctrine to be followed. I don't think the coding standards cover this: http://fltk.org/cmp.php ..maybe it should. But that does seem to be the dominating method naming convention used in FLTK. (To find out, I just grepped the FL/*.H files for 'set_' vs. 'is_' and 'ed()'. Lots of hits for set_xxx(), and few at all for is_xxx() and xxxed()) However, I do like the way the suggestions in this STR read: window->maximize(); // maximize the window if ( window->is_maximized() ) { .. } // check if maximized Also, the suggestion to use -ed() seems fine for differentiating the 'get' and 'set' methods, as long as the -ed() is only used for 'get', eg: window->maximize(); // maximize the window if ( window->maximized() ) { .. } // check if maximized ..but again, not many precedents for either of those in FLTK, if any. Assuming it's even possible to 'get' these minimize/maximize values. I should point out that since these are 'hints' to the window manager, it is possible one can't ask the window manager if the window has been minimized/maximized(). I remember looking at some window manager code in an app that seemed to first 'ask' if eg. minimize() function was available in the window manager, and if not, tried to emulate it with its own code. Link: http://www.fltk.org/str.php?L2083 Version: 1.3-feature _______________________________________________ fltk-dev mailing list fltk-dev@easysw.com http://lists.easysw.com/mailman/listinfo/fltk-dev