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
Attached file "str2041-r9310.patch"...
Link: http://www.fltk.org/str.php?L2041
Version: 1.4-feature
Index: src/Fl_Tooltip.cxx
===================================================================
--- src/Fl_Tooltip.cxx (revision 9310)
+++ src/Fl_Tooltip.cxx (working copy)
@@ -166,6 +166,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 9310)
+++ src/Fl_Group.cxx (working copy)
@@ -277,7 +277,12 @@
if (o->visible()) o->handle(event);
}
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 9310)
+++ FL/Enumerations.H (working copy)
@@ -296,7 +296,16 @@
FL_SCREEN_CONFIGURATION_CHANGED = 24,
/** The fullscreen state of the window has changed
*/
- FL_FULLSCREEN = 25
+ FL_FULLSCREEN = 25,
+
+ /** 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 = 26
};
/** \name When Conditions */
Index: FL/names.h
===================================================================
--- FL/names.h (revision 9310)
+++ FL/names.h (working copy)
@@ -67,7 +67,8 @@
"FL_DND_LEAVE",
"FL_DND_RELEASE",
"FL_SCREEN_CONFIGURATION_CHANGED",
- "FL_FULLSCREEN"
+ "FL_FULLSCREEN",
+ "FL_TOOLTIP"
};
/**
_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev