Author: matt Date: 2010-04-01 12:55:03 -0700 (Thu, 01 Apr 2010) New Revision: 7395 Log: Ported FLTK1 version of Fl_Tooltips. FLTK2 version will require a bit more brain grease.
Added: branches/branch-3.0/fltk3/Tooltip.h Removed: branches/branch-3.0/fltk3/Fl_Tooltip.H Modified: branches/branch-3.0/FL/Fl_Tooltip.H branches/branch-3.0/src/Fl.cxx branches/branch-3.0/src/Fl_Tabs.cxx branches/branch-3.0/src/Fl_Tooltip.cxx branches/branch-3.0/src/Fl_Widget.cxx branches/branch-3.0/src/Fl_arg.cxx branches/branch-3.0/src/Fl_cocoa.mm branches/branch-3.0/src/Fl_mac.cxx branches/branch-3.0/src/Fl_win32.cxx branches/branch-3.0/src/Fl_x.cxx branches/branch-3.0/test/buttons.cxx branches/branch-3.0/test/buttons1.cxx Modified: branches/branch-3.0/FL/Fl_Tooltip.H =================================================================== --- branches/branch-3.0/FL/Fl_Tooltip.H 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/FL/Fl_Tooltip.H 2010-04-01 19:55:03 UTC (rev 7395) @@ -1,105 +1,39 @@ // // "$Id$" // -// Tooltip header file for the Fast Light Tool Kit (FLTK). -// -// Copyright 1998-2009 by Bill Spitzak and others. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Library General Public -// License as published by the Free Software Foundation; either -// version 2 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Library General Public License for more details. -// -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -// USA. -// -// Please report all bugs and problems on the following page: -// -// http://www.fltk.org/str.php -// -/* \file - Fl_Tooltip widget . */ +#ifndef Fltk1_Tooltip_H +#define Fltk1_Tooltip_H -#ifndef Fl_Tooltip_H -#define Fl_Tooltip_H +#include <fltk3/Tooltip.h> -#include <fltk3/Fl.H> -#include <fltk3/Fl_Widget.H> +#include "Fl.H" +#include "Fl_Widget.H" -/** - The Fl_Tooltip class provides tooltip support for - all FLTK widgets. It contains only static methods. -*/ class FL_EXPORT Fl_Tooltip { -public: - /** Gets the tooltip delay. The default delay is 1.0 seconds. */ - static float delay() { return delay_; } - /** Sets the tooltip delay. The default delay is 1.0 seconds. */ - static void delay(float f) { delay_ = f; } - /** - Gets the tooltip hover delay, the delay between tooltips. - The default delay is 0.2 seconds. - */ - static float hoverdelay() { return hoverdelay_; } - /** - Sets the tooltip hover delay, the delay between tooltips. - The default delay is 0.2 seconds. - */ - static void hoverdelay(float f) { hoverdelay_ = f; } - /** Returns non-zero if tooltips are enabled. */ - static int enabled() { return enabled_; } - /** Enables tooltips on all widgets (or disables if <i>b</i> is false). */ - static void enable(int b = 1) { enabled_ = b;} - /** Same as enable(0), disables tooltips on all widgets. */ - static void disable() { enabled_ = 0; } - static void (*enter)(fltk3::Widget* w); - static void enter_area(fltk3::Widget* w, int X, int Y, int W, int H, const char* tip); - static void (*exit)(fltk3::Widget *w); - /** Gets the current widget target */ - static fltk3::Widget* current() {return widget_;} - static void current(fltk3::Widget*); - /** Gets the typeface for the tooltip text. */ - static Fl_Font font() { return font_; } - /** Sets the typeface for the tooltip text. */ - static void font(Fl_Font i) { font_ = i; } - /** Gets the size of the tooltip text. */ - static Fl_Fontsize size() { return size_; } - /** Sets the size of the tooltip text. */ - static void size(Fl_Fontsize s) { size_ = s; } - /** Gets the background color for tooltips. The default background color is a pale yellow. */ - static Fl_Color color() { return color_; } - /** Sets the background color for tooltips. The default background color is a pale yellow. */ - static void color(Fl_Color c) { color_ = c; } - /** Gets the color of the text in the tooltip. The default is black. */ - static Fl_Color textcolor() { return textcolor_; } - /** Sets the color of the text in the tooltip. The default is black. */ - static void textcolor(Fl_Color c) { textcolor_ = c; } - - // These should not be public, but fltk3::Widget::tooltip() needs them... - // fabien: made it private with only a friend function access -private: - friend void fltk3::Widget::tooltip(const char *); - static void enter_(fltk3::Widget* w); - static void exit_(fltk3::Widget *w); - -private: - static float delay_; //!< delay before a tooltip is shown - static float hoverdelay_; //!< delay between tooltips - static int enabled_; - static Fl_Color color_; - static Fl_Color textcolor_; - static Fl_Font font_; - static Fl_Fontsize size_; - static fltk3::Widget* widget_; //!< Keeps track of the current target widget +public: + static float delay() { return fltk3::Tooltip::delay(); } + static void delay(float f) { fltk3::Tooltip::delay(f); } + static float hoverdelay() { return fltk3::Tooltip::hoverdelay(); } + static void hoverdelay(float f) { fltk3::Tooltip::hoverdelay(f); } + static int enabled() { return fltk3::Tooltip::enabled(); } + static void enable(int b = 1) { fltk3::Tooltip::enable(b); } + static void disable() { fltk3::Tooltip::disable(); } + // fltk123: static void (*enter)(fltk3::Widget* w); + static void enter_area(Fl_Widget *w, int X, int Y, int W, int H, const char* tip) + { fltk3::Tooltip::enter_area(w->fltk3Widget(), X, Y, W, H, tip); } + // fltk123: static void (*exit)(fltk3::Widget *w); + static Fl_Widget* current() { return (Fl_Widget*)fltk3::Tooltip::current()->wrapper(); } + static void current(Fl_Widget *w) { fltk3::Tooltip::current(w->fltk3Widget()); } + static Fl_Font font() { return fltk3::Tooltip::font(); } + static void font(Fl_Font i) { fltk3::Tooltip::font(i); } + static Fl_Fontsize size() { return fltk3::Tooltip::size(); } + static void size(Fl_Fontsize s) { fltk3::Tooltip::size(s); } + static Fl_Color color() { return fltk3::Tooltip::color(); } + static void color(Fl_Color c) { fltk3::Tooltip::color(c); } + static Fl_Color textcolor() { return fltk3::Tooltip::textcolor(); } + static void textcolor(Fl_Color c) { fltk3::Tooltip::textcolor(c); } }; #endif Deleted: branches/branch-3.0/fltk3/Fl_Tooltip.H Copied: branches/branch-3.0/fltk3/Tooltip.h (from rev 7370, branches/branch-3.0/fltk3/Fl_Tooltip.H) =================================================================== --- branches/branch-3.0/fltk3/Tooltip.h (rev 0) +++ branches/branch-3.0/fltk3/Tooltip.h 2010-04-01 19:55:03 UTC (rev 7395) @@ -0,0 +1,113 @@ +// +// "$Id: Tooltip.H 6902 2009-09-27 11:06:56Z matt $" +// +// Tooltip header file for the Fast Light Tool Kit (FLTK). +// +// Copyright 1998-2009 by Bill Spitzak and others. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +// USA. +// +// Please report all bugs and problems on the following page: +// +// http://www.fltk.org/str.php +// + +/* \file + Tooltip widget . */ + +#ifndef Fltk3_Tooltip_H +#define Fltk3_Tooltip_H + +#include <fltk3/run.h> +#include <fltk3/Widget.h> + +namespace fltk3 { + +/** + The Tooltip class provides tooltip support for + all FLTK widgets. It contains only static methods. +*/ +class FL_EXPORT Tooltip { +public: + /** Gets the tooltip delay. The default delay is 1.0 seconds. */ + static float delay() { return delay_; } + /** Sets the tooltip delay. The default delay is 1.0 seconds. */ + static void delay(float f) { delay_ = f; } + /** + Gets the tooltip hover delay, the delay between tooltips. + The default delay is 0.2 seconds. + */ + static float hoverdelay() { return hoverdelay_; } + /** + Sets the tooltip hover delay, the delay between tooltips. + The default delay is 0.2 seconds. + */ + static void hoverdelay(float f) { hoverdelay_ = f; } + /** Returns non-zero if tooltips are enabled. */ + static int enabled() { return enabled_; } + /** Enables tooltips on all widgets (or disables if <i>b</i> is false). */ + static void enable(int b = 1) { enabled_ = b;} + /** Same as enable(0), disables tooltips on all widgets. */ + static void disable() { enabled_ = 0; } + static void (*enter)(fltk3::Widget* w); + static void enter_area(fltk3::Widget* w, int X, int Y, int W, int H, const char* tip); + static void (*exit)(fltk3::Widget *w); + /** Gets the current widget target */ + static fltk3::Widget* current() {return widget_;} + static void current(fltk3::Widget*); + + /** Gets the typeface for the tooltip text. */ + static Fl_Font font() { return font_; } + /** Sets the typeface for the tooltip text. */ + static void font(Fl_Font i) { font_ = i; } + /** Gets the size of the tooltip text. */ + static Fl_Fontsize size() { return size_; } + /** Sets the size of the tooltip text. */ + static void size(Fl_Fontsize s) { size_ = s; } + /** Gets the background color for tooltips. The default background color is a pale yellow. */ + static Fl_Color color() { return color_; } + /** Sets the background color for tooltips. The default background color is a pale yellow. */ + static void color(Fl_Color c) { color_ = c; } + /** Gets the color of the text in the tooltip. The default is black. */ + static Fl_Color textcolor() { return textcolor_; } + /** Sets the color of the text in the tooltip. The default is black. */ + static void textcolor(Fl_Color c) { textcolor_ = c; } + + // These should not be public, but fltk3::Widget::tooltip() needs them... + // fabien: made it private with only a friend function access +private: + friend void fltk3::Widget::tooltip(const char *); + static void enter_(fltk3::Widget* w); + static void exit_(fltk3::Widget *w); + +private: + static float delay_; //!< delay before a tooltip is shown + static float hoverdelay_; //!< delay between tooltips + static int enabled_; + static Fl_Color color_; + static Fl_Color textcolor_; + static Fl_Font font_; + static Fl_Fontsize size_; + static fltk3::Widget* widget_; //!< Keeps track of the current target widget +}; + +} + +#endif + +// +// End of "$Id: Tooltip.H 6902 2009-09-27 11:06:56Z matt $". +// Modified: branches/branch-3.0/src/Fl.cxx =================================================================== --- branches/branch-3.0/src/Fl.cxx 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/src/Fl.cxx 2010-04-01 19:55:03 UTC (rev 7395) @@ -34,7 +34,7 @@ #include <fltk3/run.h> #include <fltk3/Window.h> #include <fltk3/x.H> -#include <fltk3/Fl_Tooltip.H> +#include <fltk3/Tooltip.h> #include <ctype.h> #include <stdio.h> #include <stdlib.h> @@ -835,8 +835,8 @@ } static void nothing(fltk3::Widget *) {} -void (*Fl_Tooltip::enter)(fltk3::Widget *) = nothing; -void (*Fl_Tooltip::exit)(fltk3::Widget *) = nothing; +void (*fltk3::Tooltip::enter)(fltk3::Widget *) = nothing; +void (*fltk3::Tooltip::exit)(fltk3::Widget *) = nothing; // Update modal(), focus() and other state according to system state, // and send fltk3::ENTER, fltk3::LEAVE, fltk3::FOCUS, and/or fltk3::UNFOCUS events. @@ -890,7 +890,7 @@ } } else { fltk3::belowmouse(0); - Fl_Tooltip::enter(0); + fltk3::Tooltip::enter(0); } } } @@ -919,9 +919,9 @@ if (o->contains(fltk3::belowmouse())) fltk3::belowmouse_ = 0; if (o->contains(fltk3::focus())) fltk3::focus_ = 0; if (o == fl_xfocus) fl_xfocus = 0; - if (o == Fl_Tooltip::current()) Fl_Tooltip::current(0); + if (o == fltk3::Tooltip::current()) fltk3::Tooltip::current(0); if (o == fl_xmousewin) fl_xmousewin = 0; - Fl_Tooltip::exit(o); + fltk3::Tooltip::exit(o); fl_fix_focus(); } @@ -984,7 +984,7 @@ if (grab()) wi = grab(); else if (modal() && wi != modal()) return 0; pushed_ = wi; - Fl_Tooltip::current(wi); + fltk3::Tooltip::current(wi); if (send(e, wi, window)) return 1; // raise windows that are clicked on: window->show(); @@ -1022,7 +1022,7 @@ #ifdef DEBUG printf("fltk3::handle(e=%d, window=%p);\n", e, window); #endif // DEBUG - Fl_Tooltip::enter(belowmouse()); + fltk3::Tooltip::enter(belowmouse()); } return ret;} @@ -1067,7 +1067,7 @@ printf("fltk3::handle(e=%d, window=%p);\n", e, window); #endif // DEBUG - Fl_Tooltip::enter((fltk3::Widget*)0); + fltk3::Tooltip::enter((fltk3::Widget*)0); fl_xfocus = window; // this should not happen! But maybe it does: @@ -1120,7 +1120,7 @@ fl_xmousewin = window; fl_fix_focus(); - Fl_Tooltip::enter(belowmouse()); + fltk3::Tooltip::enter(belowmouse()); return 1; case fltk3::LEAVE: @@ -1130,7 +1130,7 @@ if (!pushed_) { belowmouse(0); - Fl_Tooltip::enter(0); + fltk3::Tooltip::enter(0); } if (window == fl_xmousewin) {fl_xmousewin = 0; fl_fix_focus();} return 1; @@ -1316,7 +1316,7 @@ break; } // } else if (ev == fltk3::FOCUS || ev == fltk3::UNFOCUS) { -// Fl_Tooltip::exit(Fl_Tooltip::current()); +// fltk3::Tooltip::exit(fltk3::Tooltip::current()); } return fltk3::Group::handle(ev); Modified: branches/branch-3.0/src/Fl_Tabs.cxx =================================================================== --- branches/branch-3.0/src/Fl_Tabs.cxx 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/src/Fl_Tabs.cxx 2010-04-01 19:55:03 UTC (rev 7395) @@ -36,7 +36,7 @@ #include <fltk3/run.h> #include <fltk3/Fl_Tabs.H> #include <fltk3/fl_draw.H> -#include <fltk3/Fl_Tooltip.H> +#include <fltk3/Tooltip.h> #define BORDER 2 #define EXTRASPACE 10 @@ -167,14 +167,14 @@ do_callback(); if (wp.deleted()) return 1; } - Fl_Tooltip::current(o); + fltk3::Tooltip::current(o); } else { push(o); } return 1; case fltk3::MOVE: { int ret = fltk3::Group::handle(event); - fltk3::Widget *o = Fl_Tooltip::current(), *n = o; + fltk3::Widget *o = fltk3::Tooltip::current(), *n = o; int H = tab_height(); if ( (H>=0) && (fltk3::event_y()>y()+H) ) return ret; @@ -185,7 +185,7 @@ if (!n) n = this; } if (n!=o) - Fl_Tooltip::enter(n); + fltk3::Tooltip::enter(n); return ret; } case fltk3::FOCUS: case fltk3::UNFOCUS: Modified: branches/branch-3.0/src/Fl_Tooltip.cxx =================================================================== --- branches/branch-3.0/src/Fl_Tooltip.cxx 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/src/Fl_Tooltip.cxx 2010-04-01 19:55:03 UTC (rev 7395) @@ -25,21 +25,21 @@ // http://www.fltk.org/str.php // -#include <fltk3/Fl_Tooltip.H> +#include <fltk3/Tooltip.h> #include <fltk3/fl_draw.H> #include <fltk3/Fl_Menu_Window.H> #include <stdio.h> -float Fl_Tooltip::delay_ = 1.0f; -float Fl_Tooltip::hoverdelay_ = 0.2f; -int Fl_Tooltip::enabled_ = 1; -Fl_Color Fl_Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1, +float fltk3::Tooltip::delay_ = 1.0f; +float fltk3::Tooltip::hoverdelay_ = 0.2f; +int fltk3::Tooltip::enabled_ = 1; +Fl_Color fltk3::Tooltip::color_ = fl_color_cube(FL_NUM_RED - 1, FL_NUM_GREEN - 1, FL_NUM_BLUE - 2); -Fl_Color Fl_Tooltip::textcolor_ = FL_BLACK; -Fl_Font Fl_Tooltip::font_ = fltk3::HELVETICA; -Fl_Fontsize Fl_Tooltip::size_ = FL_NORMAL_SIZE; +Fl_Color fltk3::Tooltip::textcolor_ = FL_BLACK; +Fl_Font fltk3::Tooltip::font_ = fltk3::HELVETICA; +Fl_Fontsize fltk3::Tooltip::size_ = FL_NORMAL_SIZE; #define MAX_WIDTH 400 @@ -63,12 +63,12 @@ } }; -fltk3::Widget* Fl_Tooltip::widget_ = 0; +fltk3::Widget* fltk3::Tooltip::widget_ = 0; static Fl_TooltipBox *window = 0; static int Y,H; void Fl_TooltipBox::layout() { - fl_font(Fl_Tooltip::font(), Fl_Tooltip::size()); + fl_font(fltk3::Tooltip::font(), fltk3::Tooltip::size()); int ww, hh; ww = MAX_WIDTH; fl_measure(tip, ww, hh, fltk3::ALIGN_LEFT|fltk3::ALIGN_WRAP|fltk3::ALIGN_INSIDE); @@ -77,7 +77,7 @@ // find position on the screen of the widget: int ox = fltk3::event_x_root(); int oy = Y + H+2; - for (fltk3::Widget* p = Fl_Tooltip::current(); p; p = p->window()) { + for (fltk3::Widget* p = fltk3::Tooltip::current(); p; p = p->window()) { oy += p->y(); } int scr_x, scr_y, scr_w, scr_h; @@ -96,9 +96,9 @@ } void Fl_TooltipBox::draw() { - draw_box(fltk3::BORDER_BOX, 0, 0, w(), h(), Fl_Tooltip::color()); - fl_color(Fl_Tooltip::textcolor()); - fl_font(Fl_Tooltip::font(), Fl_Tooltip::size()); + draw_box(fltk3::BORDER_BOX, 0, 0, w(), h(), fltk3::Tooltip::color()); + fl_color(fltk3::Tooltip::textcolor()); + fl_font(fltk3::Tooltip::font(), fltk3::Tooltip::size()); fl_draw(tip, 3, 3, w()-6, h()-6, fltk3::Align(fltk3::ALIGN_LEFT|fltk3::ALIGN_WRAP)); } @@ -145,13 +145,13 @@ <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 + be found do fltk3::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_(fltk3::Widget* w) { +void fltk3::Tooltip::enter_(fltk3::Widget* w) { #ifdef DEBUG - printf("Fl_Tooltip::enter_(w=%p)\n", w); + printf("fltk3::Tooltip::enter_(w=%p)\n", w); printf(" window=%p\n", window); #endif // DEBUG @@ -172,9 +172,9 @@ a modal overlapping window is deleted. FLTK does this automatically when you click the mouse button. */ -void Fl_Tooltip::current(fltk3::Widget* w) { +void fltk3::Tooltip::current(fltk3::Widget* w) { #ifdef DEBUG - printf("Fl_Tooltip::current(w=%p)\n", w); + printf("fltk3::Tooltip::current(w=%p)\n", w); #endif // DEBUG exit_(0); @@ -185,15 +185,15 @@ if (tw->tooltip()) break; tw = tw->parent(); } - // act just like Fl_Tooltip::enter_() except we can remember a zero: + // act just like fltk3::Tooltip::enter_() except we can remember a zero: widget_ = w; } // Hide any visible tooltip. /** This method is called when the mouse pointer leaves a widget. */ -void Fl_Tooltip::exit_(fltk3::Widget *w) { +void fltk3::Tooltip::exit_(fltk3::Widget *w) { #ifdef DEBUG - printf("Fl_Tooltip::exit_(w=%p)\n", w); + printf("fltk3::Tooltip::exit_(w=%p)\n", w); printf(" widget=%p, window=%p\n", widget_, window); #endif // DEBUG @@ -204,7 +204,7 @@ if (window && window->visible()) window->hide(); if (recent_tooltip) { if (fltk3::event_state() & FL_BUTTONS) recent_tooltip = 0; - else fltk3::add_timeout(Fl_Tooltip::hoverdelay(), recent_timeout); + else fltk3::add_timeout(fltk3::Tooltip::hoverdelay(), recent_timeout); } } @@ -223,13 +223,13 @@ 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(fltk3::Widget* wid, int x,int y,int w,int h, const char* t) +void fltk3::Tooltip::enter_area(fltk3::Widget* wid, int x,int y,int w,int h, const char* t) { (void)x; (void)w; #ifdef DEBUG - printf("Fl_Tooltip::enter_area(wid=%p, x=%d, y=%d, w=%d, h=%d, t=\"%s\")\n", + printf("fltk3::Tooltip::enter_area(wid=%p, x=%d, y=%d, w=%d, h=%d, t=\"%s\")\n", wid, x, y, w, h, t ? t : "(null)"); printf(" recursion=%d, window=%p\n", recursion, window); #endif // DEBUG @@ -248,8 +248,8 @@ // popup the tooltip immediately if it was recently up: if (recent_tooltip) { if (window) window->hide(); - fltk3::add_timeout(Fl_Tooltip::hoverdelay(), tooltip_timeout); - } else if (Fl_Tooltip::delay() < .1) { + fltk3::add_timeout(fltk3::Tooltip::hoverdelay(), tooltip_timeout); + } else if (fltk3::Tooltip::delay() < .1) { #ifdef WIN32 // possible fix for the Windows titlebar, it seems to want the // window to be destroyed, moving it messes up the parenting: @@ -258,7 +258,7 @@ tooltip_timeout(0); } else { if (window && window->visible()) window->hide(); - fltk3::add_timeout(Fl_Tooltip::delay(), tooltip_timeout); + fltk3::add_timeout(fltk3::Tooltip::delay(), tooltip_timeout); } #ifdef DEBUG @@ -271,8 +271,8 @@ static char beenhere = 0; if (!beenhere) { beenhere = 1; - Fl_Tooltip::enter = Fl_Tooltip::enter_; - Fl_Tooltip::exit = Fl_Tooltip::exit_; + fltk3::Tooltip::enter = fltk3::Tooltip::enter_; + fltk3::Tooltip::exit = fltk3::Tooltip::exit_; } tooltip_ = tt; } Modified: branches/branch-3.0/src/Fl_Widget.cxx =================================================================== --- branches/branch-3.0/src/Fl_Widget.cxx 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/src/Fl_Widget.cxx 2010-04-01 19:55:03 UTC (rev 7395) @@ -28,7 +28,7 @@ #include <fltk3/run.h> #include <fltk3/Widget.h> #include <fltk3/Group.h> -#include <fltk3/Fl_Tooltip.H> +#include <fltk3/Tooltip.h> #include <fltk3/fl_draw.H> #include <stdlib.h> #include "flstring.h" Modified: branches/branch-3.0/src/Fl_arg.cxx =================================================================== --- branches/branch-3.0/src/Fl_arg.cxx 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/src/Fl_arg.cxx 2010-04-01 19:55:03 UTC (rev 7395) @@ -31,7 +31,7 @@ #include <fltk3/run.h> #include <fltk3/x.H> #include <fltk3/Window.h> -#include <fltk3/Fl_Tooltip.H> +#include <fltk3/Tooltip.h> #include <fltk3/filename.H> #include <fltk3/fl_draw.H> #include <ctype.h> @@ -109,11 +109,11 @@ i++; return 1; } else if (fl_match(s, "tooltips", 2)) { - Fl_Tooltip::enable(); + fltk3::Tooltip::enable(); i++; return 1; } else if (fl_match(s, "notooltips", 3)) { - Fl_Tooltip::disable(); + fltk3::Tooltip::disable(); i++; return 1; } @@ -264,7 +264,7 @@ <LI>-tooltips and -notooltips - <P>Enables or disables tooltips using Fl_Tooltip::enable().</LI> + <P>Enables or disables tooltips using fltk3::Tooltip::enable().</LI> </UL> @@ -306,7 +306,7 @@ strcasecmp(val, "yes") == 0); val = XGetDefault(fl_display, key, "tooltips"); - if (val) Fl_Tooltip::enable(strcasecmp(val, "true") == 0 || + if (val) fltk3::Tooltip::enable(strcasecmp(val, "true") == 0 || strcasecmp(val, "on") == 0 || strcasecmp(val, "yes") == 0); Modified: branches/branch-3.0/src/Fl_cocoa.mm =================================================================== --- branches/branch-3.0/src/Fl_cocoa.mm 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/src/Fl_cocoa.mm 2010-04-01 19:55:03 UTC (rev 7395) @@ -80,7 +80,7 @@ #include <fltk3/run.h> #include <fltk3/x.H> #include <fltk3/Window.h> -#include <fltk3/Fl_Tooltip.H> +#include <fltk3/Tooltip.h> #include <fltk3/Fl_Sys_Menu_Bar.H> #include <fltk3/Fl_Printer.H> #include <fltk3/Fl_Input_.H> @@ -2209,7 +2209,7 @@ if (w->size_range_set) w->size_range_(); if (winlevel != NSMainMenuWindowLevel) { - Fl_Tooltip::enter(0); + fltk3::Tooltip::enter(0); } [cw makeKeyAndOrderFront:nil]; fltk3::first_window(w); @@ -2299,7 +2299,7 @@ } else { labeltype(fltk3::NO_LABEL); } - Fl_Tooltip::exit(this); + fltk3::Tooltip::exit(this); if (!shown() || !i) { Fl_X::make(this); } else { Modified: branches/branch-3.0/src/Fl_mac.cxx =================================================================== --- branches/branch-3.0/src/Fl_mac.cxx 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/src/Fl_mac.cxx 2010-04-01 19:55:03 UTC (rev 7395) @@ -62,7 +62,7 @@ #include <fltk3/run.h> #include <fltk3/x.H> #include <fltk3/Window.h> -#include <fltk3/Fl_Tooltip.H> +#include <fltk3/Tooltip.h> #include <fltk3/Fl_Sys_Menu_Bar.H> #include <stdio.h> #include <stdlib.h> @@ -1010,13 +1010,13 @@ if ( part == inGrow ) { fl_unlock_function(); suppressed = 1; - Fl_Tooltip::current(0L); + fltk3::Tooltip::current(0L); return CallNextEventHandler( nextHandler, event ); // let the OS handle this for us } if ( part != inContent ) { fl_unlock_function(); suppressed = 1; - Fl_Tooltip::current(0L); + fltk3::Tooltip::current(0L); // anything else to here? return CallNextEventHandler( nextHandler, event ); // let the OS handle this for us } @@ -2295,7 +2295,7 @@ if (w->size_range_set) w->size_range_(); if (winclass != kHelpWindowClass) { - Fl_Tooltip::enter(0); + fltk3::Tooltip::enter(0); } if (w->size_range_set) w->size_range_(); ShowWindow(x->xid); @@ -2379,7 +2379,7 @@ } else { labeltype(fltk3::NO_LABEL); } - Fl_Tooltip::exit(this); + fltk3::Tooltip::exit(this); if (!shown() || !i) { Fl_X::make(this); } else { Modified: branches/branch-3.0/src/Fl_win32.cxx =================================================================== --- branches/branch-3.0/src/Fl_win32.cxx 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/src/Fl_win32.cxx 2010-04-01 19:55:03 UTC (rev 7395) @@ -36,7 +36,7 @@ #include <fltk3/Window.h> #include <fltk3/fl_draw.H> #include <fltk3/Enumerations.H> -#include <fltk3/Fl_Tooltip.H> +#include <fltk3/Tooltip.h> #include "flstring.h" #include "Fl_Font.H" #include <stdio.h> @@ -1771,7 +1771,7 @@ } else { labeltype(fltk3::NO_LABEL); } - Fl_Tooltip::exit(this); + fltk3::Tooltip::exit(this); if (!shown()) { // if (can_boxcheat(box())) fl_background_pixel = fl_xpixel(color()); Fl_X::make(this); Modified: branches/branch-3.0/src/Fl_x.cxx =================================================================== --- branches/branch-3.0/src/Fl_x.cxx 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/src/Fl_x.cxx 2010-04-01 19:55:03 UTC (rev 7395) @@ -40,7 +40,7 @@ # include <fltk3/x.H> # include <fltk3/Window.h> # include <fltk3/fl_utf8.h> -# include <fltk3/Fl_Tooltip.H> +# include <fltk3/Tooltip.h> # include <fltk3/fl_draw.H> # include <stdio.h> # include <stdlib.h> @@ -1724,7 +1724,7 @@ } else { labeltype(fltk3::NO_LABEL); } - Fl_Tooltip::exit(this); + fltk3::Tooltip::exit(this); if (!shown()) { fl_open_display(); // Don't set background pixel for double-buffered windows... Modified: branches/branch-3.0/test/buttons.cxx =================================================================== --- branches/branch-3.0/test/buttons.cxx 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/test/buttons.cxx 2010-04-01 19:55:03 UTC (rev 7395) @@ -35,7 +35,7 @@ #include <fltk3/CheckButton.h> #include <fltk3/LightButton.h> #include <fltk3/RoundButton.h> -// fltk123: #include <fltk3/Tooltip.h> +#include <fltk3/Tooltip.h> using namespace fltk3; Modified: branches/branch-3.0/test/buttons1.cxx =================================================================== --- branches/branch-3.0/test/buttons1.cxx 2010-04-01 19:40:22 UTC (rev 7394) +++ branches/branch-3.0/test/buttons1.cxx 2010-04-01 19:55:03 UTC (rev 7395) @@ -35,7 +35,7 @@ #include <FL/Fl_Check_Button.H> #include <FL/Fl_Light_Button.H> #include <FL/Fl_Round_Button.H> -// fltk123: #include <FL/Fl_Tooltip.H> +#include <FL/Fl_Tooltip.H> int main(int argc, char ** argv) { Fl_Window *window = new Fl_Window(320,130); _______________________________________________ fltk-commit mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-commit
