DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L2584 Version: 1.3-feature OK, let's not get distracted by Mozilla's model. Did I mention *all* the current desktops, /all three platforms/, use tooltip timeouts for their toolbars and apps? Cross platform agreement on desktop behavior is rare ;) I'd be surprised if Mozilla didn't adopt this in a future release. Mozilla and Desktops aside, it would at least be good if the FLTK API provided a way for an app to do this. As it is, I don't think it does. (If there is, let me know). I don't fully understand Fl_Tooltip's implementation, but I get the impression there's a single global instance of it somewhere, and all widget's tooltips communicate with it. I could see perhaps at minimum an Fl_Tooltip::callback() that an app can set to be notified whenever a tooltip is posted or hidden, eg: enum { SHOWN, HIDDEN }; // Fl_Tooltip::{SHOWN|HIDDEN} typedef void (Fl_Tooltip_Callback)(Fl_Widget* w, // tooltip's widget int notify, // SHOWN | HIDDEN void* data); // user data Fl_Tooltip::callback(Fl_Tooltip_Callback *cb, void *data); ..and probably a public method to tell posted tooltips to hide(): Fl_Tooltip::hide() So two additional public static methods, and a public Fl_Tooltip:: enum. With that, an app could get a callback when a tooltip is posted: if SHOWN, setup timeout to hide eg. based on strlen(w->tooltip()), if HIDDEN, disable any timeout it setup, on timeout, hide the current tooltip. And if the time ever came where the API should provide tooltip timeouts itself, a simple method: Fl_Tooltip::hidedelay(float secs) the above would still be useful to allow apps to fine tune tooltip times based on some algorithm of its own. I imagine a single method of the form: Fl_Tooltip::hidedelay(float secs) private: static float hidedelay_; // !< delay to hide tooltip ..where 0.0 is disabled (eg. 'forever'). This would catch us up with QT, which has had tooltip kill timers for >5 years, and only recently added the ability to allow users to adjust the kill timer: http://www.qtcentre.org/threads/8645-Tooltip-delays http://bugreports.qt.nokia.com/browse/QTBUG-1016 Link: http://www.fltk.org/str.php?L2584 Version: 1.3-feature _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
