00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef Fl_Tooltip_H
00032 #define Fl_Tooltip_H
00033
00034 #include <FL/Fl.H>
00035 #include <FL/Fl_Widget.H>
00036
00041 class FL_EXPORT Fl_Tooltip {
00042 public:
00044 static float delay() { return delay_; }
00046 static void delay(float f) { delay_ = f; }
00051 static float hoverdelay() { return hoverdelay_; }
00056 static void hoverdelay(float f) { hoverdelay_ = f; }
00058 static int enabled() { return Fl::option(Fl::OPTION_SHOW_TOOLTIPS); }
00060 static void enable(int b = 1) { Fl::option(Fl::OPTION_SHOW_TOOLTIPS, b);}
00062 static void disable() { enable(0); }
00063 static void (*enter)(Fl_Widget* w);
00064 static void enter_area(Fl_Widget* w, int X, int Y, int W, int H, const char* tip);
00065 static void (*exit)(Fl_Widget *w);
00067 static Fl_Widget* current() {return widget_;}
00068 static void current(Fl_Widget*);
00069
00071 static Fl_Font font() { return font_; }
00073 static void font(Fl_Font i) { font_ = i; }
00075 static Fl_Fontsize size() { return size_; }
00077 static void size(Fl_Fontsize s) { size_ = s; }
00079 static Fl_Color color() { return color_; }
00081 static void color(Fl_Color c) { color_ = c; }
00083 static Fl_Color textcolor() { return textcolor_; }
00085 static void textcolor(Fl_Color c) { textcolor_ = c; }
00086 #ifdef __APPLE__
00087
00088 static Fl_Window* current_window(void);
00089 #endif
00090
00091
00092
00093 private:
00094 friend void Fl_Widget::tooltip(const char *);
00095 friend void Fl_Widget::copy_tooltip(const char *);
00096 static void enter_(Fl_Widget* w);
00097 static void exit_(Fl_Widget *w);
00098 static void set_enter_exit_once_();
00099
00100 private:
00101 static float delay_;
00102 static float hoverdelay_;
00103 static Fl_Color color_;
00104 static Fl_Color textcolor_;
00105 static Fl_Font font_;
00106 static Fl_Fontsize size_;
00107 static Fl_Widget* widget_;
00108 };
00109
00110 #endif
00111
00112
00113
00114