summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorBill Spitzak <spitzak@gmail.com>2002-05-13 05:05:11 +0000
committerBill Spitzak <spitzak@gmail.com>2002-05-13 05:05:11 +0000
commit80465e4bfff4fd298fa6fb40ccb624d4abd57709 (patch)
treef623ce9c237a4cd0bb142e07dd4949be97149865 /src/Fl.cxx
parenta35c5a6a2e74b9c9aa87f71b699a4b86cda0b857 (diff)
Backported the fltk2.0 tooltips. This may be somewhat binary incompatable
as Fl_Widget::tooltip(x) is no longer an inline (though the previous version will work if there is at least one call to the new one). It may be better to just enable tooltips all the time. Also Fl_Tooltip::enable() is changed, but few programs call that. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2210 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index b64d81ff5..45082bb0f 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl.cxx,v 1.24.2.41.2.26 2002/04/13 22:17:46 easysw Exp $"
+// "$Id: Fl.cxx,v 1.24.2.41.2.27 2002/05/13 05:05:11 spitzak Exp $"
//
// Main event handling code for the Fast Light Tool Kit (FLTK).
//
@@ -423,8 +423,8 @@ void Fl::belowmouse(Fl_Widget *o) {
if (grab()) return; // don't do anything while grab is on
Fl_Widget *p = belowmouse_;
if (o != p) {
- if (!dnd_flag) Fl_Tooltip::enter(o);
belowmouse_ = o;
+ if (!dnd_flag) Fl_Tooltip::enter(o);
for (; p && !p->contains(o); p = p->parent()) {
p->handle(dnd_flag ? FL_DND_LEAVE : FL_LEAVE);
}
@@ -440,6 +440,10 @@ Fl_Window *fl_xmousewin;// which window X thinks has FL_ENTER
Fl_Window *Fl::grab_; // most recent Fl::grab()
Fl_Window *Fl::modal_; // topmost modal() window
+static void nothing(Fl_Widget *) {}
+void (*Fl_Tooltip::enter)(Fl_Widget *) = nothing;
+void (*Fl_Tooltip::exit)(Fl_Widget *) = nothing;
+
// Update modal(), focus() and other state according to system state,
// and send FL_ENTER, FL_LEAVE, FL_FOCUS, and/or FL_UNFOCUS events.
// This is the only function that produces these events in response
@@ -550,7 +554,7 @@ int Fl::handle(int event, Fl_Window* window)
return 1;
case FL_PUSH:
- if (!pushed()) Fl_Tooltip::enter(0);
+ Fl_Tooltip::enter((Fl_Widget*)0);
if (grab()) w = grab();
else if (modal() && w != modal()) return 0;
pushed_ = w;
@@ -623,8 +627,6 @@ int Fl::handle(int event, Fl_Window* window)
e_number = event = FL_SHORTCUT;
case FL_SHORTCUT:
- Fl_Tooltip::enter((Fl_Widget*)0);
-
if (grab()) {w = grab(); break;} // send it to grab window
// Try it as shortcut, sending to mouse widget and all parents:
@@ -753,7 +755,7 @@ void Fl_Window::hide() {
delete x;
// Hide any visible tooltips...
- Fl_Tooltip::enter(0);
+ //Fl_Tooltip::enter(0);
}
Fl_Window::~Fl_Window() {
@@ -890,5 +892,5 @@ void Fl_Window::flush() {
}
//
-// End of "$Id: Fl.cxx,v 1.24.2.41.2.26 2002/04/13 22:17:46 easysw Exp $".
+// End of "$Id: Fl.cxx,v 1.24.2.41.2.27 2002/05/13 05:05:11 spitzak Exp $".
//