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 | |
| 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')
| -rw-r--r-- | FL/Fl_Tooltip.H | 13 | ||||
| -rw-r--r-- | FL/Fl_Widget.H | 7 |
2 files changed, 10 insertions, 10 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 $". // diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index 72e5b8b4e..9fbdc862b 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -1,5 +1,5 @@ // -// "$Id: Fl_Widget.H,v 1.6.2.4.2.1 2001/08/01 21:24:48 easysw Exp $" +// "$Id: Fl_Widget.H,v 1.6.2.4.2.2 2001/08/02 15:31:59 easysw Exp $" // // Widget header file for the Fast Light Tool Kit (FLTK). // @@ -27,7 +27,6 @@ #define Fl_Widget_H #include "Enumerations.H" -#include "Fl_Tooltip.H" class Fl_Widget; class Fl_Window; @@ -132,7 +131,7 @@ public: uchar labelsize() const {return label_.size;} void labelsize(uchar a) {label_.size=a;} const char *tooltip() const {return tooltip_;} - void tooltip(const char *t) {Fl_Tooltip::enable(); tooltip_ = t;} + void tooltip(const char *t); Fl_Callback_p callback() const {return callback_;} void callback(Fl_Callback* c, void* p) {callback_=c; user_data_=p;} void callback(Fl_Callback* c) {callback_=c;} @@ -196,5 +195,5 @@ public: #endif // -// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.1 2001/08/01 21:24:48 easysw Exp $". +// End of "$Id: Fl_Widget.H,v 1.6.2.4.2.2 2001/08/02 15:31:59 easysw Exp $". // |
