FLTK 1.4.0
Loading...
Searching...
No Matches
Fl_Widget.H
Go to the documentation of this file.
1//
2// Widget header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2024 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
22#ifndef Fl_Widget_H
23#define Fl_Widget_H
24
25#include "Fl.H"
26
27class Fl_Widget;
28class Fl_Window;
29class Fl_Group;
30class Fl_Image;
31
33typedef void (Fl_Callback )(Fl_Widget*, void*);
35typedef Fl_Callback* Fl_Callback_p; // needed for BORLAND
37typedef void (Fl_Callback0)(Fl_Widget*);
39typedef void (Fl_Callback1)(Fl_Widget*, long);
40
49struct FL_EXPORT Fl_Label {
51 const char* value;
66
68 void draw(int,int,int,int, Fl_Align) const ;
69 void measure(int &w, int &h) const ;
70};
71
72
87public:
88 virtual ~Fl_Callback_User_Data() { }
89};
90
91
104class FL_EXPORT Fl_Widget {
105 friend class Fl_Group;
106
107 Fl_Group* parent_;
108 Fl_Callback* callback_;
109 void* user_data_;
110 int x_,y_,w_,h_;
111 Fl_Label label_;
112 unsigned int flags_;
113 Fl_Color color_;
114 Fl_Color color2_;
115 uchar type_;
116 uchar damage_;
117 uchar box_;
118 uchar when_;
119
120 const char *tooltip_;
121
123 Fl_Widget(const Fl_Widget &);
125 Fl_Widget& operator=(const Fl_Widget &);
126
127protected:
128
139 Fl_Widget(int x, int y, int w, int h, const char *label=0L);
140
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_;}
152 void set_flag(unsigned int c) {flags_ |= c;}
154 void clear_flag(unsigned int c) {flags_ &= ~c;}
158 enum {
159 INACTIVE = 1<<0,
160 INVISIBLE = 1<<1,
161 OUTPUT = 1<<2,
162 NOBORDER = 1<<3,
163 FORCE_POSITION = 1<<4,
164 NON_MODAL = 1<<5,
165 SHORTCUT_LABEL = 1<<6,
166 CHANGED = 1<<7,
167 OVERRIDE = 1<<8,
168 VISIBLE_FOCUS = 1<<9,
169 COPIED_LABEL = 1<<10,
170 CLIP_CHILDREN = 1<<11,
171 MENU_WINDOW = 1<<12,
172 TOOLTIP_WINDOW = 1<<13,
173 MODAL = 1<<14,
174 NO_OVERLAY = 1<<15,
175 GROUP_RELATIVE = 1<<16,
176 COPIED_TOOLTIP = 1<<17,
177 FULLSCREEN = 1<<18,
178 MAC_USE_ACCENTS_MENU = 1<<19,
179 NEEDS_KEYBOARD = 1<<20,
180 IMAGE_BOUND = 1<<21,
181 DEIMAGE_BOUND = 1<<22,
182 AUTO_DELETE_USER_DATA = 1<<23,
183 MAXIMIZED = 1<<24,
184 POPUP = 1<<25,
185 // Note to devs: add new FLTK core flags above this line (up to 1<<28).
186
187 // Three more flags, reserved for user code
188
189 USERFLAG3 = 1<<29,
190 USERFLAG2 = 1<<30,
191 USERFLAG1 = 1<<31
192 };
193 void draw_box() const;
194 void draw_box(Fl_Boxtype t, Fl_Color c) const;
195 void draw_box(Fl_Boxtype t, int x,int y,int w,int h, Fl_Color c) const;
196 void draw_backdrop() const;
197
203 void draw_focus() const {
204 draw_focus(box(), x(), y(), w(), h(), color());
205 }
206
212 void draw_focus(Fl_Boxtype t, int X, int Y, int W, int H) const {
213 draw_focus(t, X, Y, W, H, color());
214
215 }
216 // See documentation in Fl_Widget.cxx
217 void draw_focus(Fl_Boxtype t, int x, int y, int w, int h, Fl_Color bg) const;
218
219 void draw_label() const;
220 void draw_label(int, int, int, int) const;
221
222public:
223
232 virtual ~Fl_Widget();
233
250 virtual void draw() = 0;
251
281 virtual int handle(int event);
282
291 int is_label_copied() const {return ((flags_ & COPIED_LABEL) ? 1 : 0);}
292
307 void needs_keyboard(bool needs) {
308 if (needs) set_flag(NEEDS_KEYBOARD);
309 else clear_flag(NEEDS_KEYBOARD);
310 }
311
317 bool needs_keyboard() const {
318 return (flags_ & NEEDS_KEYBOARD);
319 }
320
326 Fl_Group* parent() const {return parent_;}
327
336 void parent(Fl_Group* p) {parent_ = p;} // for hacks only, use Fl_Group::add()
337
343 uchar type() const {return type_;}
344
348 void type(uchar t) {type_ = t;}
349
353 int x() const {return x_;}
354
358 int y() const {return y_;}
359
363 int w() const {return w_;}
364
368 int h() const {return h_;}
369
389 virtual void resize(int x, int y, int w, int h);
390
392 int damage_resize(int,int,int,int);
393
401 void position(int X,int Y) {resize(X,Y,w_,h_);}
402
410 void size(int W,int H) {resize(x_,y_,W,H);}
411
417 Fl_Align align() const {return label_.align_;}
418
426 void align(Fl_Align alignment) {label_.align_ = alignment;}
427
432 Fl_Boxtype box() const {return (Fl_Boxtype)box_;}
433
441 void box(Fl_Boxtype new_box) {box_ = new_box;}
442
447 Fl_Color color() const {return color_;}
448
459 void color(Fl_Color bg) {color_ = bg;}
460
465 Fl_Color selection_color() const {return color2_;}
466
475 void selection_color(Fl_Color a) {color2_ = a;}
476
484 void color(Fl_Color bg, Fl_Color sel) {color_=bg; color2_=sel;}
485
490 const char* label() const {return label_.value;}
491
503 void label(const char* text);
504
515 void copy_label(const char *new_label);
516
520 void label(Fl_Labeltype a, const char* b) {label_.type = a; label_.value = b;}
521
526 Fl_Labeltype labeltype() const {return (Fl_Labeltype)label_.type;}
527
536 void labeltype(Fl_Labeltype a) {label_.type = a;}
537
542 Fl_Color labelcolor() const {return label_.color;}
543
548 void labelcolor(Fl_Color c) {label_.color=c;}
549
557 Fl_Font labelfont() const {return label_.font;}
558
566 void labelfont(Fl_Font f) {label_.font=f;}
567
572 Fl_Fontsize labelsize() const {return label_.size;}
573
578 void labelsize(Fl_Fontsize pix) {label_.size=pix;}
579
583 Fl_Image* image() {return label_.image;}
584
588 const Fl_Image* image() const {return label_.image;}
589
605 void image(Fl_Image* img);
606
611 void image(Fl_Image& img);
612
628 void bind_image(Fl_Image* img);
629
634 void bind_image(int f) { if (f) set_flag(IMAGE_BOUND); else clear_flag(IMAGE_BOUND); }
635
641 int image_bound() const {return ((flags_ & IMAGE_BOUND) ? 1 : 0);}
642
646 Fl_Image* deimage() {return label_.deimage;}
647
651 const Fl_Image* deimage() const {return label_.deimage;}
652
659 void deimage(Fl_Image* img);
660
665 void deimage(Fl_Image& img);
666
673 void bind_deimage(Fl_Image* img);
674
680 int deimage_bound() const {return ((flags_ & DEIMAGE_BOUND) ? 1 : 0);}
681
686 void bind_deimage(int f) { if (f) set_flag(DEIMAGE_BOUND); else clear_flag(DEIMAGE_BOUND); }
687
692 const char *tooltip() const {return tooltip_;}
693
694 void tooltip(const char *text); // see Fl_Tooltip
695 void copy_tooltip(const char *text); // see Fl_Tooltip
696
701 Fl_Callback_p callback() const {return callback_;}
702
708 void callback(Fl_Callback* cb, void* p) {
709 callback_ = cb;
710 user_data(p);
711 }
712
720 void callback(Fl_Callback* cb, Fl_Callback_User_Data* p, bool auto_free) {
721 callback_ = cb;
722 user_data(p, auto_free);
723 }
724
729 void callback(Fl_Callback* cb) {callback_ = cb;}
730
736 callback_ = (Fl_Callback*)(fl_intptr_t)(cb);
737 }
738
744 void callback(Fl_Callback1* cb, long p = 0) {
745 callback_ = (Fl_Callback*)(fl_intptr_t)(cb);
746 user_data((void*)(fl_intptr_t)p);
747 }
748
753 void* user_data() const {return user_data_;}
754
756 void user_data(void* v);
757
759 void user_data(Fl_Callback_User_Data* v, bool auto_free);
760
772 long argument() const {return (long)(fl_intptr_t)user_data_;}
773
778 void argument(long v) {user_data((void*)(fl_intptr_t)v);}
779
788 Fl_When when() const {return (Fl_When)when_;}
789
827 void when(uchar i) {when_ = i;}
828
833 unsigned int visible() const {return !(flags_&INVISIBLE);}
834
839 int visible_r() const;
840
858 virtual void show();
859
863 virtual void hide();
864
869 void set_visible() {flags_ &= ~INVISIBLE;}
870
875 void clear_visible() {flags_ |= INVISIBLE;}
876
881 unsigned int active() const {return !(flags_&INACTIVE);}
882
887 int active_r() const;
888
894 void activate();
895
910 void deactivate();
911
920 unsigned int output() const {return (flags_&OUTPUT);}
921
925 void set_output() {flags_ |= OUTPUT;}
926
930 void clear_output() {flags_ &= ~OUTPUT;}
931
937 unsigned int takesevents() const {return !(flags_&(INACTIVE|INVISIBLE|OUTPUT));}
938
957 unsigned int changed() const {return flags_ & CHANGED;}
958
962 void set_changed() {flags_ |= CHANGED;}
963
967 void clear_changed() {flags_ &= ~CHANGED;}
968
973 void clear_active() {flags_ |= INACTIVE;}
974
979 void set_active() {flags_ &= ~INACTIVE;}
980
988 int take_focus();
989
996 void set_visible_focus() { flags_ |= VISIBLE_FOCUS; }
997
1002 void clear_visible_focus() { flags_ &= ~VISIBLE_FOCUS; }
1003
1008 void visible_focus(int v) { if (v) set_visible_focus(); else clear_visible_focus(); }
1009
1014 unsigned int visible_focus() const { return flags_ & VISIBLE_FOCUS; }
1015
1036 static void default_callback(Fl_Widget *widget, void *data);
1037
1050 void do_callback(Fl_Callback_Reason reason=FL_REASON_UNKNOWN) {do_callback(this, user_data_, reason);}
1051
1060 do_callback(widget, (void*)(fl_intptr_t)arg, reason);
1061 }
1062
1063 void do_callback(Fl_Widget *widget, void *arg = 0, Fl_Callback_Reason reason=FL_REASON_UNKNOWN);
1064
1065 /* Internal use only. */
1066 int test_shortcut();
1067 /* Internal use only. */
1068 static unsigned int label_shortcut(const char *t);
1069 /* Internal use only. */
1070 static int test_shortcut(const char*, const bool require_alt = false);
1071 /* Internal use only. */
1072 void _set_fullscreen() {flags_ |= FULLSCREEN;}
1073 void _clear_fullscreen() {flags_ &= ~FULLSCREEN;}
1074
1080 int contains(const Fl_Widget *w) const ;
1081
1088 int inside(const Fl_Widget *wgt) const {return wgt ? wgt->contains(this) : 0;}
1089
1093 void redraw();
1094
1099 void redraw_label();
1100
1107 uchar damage() const {return damage_;}
1108
1121 void clear_damage(uchar c = 0) {damage_ = c;}
1122
1128 void damage(uchar c);
1129
1136 void damage(uchar c, int x, int y, int w, int h);
1137
1138 void draw_label(int, int, int, int, Fl_Align) const;
1139
1147 void measure_label(int& ww, int& hh) const {label_.measure(ww, hh);}
1148
1149 Fl_Window* window() const ;
1150 Fl_Window* top_window() const;
1151 Fl_Window* top_window_offset(int& xoff, int& yoff) const;
1152
1176 virtual Fl_Group* as_group() { return NULL; }
1177 virtual Fl_Group const* as_group() const { return NULL; }
1178
1191 virtual Fl_Window* as_window() { return 0; }
1192 virtual Fl_Window const* as_window() const { return NULL; }
1193
1204 virtual class Fl_Gl_Window* as_gl_window() { return NULL; }
1205 virtual class Fl_Gl_Window const* as_gl_window() const { return NULL; }
1206
1209 int use_accents_menu() { return flags() & MAC_USE_ACCENTS_MENU; }
1210
1214 Fl_Color color2() const {return (Fl_Color)color2_;}
1215
1219 void color2(unsigned a) {color2_ = a;}
1220
1232 void shortcut_label(int value) {
1233 if (value)
1234 set_flag(SHORTCUT_LABEL);
1235 else
1236 clear_flag(SHORTCUT_LABEL);
1237 }
1238
1241 int shortcut_label() const { return flags_ & SHORTCUT_LABEL; }
1242};
1243
1249#define FL_RESERVED_TYPE 100
1250
1251#endif
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
Fl static class.
void() Fl_Callback1(Fl_Widget *, long)
Callback type definition passing the widget and a long data value.
Definition Fl_Widget.H:39
void() Fl_Callback(Fl_Widget *, void *)
Default callback type definition for all fltk widgets (by far the most used)
Definition Fl_Widget.H:33
void() Fl_Callback0(Fl_Widget *)
One parameter callback type definition passing only the widget.
Definition Fl_Widget.H:37
Fl_Callback * Fl_Callback_p
Default callback type pointer definition for all fltk widgets.
Definition Fl_Widget.H:35
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
Fl_Widget is the base class for all widgets in FLTK.
Definition Fl_Widget.H:104
Fl_Color labelcolor() const
Gets the label color.
Definition Fl_Widget.H:542
void shortcut_label(int value)
Sets whether the widget's label uses '&' to indicate shortcuts.
Definition Fl_Widget.H:1232
const Fl_Image * deimage() const
Gets the image that is used as part of the widget label when in the inactive state.
Definition Fl_Widget.H:651
virtual class Fl_Gl_Window * as_gl_window()
Returns an Fl_Gl_Window pointer if this widget is an Fl_Gl_Window.
Definition Fl_Widget.H:1204
Fl_Font labelfont() const
Gets the font to use.
Definition Fl_Widget.H:557
Fl_Color color() const
Gets the background color of the widget.
Definition Fl_Widget.H:447
void clear_visible()
Hides the widget.
Definition Fl_Widget.H:875
virtual void draw()=0
Draws the widget.
long argument() const
Gets the current user data (long) argument that is passed to the callback function.
Definition Fl_Widget.H:772
int shortcut_label() const
Returns whether the widget's label uses '&' to indicate shortcuts.
Definition Fl_Widget.H:1241
int inside(const Fl_Widget *wgt) const
Checks if this widget is a child of wgt.
Definition Fl_Widget.H:1088
int contains(const Fl_Widget *w) const
Checks if w is a child of this widget.
Definition Fl_Widget.cxx:299
void draw_focus(Fl_Boxtype t, int X, int Y, int W, int H) const
Draws a focus rectangle around the widget.
Definition Fl_Widget.H:212
void bind_image(int f)
Bind the image to the widget, so the widget will delete the image when it is no longer needed.
Definition Fl_Widget.H:634
void callback(Fl_Callback *cb)
Sets the current callback function for the widget.
Definition Fl_Widget.H:729
Fl_Image * deimage()
Gets the image that is used as part of the widget label when in the inactive state.
Definition Fl_Widget.H:646
void argument(long v)
Sets the current user data (long) argument that is passed to the callback function.
Definition Fl_Widget.H:778
void clear_output()
Sets a widget to accept input.
Definition Fl_Widget.H:930
int is_label_copied() const
Returns whether the current label was assigned with copy_label().
Definition Fl_Widget.H:291
void box(Fl_Boxtype new_box)
Sets the box type for the widget.
Definition Fl_Widget.H:441
const char * label() const
Gets the current label text.
Definition Fl_Widget.H:490
int y() const
Gets the widget position in its window.
Definition Fl_Widget.H:358
void clear_visible_focus()
Disables keyboard focus navigation with this widget.
Definition Fl_Widget.H:1002
int h() const
Gets the widget height.
Definition Fl_Widget.H:368
void color(Fl_Color bg, Fl_Color sel)
Sets the background and selection color of the widget.
Definition Fl_Widget.H:484
unsigned int flags() const
Gets the widget flags mask.
Definition Fl_Widget.H:150
void visible_focus(int v)
Modifies keyboard focus navigation.
Definition Fl_Widget.H:1008
Fl_Align align() const
Gets the label alignment.
Definition Fl_Widget.H:417
void parent(Fl_Group *p)
Internal use only - "for hacks only".
Definition Fl_Widget.H:336
virtual Fl_Group * as_group()
Returns an Fl_Group pointer if this widget is an Fl_Group.
Definition Fl_Widget.H:1176
void set_flag(unsigned int c)
Sets a flag in the flags mask.
Definition Fl_Widget.H:152
const char * tooltip() const
Gets the current tooltip text.
Definition Fl_Widget.H:692
void color(Fl_Color bg)
Sets the background color of the widget.
Definition Fl_Widget.H:459
void do_callback(Fl_Widget *widget, long arg, Fl_Callback_Reason reason=FL_REASON_UNKNOWN)
Calls the widget callback function with arbitrary arguments.
Definition Fl_Widget.H:1059
void align(Fl_Align alignment)
Sets the label alignment.
Definition Fl_Widget.H:426
void set_changed()
Marks the value of the widget as changed.
Definition Fl_Widget.H:962
void set_visible()
Makes the widget visible.
Definition Fl_Widget.H:869
void measure_label(int &ww, int &hh) const
Sets width ww and height hh accordingly with the label size.
Definition Fl_Widget.H:1147
void callback(Fl_Callback1 *cb, long p=0)
Sets the current callback function for the widget.
Definition Fl_Widget.H:744
int deimage_bound() const
Returns whether the inactive image is managed by the widget.
Definition Fl_Widget.H:680
void clear_active()
Marks the widget as inactive without sending events or changing focus.
Definition Fl_Widget.H:973
void labeltype(Fl_Labeltype a)
Sets the label type.
Definition Fl_Widget.H:536
void set_output()
Sets a widget to output only.
Definition Fl_Widget.H:925
void * user_data() const
Gets the user data for this widget.
Definition Fl_Widget.H:753
void labelsize(Fl_Fontsize pix)
Sets the font size in pixels.
Definition Fl_Widget.H:578
int w() const
Gets the widget width.
Definition Fl_Widget.H:363
Fl_Boxtype box() const
Gets the box type of the widget.
Definition Fl_Widget.H:432
Fl_Fontsize labelsize() const
Gets the font size in pixels.
Definition Fl_Widget.H:572
Fl_Color selection_color() const
Gets the selection color.
Definition Fl_Widget.H:465
void bind_deimage(int f)
Bind the inactive image to the widget, so the widget will delete the image when it is no longer neede...
Definition Fl_Widget.H:686
void label(Fl_Labeltype a, const char *b)
Shortcut to set the label text and type in one call.
Definition Fl_Widget.H:520
void labelcolor(Fl_Color c)
Sets the label color.
Definition Fl_Widget.H:548
virtual Fl_Window * as_window()
Returns an Fl_Window pointer if this widget is an Fl_Window.
Definition Fl_Widget.H:1191
void callback(Fl_Callback0 *cb)
Sets the current callback function for the widget.
Definition Fl_Widget.H:735
void selection_color(Fl_Color a)
Sets the selection color.
Definition Fl_Widget.H:475
void clear_changed()
Marks the value of the widget as unchanged.
Definition Fl_Widget.H:967
Fl_Labeltype labeltype() const
Gets the label type.
Definition Fl_Widget.H:526
void x(int v)
Internal use only.
Definition Fl_Widget.H:142
unsigned int visible() const
Returns whether a widget is visible.
Definition Fl_Widget.H:833
unsigned int output() const
Returns if a widget is used for output only.
Definition Fl_Widget.H:920
Fl_Callback_p callback() const
Gets the current callback function for the widget.
Definition Fl_Widget.H:701
void position(int X, int Y)
Repositions the window or widget.
Definition Fl_Widget.H:401
void when(uchar i)
Sets the flags used to decide when a callback is called.
Definition Fl_Widget.H:827
Fl_Group * parent() const
Returns a pointer to the parent widget.
Definition Fl_Widget.H:326
const Fl_Image * image() const
Gets the image that is used as part of the widget label when in the active state.
Definition Fl_Widget.H:588
void set_visible_focus()
Enables keyboard focus navigation with this widget.
Definition Fl_Widget.H:996
void type(uchar t)
Sets the widget type.
Definition Fl_Widget.H:348
void needs_keyboard(bool needs)
Sets whether this widget needs a keyboard.
Definition Fl_Widget.H:307
Fl_Color color2() const
For back compatibility only.
Definition Fl_Widget.H:1214
Fl_Image * image()
Gets the image that is used as part of the widget label when in the active state.
Definition Fl_Widget.H:583
Fl_When when() const
Returns the conditions under which the callback is called.
Definition Fl_Widget.H:788
void callback(Fl_Callback *cb, Fl_Callback_User_Data *p, bool auto_free)
Sets the current callback function and managed user data for the widget.
Definition Fl_Widget.H:720
void w(int v)
Internal use only.
Definition Fl_Widget.H:146
void callback(Fl_Callback *cb, void *p)
Sets the current callback function and data for the widget.
Definition Fl_Widget.H:708
uchar damage() const
Returns non-zero if draw() needs to be called.
Definition Fl_Widget.H:1107
int image_bound() const
Returns whether the image is managed by the widget.
Definition Fl_Widget.H:641
void labelfont(Fl_Font f)
Sets the font to use.
Definition Fl_Widget.H:566
uchar type() const
Gets the widget type.
Definition Fl_Widget.H:343
void set_active()
Marks the widget as active without sending events or changing focus.
Definition Fl_Widget.H:979
bool needs_keyboard() const
Returns whether this widget needs a keyboard.
Definition Fl_Widget.H:317
unsigned int active() const
Returns whether the widget is active.
Definition Fl_Widget.H:881
unsigned int visible_focus() const
Checks whether this widget has a visible focus.
Definition Fl_Widget.H:1014
void size(int W, int H)
Changes the size of the widget.
Definition Fl_Widget.H:410
void draw_focus() const
Draws a focus rectangle around the widget.
Definition Fl_Widget.H:203
unsigned int takesevents() const
Returns if the widget is able to take events.
Definition Fl_Widget.H:937
void color2(unsigned a)
For back compatibility only.
Definition Fl_Widget.H:1219
void y(int v)
Internal use only.
Definition Fl_Widget.H:144
void clear_flag(unsigned int c)
Clears a flag in the flags mask.
Definition Fl_Widget.H:154
void h(int v)
Internal use only.
Definition Fl_Widget.H:148
int x() const
Gets the widget position in its window.
Definition Fl_Widget.H:353
int use_accents_menu()
Returns non zero if MAC_USE_ACCENTS_MENU flag is set, 0 otherwise.
Definition Fl_Widget.H:1209
unsigned int changed() const
Checks if the widget value changed since the last callback.
Definition Fl_Widget.H:957
void clear_damage(uchar c=0)
Clears or sets the damage flags.
Definition Fl_Widget.H:1121
void do_callback(Fl_Callback_Reason reason=FL_REASON_UNKNOWN)
Calls the widget callback function with default arguments.
Definition Fl_Widget.H:1050
This widget produces an actual window.
Definition Fl_Window.H:55
unsigned char uchar
unsigned char
Definition fl_types.h:30
opaque fl_intptr_t
An integral type large enough to store a pointer or a long value.
Definition platform_types.h:31
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