68 void draw(
int,
int,
int,
int,
Fl_Align)
const ;
69 void measure(
int &w,
int &h)
const ;
120 const char *tooltip_;
139 Fl_Widget(
int x,
int y,
int w,
int h,
const char *label=0L);
142 void x(
int v) {x_ = v;}
144 void y(
int v) {y_ = v;}
146 void w(
int v) {w_ = v;}
148 void h(
int v) {h_ = v;}
150 unsigned int flags()
const {
return flags_;}
163 FORCE_POSITION = 1<<4,
165 SHORTCUT_LABEL = 1<<6,
168 VISIBLE_FOCUS = 1<<9,
169 COPIED_LABEL = 1<<10,
170 CLIP_CHILDREN = 1<<11,
172 TOOLTIP_WINDOW = 1<<13,
175 GROUP_RELATIVE = 1<<16,
176 COPIED_TOOLTIP = 1<<17,
178 MAC_USE_ACCENTS_MENU = 1<<19,
179 NEEDS_KEYBOARD = 1<<20,
181 DEIMAGE_BOUND = 1<<22,
182 AUTO_DELETE_USER_DATA = 1<<23,
193 void draw_box()
const;
196 void draw_backdrop()
const;
204 draw_focus(box(), x(), y(), w(), h(), color());
213 draw_focus(t, X, Y, W, H, color());
219 void draw_label()
const;
220 void draw_label(
int,
int,
int,
int)
const;
281 virtual int handle(
int event);
308 if (needs) set_flag(NEEDS_KEYBOARD);
309 else clear_flag(NEEDS_KEYBOARD);
318 return (flags_ & NEEDS_KEYBOARD);
353 int x()
const {
return x_;}
358 int y()
const {
return y_;}
363 int w()
const {
return w_;}
368 int h()
const {
return h_;}
389 virtual void resize(
int x,
int y,
int w,
int h);
392 int damage_resize(
int,
int,
int,
int);
410 void size(
int W,
int H) {resize(x_,y_,W,H);}
503 void label(
const char* text);
515 void copy_label(
const char *new_label);
634 void bind_image(
int f) {
if (f) set_flag(IMAGE_BOUND);
else clear_flag(IMAGE_BOUND); }
641 int image_bound()
const {
return ((flags_ & IMAGE_BOUND) ? 1 : 0);}
686 void bind_deimage(
int f) {
if (f) set_flag(DEIMAGE_BOUND);
else clear_flag(DEIMAGE_BOUND); }
692 const char *
tooltip()
const {
return tooltip_;}
694 void tooltip(
const char *text);
695 void copy_tooltip(
const char *text);
722 user_data(p, auto_free);
756 void user_data(
void* v);
833 unsigned int visible()
const {
return !(flags_&INVISIBLE);}
839 int visible_r()
const;
881 unsigned int active()
const {
return !(flags_&INACTIVE);}
887 int active_r()
const;
920 unsigned int output()
const {
return (flags_&OUTPUT);}
937 unsigned int takesevents()
const {
return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));}
957 unsigned int changed()
const {
return flags_ & CHANGED;}
1008 void visible_focus(
int v) {
if (v) set_visible_focus();
else clear_visible_focus(); }
1036 static void default_callback(
Fl_Widget *widget,
void *data);
1060 do_callback(widget, (
void*)(
fl_intptr_t)arg, reason);
1066 int test_shortcut();
1068 static unsigned int label_shortcut(
const char *t);
1070 static int test_shortcut(
const char*,
const bool require_alt =
false);
1072 void _set_fullscreen() {flags_ |= FULLSCREEN;}
1073 void _clear_fullscreen() {flags_ &= ~FULLSCREEN;}
1080 int contains(
const Fl_Widget *w)
const ;
1099 void redraw_label();
1128 void damage(
uchar c);
1136 void damage(
uchar c,
int x,
int y,
int w,
int h);
1138 void draw_label(
int,
int,
int,
int,
Fl_Align)
const;
1151 Fl_Window* top_window_offset(
int& xoff,
int& yoff)
const;
1177 virtual Fl_Group const* as_group()
const {
return NULL; }
1192 virtual Fl_Window const* as_window()
const {
return NULL; }
1205 virtual class Fl_Gl_Window const* as_gl_window()
const {
return NULL; }
1234 set_flag(SHORTCUT_LABEL);
1236 clear_flag(SHORTCUT_LABEL);
1249#define FL_RESERVED_TYPE 100
int Fl_Font
A font number is an index into the internal font table.
Definition Enumerations.H:1044
unsigned Fl_Align
FLTK type for alignment control.
Definition Enumerations.H:967
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition Enumerations.H:1101
Fl_Labeltype
The labeltype() method sets the type of the label.
Definition Enumerations.H:816
int Fl_Fontsize
Size of a font in pixels.
Definition Enumerations.H:1073
Fl_When
These constants determine when a callback is performed.
Definition Enumerations.H:426
Fl_Boxtype
FLTK standard box types.
Definition Enumerations.H:626
Fl_Callback_Reason
These constants describe why a callback is performed.
Definition Enumerations.H:446
@ FL_REASON_UNKNOWN
unknown or unset reason
Definition Enumerations.H:447
A class prototype that allows for additional data in callbacks.
Definition Fl_Widget.H:86
The Fl_Gl_Window widget sets things up so OpenGL works.
Definition Fl_Gl_Window.H:56
The Fl_Group class is the FLTK container widget.
Definition Fl_Group.H:56
Base class for image caching, scaling and drawing.
Definition Fl_Image.H:60
This widget produces an actual window.
Definition Fl_Window.H:55
unsigned char uchar
unsigned char
Definition fl_types.h:30
This struct stores all information for a text or mixed graphics label.
Definition Fl_Widget.H:49
uchar type
type of label.
Definition Fl_Widget.H:65
Fl_Image * deimage
optional image for a deactivated label
Definition Fl_Widget.H:55
void measure(int &w, int &h) const
Measures the size of the label.
Definition fl_labeltype.cxx:92
Fl_Fontsize size
size of label font
Definition Fl_Widget.H:59
const char * value
label text
Definition Fl_Widget.H:51
Fl_Align align_
alignment of label
Definition Fl_Widget.H:63
Fl_Color color
text color
Definition Fl_Widget.H:61
Fl_Image * image
optional image for an active label
Definition Fl_Widget.H:53
Fl_Font font
label font used in text
Definition Fl_Widget.H:57