fltk  1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
  Fossies Dox: fltk-1.3.5-source.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

Fl_Tooltip.H
Go to the documentation of this file.
1 //
2 // "$Id$"
3 //
4 // Tooltip header file for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2011 by Bill Spitzak and others.
7 //
8 // This library is free software. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
18 
19 /* \file
20  Fl_Tooltip widget . */
21 
22 #ifndef Fl_Tooltip_H
23 #define Fl_Tooltip_H
24 
25 #include <FL/Fl.H>
26 #include <FL/Fl_Widget.H>
27 
37 public:
39  static float delay() { return delay_; }
41  static void delay(float f) { delay_ = f; }
46  static float hoverdelay() { return hoverdelay_; }
51  static void hoverdelay(float f) { hoverdelay_ = f; }
53  static int enabled() { return Fl::option(Fl::OPTION_SHOW_TOOLTIPS); }
55  static void enable(int b = 1) { Fl::option(Fl::OPTION_SHOW_TOOLTIPS, (b!=0));}
57  static void disable() { enable(0); }
58  static void (*enter)(Fl_Widget* w);
59  static void enter_area(Fl_Widget* w, int X, int Y, int W, int H, const char* tip);
60  static void (*exit)(Fl_Widget *w);
62  static Fl_Widget* current() {return widget_;}
63  static void current(Fl_Widget*);
64 
66  static Fl_Font font() { return font_; }
68  static void font(Fl_Font i) { font_ = i; }
70  static Fl_Fontsize size() { return (size_ == -1 ? FL_NORMAL_SIZE : size_); }
72  static void size(Fl_Fontsize s) { size_ = s; }
74  static Fl_Color color() { return color_; }
76  static void color(Fl_Color c) { color_ = c; }
78  static Fl_Color textcolor() { return textcolor_; }
80  static void textcolor(Fl_Color c) { textcolor_ = c; }
81 #if FLTK_ABI_VERSION >= 10301
82 
83  static int margin_width() { return margin_width_; }
85  static void margin_width(int v) { margin_width_ = v; }
87  static int margin_height() { return margin_height_; }
89  static void margin_height(int v) { margin_height_ = v; }
91  static int wrap_width() { return wrap_width_; }
93  static void wrap_width(int v) { wrap_width_ = v; }
94 #else
95  static int margin_width() { return 3; }
96  static int margin_height() { return 3; }
97  static int wrap_width() { return 400; }
98 #endif
99 
100 #ifdef __APPLE__
101  // the unique tooltip window
102  static Fl_Window* current_window(void);
103 #endif
104 
105  // These should not be public, but Fl_Widget::tooltip() needs them...
106  // fabien: made it private with only a friend function access
107 private:
108  friend void Fl_Widget::tooltip(const char *);
109  friend void Fl_Widget::copy_tooltip(const char *);
110  static void enter_(Fl_Widget* w);
111  static void exit_(Fl_Widget *w);
112  static void set_enter_exit_once_();
113 
114 private:
115  static float delay_;
116  static float hoverdelay_;
117  static Fl_Color color_;
119  static Fl_Font font_;
121  static Fl_Widget* widget_;
122 #if FLTK_ABI_VERSION >= 10301
123  static int margin_width_;
124  static int margin_height_;
125  static int wrap_width_;
126 #endif
127 };
128 
129 #endif
130 
131 //
132 // End of "$Id$".
133 //
Fl_Widget.H
Fl_Tooltip::wrap_width
static int wrap_width()
Definition: Fl_Tooltip.H:97
Fl_Tooltip::enabled
static int enabled()
Definition: Fl_Tooltip.H:53
Fl.H
Fl_Tooltip::widget_
static Fl_Widget * widget_
Keeps track of the current target widget.
Definition: Fl_Tooltip.H:121
Fl_Color
unsigned int Fl_Color
Definition: Enumerations.H:934
Fl_Tooltip::hoverdelay
static void hoverdelay(float f)
Definition: Fl_Tooltip.H:51
Fl_Tooltip::textcolor
static Fl_Color textcolor()
Definition: Fl_Tooltip.H:78
H
static int H
Definition: Fl_Tooltip.cxx:76
Fl_Tooltip::delay
static void delay(float f)
Definition: Fl_Tooltip.H:41
Fl_Tooltip::color
static Fl_Color color()
Definition: Fl_Tooltip.H:74
b
long b
Definition: jpegint.h:397
FL_EXPORT
#define FL_EXPORT
Definition: Fl_Export.H:35
Fl::OPTION_SHOW_TOOLTIPS
Definition: Fl.H:220
Fl_Tooltip::size
static void size(Fl_Fontsize s)
Definition: Fl_Tooltip.H:72
Fl_Tooltip::size
static Fl_Fontsize size()
Definition: Fl_Tooltip.H:70
tip
static const char * tip
Definition: Fl_Tooltip.cxx:40
Fl_Tooltip::color_
static Fl_Color color_
Definition: Fl_Tooltip.H:117
Fl_Tooltip::color
static void color(Fl_Color c)
Definition: Fl_Tooltip.H:76
Fl_Tooltip::size_
static Fl_Fontsize size_
Definition: Fl_Tooltip.H:120
Fl_Tooltip::font
static void font(Fl_Font i)
Definition: Fl_Tooltip.H:68
Fl::option
static bool option(Fl_Option opt)
FLTK library options management.
Definition: Fl.cxx:2182
Fl_Tooltip::margin_height
static int margin_height()
Definition: Fl_Tooltip.H:96
Fl_Tooltip::font
static Fl_Font font()
Definition: Fl_Tooltip.H:66
Fl_Window
Definition: Fl_Window.H:57
Fl_Tooltip::textcolor
static void textcolor(Fl_Color c)
Definition: Fl_Tooltip.H:80
Fl_Fontsize
int Fl_Fontsize
Definition: Enumerations.H:906
Fl_Tooltip::enable
static void enable(int b=1)
Definition: Fl_Tooltip.H:55
FL_NORMAL_SIZE
Fl_Fontsize FL_NORMAL_SIZE
normal font size
Definition: Fl_Widget.cxx:117
Fl_Widget
Definition: Fl_Widget.H:101
Fl_Tooltip::current
static Fl_Widget * current()
Definition: Fl_Tooltip.H:62
Fl_Tooltip::hoverdelay
static float hoverdelay()
Definition: Fl_Tooltip.H:46
Fl_Tooltip::disable
static void disable()
Definition: Fl_Tooltip.H:57
Fl_Font
int Fl_Font
Definition: Enumerations.H:877
Fl_Tooltip::delay
static float delay()
Definition: Fl_Tooltip.H:39
Fl_Tooltip
Definition: Fl_Tooltip.H:36
Fl_Widget::tooltip
const char * tooltip() const
Definition: Fl_Widget.H:552
Fl_Widget::copy_tooltip
void copy_tooltip(const char *text)
Definition: Fl_Tooltip.cxx:365
f
Fl_Box_Draw_F * f
Definition: fl_boxtype.cxx:285
Fl_Tooltip::margin_width
static int margin_width()
Definition: Fl_Tooltip.H:95
Y
static int Y
Definition: Fl_Tooltip.cxx:76
Fl_Tooltip::hoverdelay_
static float hoverdelay_
delay between tooltips
Definition: Fl_Tooltip.H:116
Fl_Tooltip::font_
static Fl_Font font_
Definition: Fl_Tooltip.H:119
Fl_Tooltip::delay_
static float delay_
delay before a tooltip is shown
Definition: Fl_Tooltip.H:115
Fl_Tooltip::textcolor_
static Fl_Color textcolor_
Definition: Fl_Tooltip.H:118