DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR Pending]

Link: http://www.fltk.org/str.php?L2041
Version: 1.4-feature





Link: http://www.fltk.org/str.php?L2041
Version: 1.4-feature
Index: src/Fl_Tooltip.cxx
===================================================================
--- src/Fl_Tooltip.cxx  (revision 6912)
+++ src/Fl_Tooltip.cxx  (working copy)
@@ -160,6 +160,11 @@
   for (;;) {
     if (!tw) {exit_(0); return;}
     if (tw == widget_) return;
+
+    // Send the FL_TOOLTIP event to tw. The return value technically does not 
matter.
+       // The action to take will depend on the state of its tooltip.
+       tw->handle(FL_TOOLTIP);
+
     if (tw->tooltip()) break;
     tw = tw->parent();
   }
Index: src/Fl_Group.cxx
===================================================================
--- src/Fl_Group.cxx    (revision 6912)
+++ src/Fl_Group.cxx    (working copy)
@@ -287,6 +287,10 @@
     }
     return 1;
 
+  case FL_TOOLTIP:
+    if (tooltip()) return 1;
+    return 0;
+
   default:
     // For all other events, try to give to each child, starting at focus:
     for (i = 0; i < children(); i ++)
Index: FL/Enumerations.H
===================================================================
--- FL/Enumerations.H   (revision 6912)
+++ FL/Enumerations.H   (working copy)
@@ -294,7 +294,17 @@
    *  If the widget returns 1, it will receive the data in the immediately 
    *  following FL_PASTE event.
    */
-  FL_DND_RELEASE       = 23
+  FL_DND_RELEASE       = 23,
+
+
+  /** The widget under the cursor has a chance to display a tooltip. 
+   *  When a widget receives this event, it can modify its tooltip. The
+   *  modified tooltip will be drawn. If the widget removes its tooltip,
+   *  the parent with a tooltip will be drawn.
+   *
+   *  \sa Fl_Widget::tooltip(const char *t)
+   */
+  FL_TOOLTIP        = 24
 };
 
 /** \name When Conditions */
Index: FL/names.h
===================================================================
--- FL/names.h  (revision 6912)
+++ FL/names.h  (working copy)
@@ -75,6 +75,7 @@
   "FL_DND_DRAG",
   "FL_DND_LEAVE",
   "FL_DND_RELEASE",
+  "FL_TOOLTIP"
 };
 
 /**
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to