FLTK 1.3.2
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
Fl_Tooltip.H
1
//
2
// "$Id: Fl_Tooltip.H 9706 2012-11-06 20:46:14Z matt $"
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
36
class
FL_EXPORT
Fl_Tooltip
{
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_;
118
static
Fl_Color
textcolor_;
119
static
Fl_Font
font_;
120
static
Fl_Fontsize
size_;
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: Fl_Tooltip.H 9706 2012-11-06 20:46:14Z matt $".
133
//
© 1998-2012 by Bill Spitzak and others.