FLTK 1.3.3: Fl.H Source File

FLTK 1.3.3

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

Fl.H
Go to the documentation of this file.
1 //
2 // "$Id: Fl.H 10419 2014-10-30 16:05:22Z AlbrechtS $"
3 //
4 // Main header file for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2010 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
23 #ifndef Fl_H
24 # define Fl_H
25
26 #ifdef FLTK_HAVE_CAIRO
27 # include <FL/Fl_Cairo.H>
28 #endif
29
30 # include "fl_utf8.h"
31 # include "Enumerations.H"
32 # ifndef Fl_Object
33 # define Fl_Object Fl_Widget
34 # endif
35
36 # ifdef check
37 # undef check
38 # endif
39
40
41 class Fl_Widget;
42 class Fl_Window;
43 class Fl_Image;
44 struct Fl_Label;
45
46 // Keep avoiding having the socket deps at that level but mke sure it will work in both 32 & 64 bit builds
47 #if defined(WIN32) && !defined(__CYGWIN__)
48 # if defined(_WIN64)
49 # define FL_SOCKET unsigned __int64
50 # else
51 # define FL_SOCKET int
52 # endif
53 #else
54 # define FL_SOCKET int
55 #endif
56
73 typedef void (Fl_Label_Draw_F)(const Fl_Label *label, int x, int y, int w, int h, Fl_Align align);
74
76 typedef void (Fl_Label_Measure_F)(const Fl_Label *label, int &width, int &height);
77
79 typedef void (Fl_Box_Draw_F)(int x, int y, int w, int h, Fl_Color color);
80
82 typedef void (*Fl_Timeout_Handler)(void *data);
83
85 typedef void (*Fl_Awake_Handler)(void *data);
86
88 typedef void (*Fl_Idle_Handler)(void *data);
89
91 typedef void (*Fl_Old_Idle_Handler)();
92
94 typedef void (*Fl_FD_Handler)(FL_SOCKET fd, void *data);
95
97 typedef int (*Fl_Event_Handler)(int event);
98
100 typedef int (*Fl_System_Handler)(void *event, void *data);
101
103 typedef void (*Fl_Abort_Handler)(const char *format,...);
104
106 typedef void (*Fl_Atclose_Handler)(Fl_Window *window, void *data);
107
109 typedef int (*Fl_Args_Handler)(int argc, char **argv, int &i);
110
113 typedef int (*Fl_Event_Dispatch)(int event, Fl_Window *w);
114
116 typedef void (*Fl_Clipboard_Notify_Handler)(int source, void *data);
117 /* group callback_functions */
119
120
125 class FL_EXPORT Fl {
126 Fl() {}; // no constructor!
127
128 public: // should be private!
129 #ifndef FL_DOXYGEN
130 static int e_number;
131 static int e_x;
132 static int e_y;
133 static int e_x_root;
134 static int e_y_root;
135 static int e_dx;
136 static int e_dy;
137 static int e_state;
138 static int e_clicks;
139 static int e_is_click;
140 static int e_keysym;
141 static char* e_text;
142 static int e_length;
143 static void *e_clipboard_data;
144 static const char *e_clipboard_type;
145 static Fl_Event_Dispatch e_dispatch;
146 static Fl_Widget* belowmouse_;
147 static Fl_Widget* pushed_;
148 static Fl_Widget* focus_;
149 static int damage_;
150 static Fl_Widget* selection_owner_;
151 static Fl_Window* modal_;
152 static Fl_Window* grab_;
153 static int compose_state; // used for dead keys (WIN32) or marked text (MacOS)
154 static void call_screen_init(); // recompute screen number and dimensions
155 #ifdef __APPLE__
156 static void reset_marked_text(); // resets marked text
157 static void insertion_point_location(int x, int y, int height); // sets window coordinates & height of insertion point
158 #endif
159 #endif // FL_DOXYGEN
160
161
165 static void damage(int d) {damage_ = d;}
166
167 public:
174 typedef enum {
184 OPTION_ARROW_FOCUS = 0,
185 // When switched on, FLTK will use the file chooser dialog that comes
186 // with your operating system whenever possible. When switched off, FLTK
187 // will present its own file chooser.
188 // \todo implement me
189 // OPTION_NATIVE_FILECHOOSER,
190 // When Filechooser Preview is enabled, the FLTK or native file chooser
191 // will show a preview of a selected file (if possible) before the user
192 // decides to choose the file.
193 // \todo implement me
194 //OPTION_FILECHOOSER_PREVIEW,
199 OPTION_VISIBLE_FOCUS,
203 OPTION_DND_TEXT,
207 OPTION_SHOW_TOOLTIPS,
211 OPTION_FNFC_USES_GTK,
212 // don't change this, leave it always as the last element
214 OPTION_LAST
215 } Fl_Option;
216
217 private:
218 static unsigned char options_[OPTION_LAST];
219 static unsigned char options_read_;
220
221 public:
222 /*
223 Return a global setting for all FLTK applications, possibly overridden
224 by a setting specifically for this application.
225 */
226 static bool option(Fl_Option opt);
227
228 /*
229 Override an option while the application is running.
230 */
231 static void option(Fl_Option opt, bool val);
232
240 static void (*idle)();
241
242 #ifndef FL_DOXYGEN
243 static Fl_Awake_Handler *awake_ring_;
244 static void **awake_data_;
245 static int awake_ring_size_;
246 static int awake_ring_head_;
247 static int awake_ring_tail_;
248 static const char* scheme_;
249 static Fl_Image* scheme_bg_;
250
251 static int e_original_keysym; // late addition
252 static int scrollbar_size_;
253 #endif
254
255
256 static int add_awake_handler_(Fl_Awake_Handler, void*);
257 static int get_awake_handler_(Fl_Awake_Handler&, void*&);
258
259 public:
260
261 // API version number
262 static double version();
263
264 // argument parsers:
265 static int arg(int argc, char **argv, int& i);
266 static int args(int argc, char **argv, int& i, Fl_Args_Handler cb = 0);
267 static void args(int argc, char **argv);
272 static const char* const help;
273
274 // things called by initialization:
275 static void display(const char*);
276 static int visual(int);
286 static int gl_visual(int, int *alist=0); // platform dependent
287 static void own_colormap();
288 static void get_system_colors();
289 static void foreground(uchar, uchar, uchar);
290 static void background(uchar, uchar, uchar);
291 static void background2(uchar, uchar, uchar);
292
293 // schemes:
294 static int scheme(const char *name);
296 static const char* scheme() {return scheme_;}
297
325 static int is_scheme(const char *name) {
326 return (scheme_ && name && !strcmp(name,scheme_));
327 }
333 static int reload_scheme(); // platform dependent
334 static int scrollbar_size();
335 static void scrollbar_size(int W);
336
337 // execution:
338 static int wait();
339 static double wait(double time);
340 static int check();
341 static int ready();
342 static int run();
343 static Fl_Widget* readqueue();
370 static void add_timeout(double t, Fl_Timeout_Handler,void* = 0); // platform dependent
391 static void repeat_timeout(double t, Fl_Timeout_Handler, void* = 0); // platform dependent
392 static int has_timeout(Fl_Timeout_Handler, void* = 0);
393 static void remove_timeout(Fl_Timeout_Handler, void* = 0);
394 static void add_check(Fl_Timeout_Handler, void* = 0);
395 static int has_check(Fl_Timeout_Handler, void* = 0);
396 static void remove_check(Fl_Timeout_Handler, void* = 0);
416 static void add_fd(int fd, int when, Fl_FD_Handler cb, void* = 0); // platform dependent
418 static void add_fd(int fd, Fl_FD_Handler cb, void* = 0); // platform dependent
420 static void remove_fd(int, int when); // platform dependent
422 static void remove_fd(int); // platform dependent
423
424 static void add_idle(Fl_Idle_Handler cb, void* data = 0);
425 static int has_idle(Fl_Idle_Handler cb, void* data = 0);
426 static void remove_idle(Fl_Idle_Handler cb, void* data = 0);
428 static int damage() {return damage_;}
429 static void redraw();
430 static void flush();
451 static void (*warning)(const char*, ...);
466 static void (*error)(const char*, ...);
483 static void (*fatal)(const char*, ...);
489 static Fl_Window* first_window();
490 static void first_window(Fl_Window*);
491 static Fl_Window* next_window(const Fl_Window*);
492
502 static Fl_Window* modal() {return modal_;}
508 static Fl_Window* grab() {return grab_;}
533 static void grab(Fl_Window*); // platform dependent
540 // event information:
546 static int event() {return e_number;}
551 static int event_x() {return e_x;}
556 static int event_y() {return e_y;}
563 static int event_x_root() {return e_x_root;}
570 static int event_y_root() {return e_y_root;}
575 static int event_dx() {return e_dx;}
580 static int event_dy() {return e_dy;}
589 static void get_mouse(int &,int &); // platform dependent
598 static int event_clicks() {return e_clicks;}
606 static void event_clicks(int i) {e_clicks = i;}
614 static int event_is_click() {return e_is_click;}
621 static void event_is_click(int i) {e_is_click = i;}
628 static int event_button() {return e_keysym-FL_Button;}
652 static int event_state() {return e_state;}
654 static int event_state(int i) {return e_state&i;}
666 static int event_key() {return e_keysym;}
675 static int event_original_key(){return e_original_keysym;}
714 static int event_key(int key);
720 static int get_key(int key); // platform dependent
735 static const char* event_text() {return e_text;}
742 static int event_length() {return e_length;}
743
747 static void *event_clipboard() { return e_clipboard_data; }
751 static const char *event_clipboard_type() {return e_clipboard_type; }
752
753
754 static int compose(int &del);
755 static void compose_reset();
756 static int event_inside(int,int,int,int);
757 static int event_inside(const Fl_Widget*);
758 static int test_shortcut(Fl_Shortcut);
759
764 static void enable_im();
769 static void disable_im();
770
771 // event destinations:
772 static int handle(int, Fl_Window*);
773 static int handle_(int, Fl_Window*);
776 static Fl_Widget* belowmouse() {return belowmouse_;}
777 static void belowmouse(Fl_Widget*);
780 static Fl_Widget* pushed() {return pushed_;}
781 static void pushed(Fl_Widget*);
783 static Fl_Widget* focus() {return focus_;}
784 static void focus(Fl_Widget*);
785 static void add_handler(Fl_Event_Handler h);
786 static void remove_handler(Fl_Event_Handler h);
787 static void add_system_handler(Fl_System_Handler h, void *data);
788 static void remove_system_handler(Fl_System_Handler h);
789 static void event_dispatch(Fl_Event_Dispatch d);
790 static Fl_Event_Dispatch event_dispatch();
796 // cut/paste:
811 #if FLTK_ABI_VERSION >= 10303 || defined(FL_DOXYGEN)
812 static void copy(const char* stuff, int len, int destination = 0, const char *type = Fl::clipboard_plain_text); // platform dependent
813 #else
814 static void copy(const char* stuff, int len, int destination, const char *type);
815 static void copy(const char* stuff, int len, int destination = 0);
816 #endif
817
818 #if !(defined(__APPLE__) || defined(WIN32) || defined(FL_DOXYGEN))
819 static void copy_image(const unsigned char* data, int W, int H, int destination = 0); // platform dependent
820 #endif
821
852 #if FLTK_ABI_VERSION >= 10303 || defined(FL_DOXYGEN)
853 static void paste(Fl_Widget &receiver, int source, const char *type = Fl::clipboard_plain_text); // platform dependent
854 #else
855 static void paste(Fl_Widget &receiver, int source, const char *type);
856 static void paste(Fl_Widget &receiver, int source /*=0*/);
857 #endif
858
879 static void add_clipboard_notify(Fl_Clipboard_Notify_Handler h, void *data = 0);
884 static void remove_clipboard_notify(Fl_Clipboard_Notify_Handler h);
888 static int clipboard_contains(const char *type);
891 static char const * const clipboard_plain_text;
894 static char const * const clipboard_image;
895
905 static int dnd(); // platform dependent
906
907 // These are for back-compatibility only:
910 static Fl_Widget* selection_owner() {return selection_owner_;}
911 static void selection_owner(Fl_Widget*);
912 static void selection(Fl_Widget &owner, const char*, int len);
913 static void paste(Fl_Widget &receiver);
918 // screen size:
920 static int x(); // platform dependent
922 static int y(); // platform dependent
924 static int w(); // platform dependent
926 static int h(); // platform dependent
927
928 // multi-head support:
929 static int screen_count();
935 static void screen_xywh(int &X, int &Y, int &W, int &H) {
936 int x, y;
937 Fl::get_mouse(x, y);
938 screen_xywh(X, Y, W, H, x, y);
939 }
940 static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my);
941 static void screen_xywh(int &X, int &Y, int &W, int &H, int n);
942 static void screen_xywh(int &X, int &Y, int &W, int &H, int mx, int my, int mw, int mh);
943 static int screen_num(int x, int y);
944 static int screen_num(int x, int y, int w, int h);
945 static void screen_dpi(float &h, float &v, int n=0);
946 static void screen_work_area(int &X, int &Y, int &W, int &H, int mx, int my);
947 static void screen_work_area(int &X, int &Y, int &W, int &H, int n);
953 static void screen_work_area(int &X, int &Y, int &W, int &H) {
954 int x, y;
955 Fl::get_mouse(x, y);
956 screen_work_area(X, Y, W, H, x, y);
957 }
958
966 // color map:
967 static void set_color(Fl_Color, uchar, uchar, uchar);
972 static void set_color(Fl_Color i, unsigned c); // platform dependent
973 static unsigned get_color(Fl_Color i);
974 static void get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue);
980 static void free_color(Fl_Color i, int overlay = 0); // platform dependent
981
982 // fonts:
983 static const char* get_font(Fl_Font);
996 static const char* get_font_name(Fl_Font, int* attributes = 0);
1008 static int get_font_sizes(Fl_Font, int*& sizep);
1009 static void set_font(Fl_Font, const char*);
1010 static void set_font(Fl_Font, Fl_Font);
1029 static Fl_Font set_fonts(const char* = 0); // platform dependent
1030
1037 // <Hack to re-order the 'Drawing functions' group>
1040 // labeltypes:
1041 static void set_labeltype(Fl_Labeltype,Fl_Label_Draw_F*,Fl_Label_Measure_F*);
1043 static void set_labeltype(Fl_Labeltype, Fl_Labeltype from); // is it defined ?
1044
1045 // boxtypes:
1046 static Fl_Box_Draw_F *get_boxtype(Fl_Boxtype);
1047 static void set_boxtype(Fl_Boxtype, Fl_Box_Draw_F*,uchar,uchar,uchar,uchar);
1048 static void set_boxtype(Fl_Boxtype, Fl_Boxtype from);
1049 static int box_dx(Fl_Boxtype);
1050 static int box_dy(Fl_Boxtype);
1051 static int box_dw(Fl_Boxtype);
1052 static int box_dh(Fl_Boxtype);
1053 static int draw_box_active();
1054
1055 // back compatibility:
1059 static void set_abort(Fl_Abort_Handler f) {fatal = f;}
1060 static void (*atclose)(Fl_Window*,void*);
1061 static void default_atclose(Fl_Window*,void*);
1065 static void set_atclose(Fl_Atclose_Handler f) {atclose = f;}
1071 static int event_shift() {return e_state&FL_SHIFT;}
1073 static int event_ctrl() {return e_state&FL_CTRL;}
1075 static int event_command() {return e_state&FL_COMMAND;}
1077 static int event_alt() {return e_state&FL_ALT;}
1086 static int event_buttons() {return e_state&0x7f000000;}
1091 static int event_button1() {return e_state&FL_BUTTON1;}
1096 static int event_button2() {return e_state&FL_BUTTON2;}
1101 static int event_button3() {return e_state&FL_BUTTON3;}
1109 static void set_idle(Fl_Old_Idle_Handler cb) {idle = cb;}
1111 static void grab(Fl_Window& win) {grab(&win);}
1115 static void release() {grab(0);}
1116
1117 // Visible focus methods...
1123 static void visible_focus(int v) { option(OPTION_VISIBLE_FOCUS, (v!=0)); }
1129 static int visible_focus() { return option(OPTION_VISIBLE_FOCUS); }
1130
1131 // Drag-n-drop text operation methods...
1138 static void dnd_text_ops(int v) { option(OPTION_DND_TEXT, (v!=0)); }
1145 static int dnd_text_ops() { return option(OPTION_DND_TEXT); }
1150 // Multithreading support:
1151 static int lock();
1152 static void unlock();
1153 static void awake(void* message = 0);
1155 static int awake(Fl_Awake_Handler cb, void* message = 0);
1162 static void* thread_message(); // platform dependent
1194 // Widget deletion:
1195 static void delete_widget(Fl_Widget *w);
1196 static void do_widget_deletion();
1197 static void watch_widget_pointer(Fl_Widget *&w);
1198 static void release_widget_pointer(Fl_Widget *&w);
1199 static void clear_widget_pointer(Fl_Widget const *w);
1202 #ifdef FLTK_HAVE_CAIRO
1203
1206 public:
1207 // Cairo support API
1208 static cairo_t * cairo_make_current(Fl_Window* w);
1223 static void cairo_autolink_context(bool alink) {cairo_state_.autolink(alink);}
1231 static bool cairo_autolink_context() {return cairo_state_.autolink();}
1233 static cairo_t * cairo_cc() { return cairo_state_.cc(); }
1238 static void cairo_cc(cairo_t * c, bool own=false){ cairo_state_.cc(c, own); }
1239
1240 private:
1241 static cairo_t * cairo_make_current(void* gc);
1242 static cairo_t * cairo_make_current(void* gc, int W, int H);
1243 static Fl_Cairo_State cairo_state_;
1244 public:
1247 #endif // FLTK_HAVE_CAIRO
1248
1249 };
1250
1291 class FL_EXPORT Fl_Widget_Tracker {
1292
1293 Fl_Widget* wp_;
1294
1295 public:
1296
1297 Fl_Widget_Tracker(Fl_Widget *wi);
1298 ~Fl_Widget_Tracker();
1299
1305 Fl_Widget *widget() {return wp_;}
1306
1316 int deleted() {return wp_ == 0;}
1317
1327 int exists() {return wp_ != 0;}
1328
1329 };
1330
1336 #endif // !Fl_H
1337
1338 //
1339 // End of "$Id: Fl.H 10419 2014-10-30 16:05:22Z AlbrechtS $".
1340 //
Fl::modal
static Fl_Window * modal()
Returns the top-most modal() window currently shown.
Definition: Fl.H:502
Fl_Widget
Fl_Widget is the base class for all widgets in FLTK.
Definition: Fl_Widget.H:100
Fl::clipboard_image
static char const *const clipboard_image
Denotes image data.
Definition: Fl.H:894
Fl_Event_Dispatch
int(* Fl_Event_Dispatch)(int event, Fl_Window *w)
Signature of event_dispatch functions passed as parameters.
Definition: Fl.H:113
Fl_Window
This widget produces an actual window.
Definition: Fl_Window.H:57
Fl::event_is_click
static int event_is_click()
Returns non-zero if the mouse has not moved far enough and not enough time has passed since the last ...
Definition: Fl.H:614
Fl_Label_Draw_F
void( Fl_Label_Draw_F)(const Fl_Label *label, int x, int y, int w, int h, Fl_Align align)
Signature of some label drawing functions passed as parameters.
Definition: Fl.H:73
FL_BUTTON2
#define FL_BUTTON2
Mouse button 2 is pushed.
Definition: Enumerations.H:438
Fl::scheme
static const char * scheme()
See void scheme(const char *name)
Definition: Fl.H:296
Fl_Widget_Tracker::deleted
int deleted()
Returns 1, if the watched widget has been deleted.
Definition: Fl.H:1316
Fl::focus
static Fl_Widget * focus()
Gets the current Fl::focus() widget.
Definition: Fl.H:783
Fl::event_text
static const char * event_text()
Returns the text associated with the current event, including FL_PASTE or FL_DND_RELEASE events...
Definition: Fl.H:735
Fl::event_clipboard
static void * event_clipboard()
During an FL_PASTE event of non-textual data, returns a pointer to the pasted data.
Definition: Fl.H:747
Fl::selection_owner
static Fl_Widget * selection_owner()
back-compatibility only: Gets the widget owning the current selection
Definition: Fl.H:910
Fl_Args_Handler
int(* Fl_Args_Handler)(int argc, char **argv, int &i)
Signature of args functions passed as parameters.
Definition: Fl.H:109
Fl::event_button1
static int event_button1()
Returns non-zero if mouse button 1 is currently held down.
Definition: Fl.H:1091
Fl::is_scheme
static int is_scheme(const char *name)
Returns whether the current scheme is the given name.
Definition: Fl.H:325
Fl_Label_Measure_F
void( Fl_Label_Measure_F)(const Fl_Label *label, int &width, int &height)
Signature of some label measurement functions passed as parameters.
Definition: Fl.H:76
Fl::cairo_autolink_context
static void cairo_autolink_context(bool alink)
when FLTK_HAVE_CAIRO is defined and cairo_autolink_context() is true, any current window dc is linked...
Definition: Fl.H:1223
Fl
The Fl is the FLTK global (static) class containing state information and global methods for the curr...
Definition: Fl.H:125
Fl::release
static void release()
Releases the current grabbed window, equals grab(0).
Definition: Fl.H:1115
Fl_Widget_Tracker::exists
int exists()
Returns 1, if the watched widget exists (has not been deleted).
Definition: Fl.H:1327
Fl_Abort_Handler
void(* Fl_Abort_Handler)(const char *format,...)
Signature of set_abort functions passed as parameters.
Definition: Fl.H:103
Fl::event_clipboard_type
static const char * event_clipboard_type()
Returns the type of the pasted data during an FL_PASTE event.
Definition: Fl.H:751
Fl::event_y_root
static int event_y_root()
Returns the mouse position on the screen of the event.
Definition: Fl.H:570
Fl::OPTION_VISIBLE_FOCUS
If visible focus is switched on (default), FLTK will draw a dotted rectangle inside the widget that w...
Definition: Fl.H:199
Fl::belowmouse
static Fl_Widget * belowmouse()
Gets the widget that is below the mouse.
Definition: Fl.H:776
Fl::event
static int event()
Returns the last event that was processed.
Definition: Fl.H:546
fl_utf8.h
header for Unicode and UTF8 chracter handling
FL_BUTTON3
#define FL_BUTTON3
Mouse button 3 is pushed.
Definition: Enumerations.H:439
Fl::event_y
static int event_y()
Returns the mouse position of the event relative to the Fl_Window it was passed to.
Definition: Fl.H:556
Fl_Image
Fl_Image is the base class used for caching and drawing all kinds of images in FLTK.
Definition: Fl_Image.H:52
Fl::event_dx
static int event_dx()
Returns the current horizontal mouse scrolling associated with the FL_MOUSEWHEEL event.
Definition: Fl.H:575
Fl_Event_Handler
int(* Fl_Event_Handler)(int event)
Signature of add_handler functions passed as parameters.
Definition: Fl.H:97
Fl::screen_work_area
static void screen_work_area(int &X, int &Y, int &W, int &H)
Gets the bounding box of the work area of the screen that contains the mouse pointer.
Definition: Fl.H:953
Fl::OPTION_SHOW_TOOLTIPS
If tooltips are enabled (default), hovering the mouse over a widget with a tooltip text will open a l...
Definition: Fl.H:207
Fl_Boxtype
Fl_Boxtype
Definition: Enumerations.H:473
Fl::event_button
static int event_button()
Gets which particular mouse button caused the current event.
Definition: Fl.H:628
Fl::cairo_autolink_context
static bool cairo_autolink_context()
Gets the current autolink mode for cairo support.
Definition: Fl.H:1231
FL_SHIFT
#define FL_SHIFT
One of the shift keys is down.
Definition: Enumerations.H:427
Enumerations.H
This file contains type definitions and general enumerations.
FL_COMMAND
#define FL_COMMAND
An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X.
Definition: Enumerations.H:450
FL_Button
#define FL_Button
A mouse button; use Fl_Button + n for mouse button n.
Definition: Enumerations.H:337
Fl::OPTION_DND_TEXT
If text drag-and-drop is enabled (default), the user can select and drag text from any text widget...
Definition: Fl.H:203
Fl_Widget_Tracker::widget
Fl_Widget * widget()
Returns a pointer to the watched widget.
Definition: Fl.H:1305
Fl::event_clicks
static void event_clicks(int i)
Manually sets the number returned by Fl::event_clicks().
Definition: Fl.H:606
Fl::event_clicks
static int event_clicks()
Returns non zero if we had a double click event.
Definition: Fl.H:598
Fl::help
static const char *const help
Usage string displayed if Fl::args() detects an invalid argument.
Definition: Fl.H:272
Fl::OPTION_FNFC_USES_GTK
When switched on (default), Fl_Native_File_Chooser runs GTK file dialogs if the GTK library is availa...
Definition: Fl.H:211
Fl::event_state
static int event_state(int i)
See int event_state()
Definition: Fl.H:654
Fl::event_state
static int event_state()
This is a bitfield of what shift states were on and what mouse buttons were held down during the most...
Definition: Fl.H:652
Fl_Label
This struct stores all information for a text or mixed graphics label.
Definition: Fl_Widget.H:64
FL_CTRL
#define FL_CTRL
One of the ctrl keys is down.
Definition: Enumerations.H:429
Fl::event_original_key
static int event_original_key()
Returns the keycode of the last key event, regardless of the NumLock state.
Definition: Fl.H:675
Fl::screen_xywh
static void screen_xywh(int &X, int &Y, int &W, int &H)
Gets the bounding box of a screen that contains the mouse pointer.
Definition: Fl.H:935
Fl::event_button3
static int event_button3()
Returns non-zero if button 3 is currently held down.
Definition: Fl.H:1101
Fl::visible_focus
static int visible_focus()
Gets or sets the visible keyboard focus on buttons and other non-text widgets.
Definition: Fl.H:1129
Fl::event_dy
static int event_dy()
Returns the current vertical mouse scrolling associated with the FL_MOUSEWHEEL event.
Definition: Fl.H:580
Fl_Widget_Tracker
This class should be used to control safe widget deletion.
Definition: Fl.H:1291
Fl_Atclose_Handler
void(* Fl_Atclose_Handler)(Fl_Window *window, void *data)
Signature of set_atclose functions passed as parameters.
Definition: Fl.H:106
Fl::get_mouse
static void get_mouse(int &, int &)
Return where the mouse is on the screen by doing a round-trip query to the server.
Fl::grab
static void grab(Fl_Window &win)
See grab(Fl_Window*)
Definition: Fl.H:1111
FL_ALT
#define FL_ALT
One of the alt keys is down.
Definition: Enumerations.H:430
Fl::event_length
static int event_length()
Returns the length of the text in Fl::event_text().
Definition: Fl.H:742
Fl::event_command
static int event_command()
Returns non-zero if the FL_COMMAND key is pressed, either FL_CTRL or on OSX FL_META.
Definition: Fl.H:1075
Fl::event_is_click
static void event_is_click(int i)
Clears the value returned by Fl::event_is_click().
Definition: Fl.H:621
Fl_Color
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition: Enumerations.H:796
Fl_Labeltype
Fl_Labeltype
The labeltype() method sets the type of the label.
Definition: Enumerations.H:633
Fl_Font
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:739
Fl::Fl_Option
Fl_Option
Enumerator for global FLTK options.
Definition: Fl.H:174
Fl::clipboard_plain_text
static char const *const clipboard_plain_text
Denotes plain textual data.
Definition: Fl.H:891
Fl::event_x_root
static int event_x_root()
Returns the mouse position on the screen of the event.
Definition: Fl.H:563
FL_BUTTON1
#define FL_BUTTON1
Mouse button 1 is pushed.
Definition: Enumerations.H:437
Fl_Align
unsigned Fl_Align
FLTK type for alignment control.
Definition: Enumerations.H:690
Fl::dnd_text_ops
static void dnd_text_ops(int v)
Gets or sets whether drag and drop text operations are supported.
Definition: Fl.H:1138
Fl::cairo_cc
static void cairo_cc(cairo_t *c, bool own=false)
Sets the current cairo context to c.
Definition: Fl.H:1238
Fl::grab
static Fl_Window * grab()
Returns the window that currently receives all events.
Definition: Fl.H:508
Fl_Old_Idle_Handler
void(* Fl_Old_Idle_Handler)()
Signature of set_idle callback functions passed as parameters.
Definition: Fl.H:91
Fl::damage
static void damage(int d)
If true then flush() will do something.
Definition: Fl.H:165
Fl_Idle_Handler
void(* Fl_Idle_Handler)(void *data)
Signature of add_idle callback functions passed as parameters.
Definition: Fl.H:88
Fl_System_Handler
int(* Fl_System_Handler)(void *event, void *data)
Signature of add_system_handler functions passed as parameters.
Definition: Fl.H:100
Fl::visible_focus
static void visible_focus(int v)
Gets or sets the visible keyboard focus on buttons and other non-text widgets.
Definition: Fl.H:1123
Fl::event_button2
static int event_button2()
Returns non-zero if button 2 is currently held down.
Definition: Fl.H:1096
Fl::pushed
static Fl_Widget * pushed()
Gets the widget that is being pushed.
Definition: Fl.H:780
Fl_Awake_Handler
void(* Fl_Awake_Handler)(void *data)
Signature of some wakeup callback functions passed as parameters.
Definition: Fl.H:85
Fl::set_atclose
static void set_atclose(Fl_Atclose_Handler f)
For back compatibility, sets the Fl::atclose handler callback.
Definition: Fl.H:1065
Fl_Box_Draw_F
void( Fl_Box_Draw_F)(int x, int y, int w, int h, Fl_Color color)
Signature of some box drawing functions passed as parameters.
Definition: Fl.H:79
Fl::cairo_cc
static cairo_t * cairo_cc()
Gets the current cairo context linked with a fltk window.
Definition: Fl.H:1233
Fl_Cairo_State
Contains all the necessary info on the current cairo context.
Definition: Fl_Cairo.H:54
Fl::event_x
static int event_x()
Returns the mouse position of the event relative to the Fl_Window it was passed to.
Definition: Fl.H:551
Fl_Label::color
Fl_Color color
text color
Definition: Fl_Widget.H:76
Fl::dnd_text_ops
static int dnd_text_ops()
Gets or sets whether drag and drop text operations are supported.
Definition: Fl.H:1145
Fl::event_shift
static int event_shift()
Returns non-zero if the Shift key is pressed.
Definition: Fl.H:1071
Fl_FD_Handler
void(* Fl_FD_Handler)(FL_SOCKET fd, void *data)
Signature of add_fd functions passed as parameters.
Definition: Fl.H:94
Fl::event_ctrl
static int event_ctrl()
Returns non-zero if the Control key is pressed.
Definition: Fl.H:1073
Fl::damage
static int damage()
If true then flush() will do something.
Definition: Fl.H:428
Fl_Timeout_Handler
void(* Fl_Timeout_Handler)(void *data)
Signature of some timeout callback functions passed as parameters.
Definition: Fl.H:82
Fl::set_idle
static void set_idle(Fl_Old_Idle_Handler cb)
Sets an idle callback.
Definition: Fl.H:1109
uchar
unsigned char uchar
unsigned char
Definition: fl_types.h:30
Fl::event_buttons
static int event_buttons()
Returns the mouse buttons state bits; if non-zero, then at least one button is pressed now...
Definition: Fl.H:1086
Fl_Clipboard_Notify_Handler
void(* Fl_Clipboard_Notify_Handler)(int source, void *data)
Signature of add_clipboard_notify functions passed as parameters.
Definition: Fl.H:116
Fl_Shortcut
unsigned int Fl_Shortcut
24-bit Unicode character + 8-bit indicator for keyboard flags
Definition: fl_types.h:46
Fl::event_key
static int event_key()
Gets which key on the keyboard was last pushed.
Definition: Fl.H:666
Fl::set_abort
static void set_abort(Fl_Abort_Handler f)
For back compatibility, sets the void Fl::fatal handler callback.
Definition: Fl.H:1059
Fl::event_alt
static int event_alt()
Returns non-zero if the Alt key is pressed.
Definition: Fl.H:1077
- © 1998-2014 by Bill Spitzak and others.