diff options
| author | Fabien Costantini <fabien@onepost.net> | 2008-09-15 16:39:05 +0000 |
|---|---|---|
| committer | Fabien Costantini <fabien@onepost.net> | 2008-09-15 16:39:05 +0000 |
| commit | b8955a9ced0270ec7aa7052e6e0852cae140ca27 (patch) | |
| tree | 2432866aeda02a7c0cfa93e04a2d0c3b802a6033 /src/Fl_Tooltip.cxx | |
| parent | 09f3094aef152ece5bf802983d54f1642d803e0d (diff) | |
Doxygen documentation WP11 Done!
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6255 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Tooltip.cxx')
| -rw-r--r-- | src/Fl_Tooltip.cxx | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/src/Fl_Tooltip.cxx b/src/Fl_Tooltip.cxx index c804d3153..8825da797 100644 --- a/src/Fl_Tooltip.cxx +++ b/src/Fl_Tooltip.cxx @@ -135,14 +135,16 @@ static void tooltip_timeout(void*) { recursion = 0; } -// If this widget or one of it's parents has a tooltip, enter it. This -// will do nothing if this is the current widget (even if the mouse moved -// out so an exit() was done and then moved back in). If no tooltip can -// be found do Fl_Tooltip::exit_(). If you don't want this behavior (for instance -// if you want the tooltip to reappear when the mouse moves back in) -// call the fancier enter_area() below. -void -Fl_Tooltip::enter_(Fl_Widget* w) { +/** + This method is called when the mouse pointer enters a widget. + <P>If this widget or one of it's parents has a tooltip, enter it. This + will do nothing if this is the current widget (even if the mouse moved + out so an exit() was done and then moved back in). If no tooltip can + be found do Fl_Tooltip::exit_(). If you don't want this behavior (for instance + if you want the tooltip to reappear when the mouse moves back in) + call the fancier enter_area() below. +*/ +void Fl_Tooltip::enter_(Fl_Widget* w) { #ifdef DEBUG printf("Fl_Tooltip::enter_(w=%p)\n", w); printf(" window=%p\n", window); @@ -158,11 +160,13 @@ Fl_Tooltip::enter_(Fl_Widget* w) { } enter_area(w, 0, 0, w->w(), w->h(), tw->tooltip()); } - -// Acts as though enter(widget) was done but does not pop up a -// tooltip. This is useful to prevent a tooltip from reappearing when -// a modal overlapping window is deleted. FLTK does this automatically -// when you click the mouse button. +/** + Sets the current widget target. + Acts as though enter(widget) was done but does not pop up a + tooltip. This is useful to prevent a tooltip from reappearing when + a modal overlapping window is deleted. FLTK does this automatically + when you click the mouse button. +*/ void Fl_Tooltip::current(Fl_Widget* w) { #ifdef DEBUG printf("Fl_Tooltip::current(w=%p)\n", w); @@ -181,8 +185,8 @@ void Fl_Tooltip::current(Fl_Widget* w) { } // Hide any visible tooltip. -void -Fl_Tooltip::exit_(Fl_Widget *w) { +/** This method is called when the mouse pointer leaves a widget. */ +void Fl_Tooltip::exit_(Fl_Widget *w) { #ifdef DEBUG printf("Fl_Tooltip::exit_(w=%p)\n", w); printf(" widget=%p, window=%p\n", widget_, window); @@ -203,8 +207,18 @@ Fl_Tooltip::exit_(Fl_Widget *w) { // it define an area the tooltip is for, this along with the current // mouse position places the tooltip (the mouse is assummed to point // inside or near the box). -void -Fl_Tooltip::enter_area(Fl_Widget* wid, int x,int y,int w,int h, const char* t) +/** + You may be able to use this to provide tooltips for internal pieces + of your widget. Call this after setting Fl::belowmouse() to + your widget (because that calls the above enter() method). Then figure + out what thing the mouse is pointing at, and call this with the widget + (this pointer is used to remove the tooltip if the widget is deleted + or hidden, and to locate the tooltip), the rectangle surrounding the + area, relative to the top-left corner of the widget (used to calculate + where to put the tooltip), and the text of the tooltip (which must be + a pointer to static data as it is not copied). +*/ +void Fl_Tooltip::enter_area(Fl_Widget* wid, int x,int y,int w,int h, const char* t) { (void)x; (void)w; |
