diff options
| author | Greg Ercolano <erco@seriss.com> | 2010-12-02 17:58:58 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2010-12-02 17:58:58 +0000 |
| commit | a343f7555b23074237b08518c9dab7b51fe33777 (patch) | |
| tree | d3d4931148aff5ccbf956e879d5d15a8b73e9b92 /FL | |
| parent | 3578d1d6f809a25d98d539963170de56c9b3dd16 (diff) | |
STR#2466: Added copy_tooltip().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7940 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Tooltip.H | 2 | ||||
| -rw-r--r-- | FL/Fl_Widget.H | 17 |
2 files changed, 6 insertions, 13 deletions
diff --git a/FL/Fl_Tooltip.H b/FL/Fl_Tooltip.H index 9b039aee9..49419c985 100644 --- a/FL/Fl_Tooltip.H +++ b/FL/Fl_Tooltip.H @@ -92,8 +92,10 @@ public: // fabien: made it private with only a friend function access private: friend void Fl_Widget::tooltip(const char *); + friend void Fl_Widget::copy_tooltip(const char *); static void enter_(Fl_Widget* w); static void exit_(Fl_Widget *w); + static void set_enter_exit_once_(); private: static float delay_; //!< delay before a tooltip is shown diff --git a/FL/Fl_Widget.H b/FL/Fl_Widget.H index c45f6013f..dc3cc408d 100644 --- a/FL/Fl_Widget.H +++ b/FL/Fl_Widget.H @@ -162,6 +162,7 @@ protected: MODAL = 1<<14, ///< a window blocking input to all other winows (Fl_Window) NO_OVERLAY = 1<<15, ///< window not using a hardware overlay plane (Fl_Menu_Window) GROUP_RELATIVE = 1<<16, ///< position this idget relative to the parent group, not to the window + COPIED_TOOLTIP = 1<<17, ///< the widget tooltip is internally copied, its destruction is handled by the widget // (space for more flags) USERFLAG3 = 1<<29, ///< reserved for 3rd party extensions USERFLAG2 = 1<<30, ///< reserved for 3rd party extensions @@ -533,22 +534,12 @@ public: /** Gets the current tooltip text. \return a pointer to the tooltip text or NULL + \see tooltip(const char*), copy_tooltip(const char*) */ const char *tooltip() const {return tooltip_;} - /** Sets the current tooltip text. - Sets a string of text to display in a popup tooltip window when the user - hovers the mouse over the widget. The string is <I>not</I> copied, so - make sure any formatted string is stored in a static, global, - or allocated buffer. - - If no tooltip is set, the tooltip of the parent is inherited. Setting a - tooltip for a group and setting no tooltip for a child will show the - group's tooltip instead. To avoid this behavior, you can set the child's - tooltip to an empty string (""). - \param[in] t new tooltip - */ - void tooltip(const char *t); + void tooltip(const char *text); // see Fl_Tooltip + void copy_tooltip(const char *text); // see Fl_Tooltip /** Gets the current callback function for the widget. Each widget has a single callback. |
