diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-08-02 15:32:00 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-08-02 15:32:00 +0000 |
| commit | 836d2fac260c861106e0d96203bea4a04c9dd2d2 (patch) | |
| tree | e265f4eab743fc350dac1af4394fe88440c7181c /FL/Fl_Tooltip.H | |
| parent | bd069130577e28b3b26dbb5637bb3172fe108e81 (diff) | |
Fix tooltips a la 2.0.
Update 1.1 tooltip interface to be identical to the 2.0 interface for
most things (no enter_area function right now...)
Add localized makedepend files (no system include files, just ../FL/bla.h)
so that builds recompile as necessary.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1516 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Tooltip.H')
| -rw-r--r-- | FL/Fl_Tooltip.H | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/FL/Fl_Tooltip.H b/FL/Fl_Tooltip.H index 8826fdff7..62875dc38 100644 --- a/FL/Fl_Tooltip.H +++ b/FL/Fl_Tooltip.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Tooltip.H,v 1.16.2.1 2001/08/01 21:24:48 easysw Exp $" +// "$Id: Fl_Tooltip.H,v 1.16.2.2 2001/08/02 15:31:59 easysw Exp $" // // Tooltip header file for the Fast Light Tool Kit (FLTK). // @@ -56,8 +56,8 @@ FL_EXPORT class Fl_Tooltip { public: // These functions are user-called functions - static float tooltip_delay() { return delay_; } - static void tooltip_delay(float f) { delay_ = (f < 0.1) ? 0.1 : f; } + static float delay() { return delay_; } + static void delay(float f) { delay_ = (f < 0.1) ? 0.1 : f; } static int font() { return font_; } static int size() { return size_; } static void font(int i) { font_ = i; } @@ -67,13 +67,14 @@ public: static void enter(Fl_Widget *w); static void exit(Fl_Widget *w); - static void enable() {tooltip_callback_ = tooltip_timeout; tooltip_exit_ = (void (*)(void *))tooltip_exit;} - static void disable() {tooltip_callback_ = 0; tooltip_exit_ = 0;} + static int enabled() {return tooltip_callback_ != 0;} + static void enable(int b = 1) {if (!b) enter(0); tooltip_callback_ = b ? tooltip_timeout : 0; tooltip_exit_ = b ? (void (*)(void *))tooltip_exit : 0;} + static void disable() {enter(0); tooltip_callback_ = 0; tooltip_exit_ = 0;} }; #endif // -// End of "$Id: Fl_Tooltip.H,v 1.16.2.1 2001/08/01 21:24:48 easysw Exp $". +// End of "$Id: Fl_Tooltip.H,v 1.16.2.2 2001/08/02 15:31:59 easysw Exp $". // |
