From bd069130577e28b3b26dbb5637bb3172fe108e81 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 1 Aug 2001 21:24:49 +0000 Subject: First bunch of changes for the 1.1 branch - tooltips. NOTE: looking into a problem with the tooltip not going away when you ESCape a window (close it)... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1514 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Button.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/Fl_Button.cxx') diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx index 34320b7ba..50934aaee 100644 --- a/src/Fl_Button.cxx +++ b/src/Fl_Button.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Button.cxx,v 1.4.2.6 2001/01/22 15:13:39 easysw Exp $" +// "$Id: Fl_Button.cxx,v 1.4.2.6.2.1 2001/08/01 21:24:49 easysw Exp $" // // Button widget for the Fast Light Tool Kit (FLTK). // @@ -26,6 +26,7 @@ #include #include #include +#include // tooltip // There are a lot of subclasses, named Fl_*_Button. Some of // them are implemented by setting the type() value and testing it @@ -60,11 +61,15 @@ int Fl_Button::handle(int event) { int newval; switch (event) { case FL_ENTER: + Fl_Tooltip::enter(this); // tooltip + return 1; // tooltip case FL_LEAVE: // if ((value_?selection_color():color())==FL_GRAY) redraw(); + Fl_Tooltip::exit(this); // tooltip return 1; case FL_PUSH: case FL_DRAG: + Fl_Tooltip::exit(this); // tooltip if (Fl::event_inside(this)) { if (type() == FL_RADIO_BUTTON) newval = 1; else newval = !oldval; @@ -77,6 +82,7 @@ int Fl_Button::handle(int event) { } return 1; case FL_RELEASE: + Fl_Tooltip::exit(this); // tooltip if (value_ == oldval) { if (when() & FL_WHEN_NOT_CHANGED) do_callback(); return 1; @@ -118,5 +124,5 @@ Fl_Button::Fl_Button(int x,int y,int w,int h, const char *l) } // -// End of "$Id: Fl_Button.cxx,v 1.4.2.6 2001/01/22 15:13:39 easysw Exp $". +// End of "$Id: Fl_Button.cxx,v 1.4.2.6.2.1 2001/08/01 21:24:49 easysw Exp $". // -- cgit v1.2.3