FLTK 1.4.4

Loading...
Searching...
No Matches
forms.H
1//
2// Forms emulation header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2023 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
17#ifndef __FORMS_H__
18#define __FORMS_H__
19
20#include "Fl.H"
21#include "Fl_Group.H"
22#include "Fl_Window.H"
23#include "fl_draw.H"
24
25 typedef Fl_Widget FL_OBJECT;
26 typedef Fl_Window FL_FORM;
27
29// Random constants & symbols defined by forms.h file:
30
31#ifndef NULL
32#define NULL 0
33#endif
34#ifndef FALSE
35#define FALSE 0
36#define TRUE 1
37#endif
38
39#define FL_ON 1
40#define FL_OK 1
41#define FL_VALID 1
42#define FL_PREEMPT 1
43#define FL_AUTO 2
44#define FL_WHEN_NEEDED FL_AUTO
45#define FL_OFF 0
46#define FL_NONE 0
47#define FL_CANCEL 0
48#define FL_INVALID 0
49#define FL_IGNORE -1
50// #define FL_CLOSE -2 // this variable is never used in FLTK Forms. It is removed
51 // because it conflicts with the window FL_CLOSE event
52
53#define FL_LCOL FL_BLACK
54#define FL_COL1 FL_GRAY
55#define FL_MCOL FL_LIGHT1
56#define FL_LEFT_BCOL FL_LIGHT3 // 53 is better match
57#define FL_TOP_BCOL FL_LIGHT2 // 51
58#define FL_BOTTOM_BCOL FL_DARK2 // 40
59#define FL_RIGHT_BCOL FL_DARK3 // 36
60#define FL_INACTIVE FL_INACTIVE_COLOR
61#define FL_INACTIVE_COL FL_INACTIVE_COLOR
62#define FL_FREE_COL1 FL_FREE_COLOR
63#define FL_FREE_COL2 ((Fl_Color)(FL_FREE_COLOR+1))
64#define FL_FREE_COL3 ((Fl_Color)(FL_FREE_COLOR+2))
65#define FL_FREE_COL4 ((Fl_Color)(FL_FREE_COLOR+3))
66#define FL_FREE_COL5 ((Fl_Color)(FL_FREE_COLOR+4))
67#define FL_FREE_COL6 ((Fl_Color)(FL_FREE_COLOR+5))
68#define FL_FREE_COL7 ((Fl_Color)(FL_FREE_COLOR+6))
69#define FL_FREE_COL8 ((Fl_Color)(FL_FREE_COLOR+7))
70#define FL_FREE_COL9 ((Fl_Color)(FL_FREE_COLOR+8))
71#define FL_FREE_COL10 ((Fl_Color)(FL_FREE_COLOR+9))
72#define FL_FREE_COL11 ((Fl_Color)(FL_FREE_COLOR+10))
73#define FL_FREE_COL12 ((Fl_Color)(FL_FREE_COLOR+11))
74#define FL_FREE_COL13 ((Fl_Color)(FL_FREE_COLOR+12))
75#define FL_FREE_COL14 ((Fl_Color)(FL_FREE_COLOR+13))
76#define FL_FREE_COL15 ((Fl_Color)(FL_FREE_COLOR+14))
77#define FL_FREE_COL16 ((Fl_Color)(FL_FREE_COLOR+15))
78#define FL_TOMATO ((Fl_Color)(131))
79#define FL_INDIANRED ((Fl_Color)(164))
80#define FL_SLATEBLUE ((Fl_Color)(195))
81#define FL_DARKGOLD ((Fl_Color)(84))
82#define FL_PALEGREEN ((Fl_Color)(157))
83#define FL_ORCHID ((Fl_Color)(203))
84#define FL_DARKCYAN ((Fl_Color)(189))
85#define FL_DARKTOMATO ((Fl_Color)(113))
86#define FL_WHEAT ((Fl_Color)(174))
87
88#define FL_ALIGN_BESIDE FL_ALIGN_INSIDE
89
90#define FL_PUP_TOGGLE 2 // FL_MENU_TOGGLE
91#define FL_PUP_INACTIVE 1 // FL_MENU_INACTIVE
92#define FL_NO_FRAME FL_NO_BOX
93#define FL_ROUNDED3D_UPBOX FL_ROUND_UP_BOX
94#define FL_ROUNDED3D_DOWNBOX FL_ROUND_DOWN_BOX
95#define FL_OVAL3D_UPBOX FL_ROUND_UP_BOX
96#define FL_OVAL3D_DOWNBOX FL_ROUND_DOWN_BOX
97
98#define FL_MBUTTON1 1
99#define FL_LEFTMOUSE 1
100#define FL_MBUTTON2 2
101#define FL_MIDDLEMOUSE 2
102#define FL_MBUTTON3 3
103#define FL_RIGHTMOUSE 3
104#define FL_MBUTTON4 4
105#define FL_MBUTTON5 5
106
107#define FL_INVALID_STYLE 255
108#define FL_NORMAL_STYLE FL_HELVETICA
109#define FL_BOLD_STYLE FL_HELVETICA_BOLD
110#define FL_ITALIC_STYLE FL_HELVETICA_ITALIC
111#define FL_BOLDITALIC_STYLE FL_HELVETICA_BOLD_ITALIC
112#define FL_FIXED_STYLE FL_COURIER
113#define FL_FIXEDBOLD_STYLE FL_COURIER_BOLD
114#define FL_FIXEDITALIC_STYLE FL_COURIER_ITALIC
115#define FL_FIXEDBOLDITALIC_STYLE FL_COURIER_BOLD_ITALIC
116#define FL_TIMES_STYLE FL_TIMES
117#define FL_TIMESBOLD_STYLE FL_TIMES_BOLD
118#define FL_TIMESITALIC_STYLE FL_TIMES_ITALIC
119#define FL_TIMESBOLDITALIC_STYLE FL_TIMES_BOLD_ITALIC
120
121// hacks to change the labeltype() when passed to fl_set_object_lstyle():
122#define FL_SHADOW_STYLE (FL_SHADOW_LABEL<<8)
123#define FL_ENGRAVED_STYLE (FL_ENGRAVED_LABEL<<8)
124#define FL_EMBOSSED_STYLE (FL_EMBOSSED_LABEL<<0)
125
126// size values are different from XForms, match older Forms:
127#define FL_TINY_SIZE 8
128#define FL_SMALL_SIZE 11 // 10
129//#define FL_NORMAL_SIZE 14 // 12
130#define FL_MEDIUM_SIZE 18 // 14
131#define FL_LARGE_SIZE 24 // 18
132#define FL_HUGE_SIZE 32 // 24
133#define FL_DEFAULT_SIZE FL_SMALL_SIZE
134#define FL_TINY_FONT FL_TINY_SIZE
135#define FL_SMALL_FONT FL_SMALL_SIZE
136#define FL_NORMAL_FONT FL_NORMAL_SIZE
137#define FL_MEDIUM_FONT FL_MEDIUM_SIZE
138#define FL_LARGE_FONT FL_LARGE_SIZE
139#define FL_HUGE_FONT FL_HUGE_SIZE
140#define FL_NORMAL_FONT1 FL_SMALL_FONT
141#define FL_NORMAL_FONT2 FL_NORMAL_FONT
142#define FL_DEFAULT_FONT FL_SMALL_FONT
143
144#define FL_RETURN_END_CHANGED FL_WHEN_RELEASE
145#define FL_RETURN_CHANGED FL_WHEN_CHANGED
146#define FL_RETURN_END FL_WHEN_RELEASE_ALWAYS
147#define FL_RETURN_ALWAYS (FL_WHEN_CHANGED|FL_WHEN_NOT_CHANGED)
148
149#define FL_BOUND_WIDTH 3
150
151 typedef int FL_Coord;
152 typedef int FL_COLOR;
153
155// fltk interaction:
156
157#define FL_CMD_OPT void
158 extern FL_EXPORT void fl_initialize(int*, char*[], const char*, FL_CMD_OPT*, int);
159 inline void fl_finish() {}
160
161 typedef void (*FL_IO_CALLBACK) (FL_SOCKET, void*);
162 inline void fl_add_io_callback(int fd, short w, FL_IO_CALLBACK cb, void* v) {
163 Fl::add_fd(fd, w, cb, v);}
164 inline void fl_remove_io_callback(int fd, short, FL_IO_CALLBACK) {
165 Fl::remove_fd(fd);} // removes all the callbacks!
166
167// type of callback is different and no "id" number is returned:
168 inline void fl_add_timeout(long msec, void (*cb)(void*), void* v) {
169 Fl::add_timeout(msec*.001, cb, v);}
170 inline void fl_remove_timeout(int) {}
171
172// type of callback is different!
173 inline void fl_set_idle_callback(void (*cb)()) {Fl::set_idle(cb);}
174
175FL_EXPORT Fl_Widget* fl_do_forms(void);
176FL_EXPORT Fl_Widget* fl_check_forms();
177 inline Fl_Widget* fl_do_only_forms(void) {return fl_do_forms();}
178 inline Fl_Widget* fl_check_only_forms(void) {return fl_check_forms();}
179
180// because of new redraw behavior, these are no-ops:
181 inline void fl_freeze_object(Fl_Widget*) {}
182 inline void fl_unfreeze_object(Fl_Widget*) {}
183 inline void fl_freeze_form(Fl_Window*) {}
184 inline void fl_unfreeze_form(Fl_Window*) {}
185 inline void fl_freeze_all_forms() {}
186 inline void fl_unfreeze_all_forms() {}
187
188 inline void fl_set_focus_object(Fl_Window*, Fl_Widget* o) {Fl::focus(o);}
189 inline void fl_reset_focus_object(Fl_Widget* o) {Fl::focus(o);}
190#define fl_set_object_focus fl_set_focus_object
191
192// void fl_set_form_atclose(Fl_Window*w,int (*cb)(Fl_Window*,void*),void* v)
193// void fl_set_atclose(int (*cb)(Fl_Window*,void*),void*)
194// fl_set_form_atactivate/atdeactivate not implemented!
195
197// Fl_Widget:
198
199 inline void fl_set_object_boxtype(Fl_Widget* o, Fl_Boxtype a) {o->box(a);}
200 inline void fl_set_object_lsize(Fl_Widget* o,int s) {o->labelsize(s);}
201
202/* forms lib font indexes must be byte sized - extract correct byte from style word */
203 inline void fl_set_object_lstyle(Fl_Widget* o,int a) {
204 o->labelfont((Fl_Font)(a&0xff)); o->labeltype((Fl_Labeltype)(a>>8));}
205 inline void fl_set_object_lcol(Fl_Widget* o, Fl_Color a) {o->labelcolor(a);}
206#define fl_set_object_lcolor fl_set_object_lcol
207 inline void fl_set_object_lalign(Fl_Widget* o, Fl_Align a) {o->align(a);}
208#define fl_set_object_align fl_set_object_lalign
209 inline void fl_set_object_color(Fl_Widget* o,Fl_Color a,Fl_Color b) {o->color(a,b);}
210 inline void fl_set_object_label(Fl_Widget* o, const char* a) {o->label(a); o->redraw();}
211 inline void fl_set_object_position(Fl_Widget*o,int x,int y) {o->position(x,y);}
212 inline void fl_set_object_size(Fl_Widget* o, int w, int h) {o->size(w,h);}
213 inline void fl_set_object_geometry(Fl_Widget* o,int x,int y,int w,int h) {o->resize(x,y,w,h);}
214
215 inline void fl_get_object_geometry(Fl_Widget* o,int*x,int*y,int*w,int*h) {
216 *x = o->x(); *y = o->y(); *w = o->w(); *h = o->h();}
217 inline void fl_get_object_position(Fl_Widget* o,int*x,int*y) {
218 *x = o->x(); *y = o->y();}
219
220 typedef void (*Forms_CB)(Fl_Widget*, long);
221 inline void fl_set_object_callback(Fl_Widget*o,Forms_CB c,long a) {o->callback(c,a);}
222#define fl_set_call_back fl_set_object_callback
223 inline void fl_call_object_callback(Fl_Widget* o) {o->do_callback();}
224 inline void fl_trigger_object(Fl_Widget* o) {o->do_callback();}
225 inline void fl_set_object_return(Fl_Widget* o, int v) {
226 o->when((Fl_When)(v|FL_WHEN_RELEASE));}
227
228 inline void fl_redraw_object(Fl_Widget* o) {o->redraw();}
229 inline void fl_show_object(Fl_Widget* o) {o->show();}
230 inline void fl_hide_object(Fl_Widget* o) {o->hide();}
231 inline void fl_free_object(Fl_Widget* x) {delete x;}
232 inline void fl_delete_object(Fl_Widget* o) {o->parent()->remove(*o);}
233 inline void fl_activate_object(Fl_Widget* o) {o->activate();}
234 inline void fl_deactivate_object(Fl_Widget* o) {o->deactivate();}
235
236 inline void fl_add_object(Fl_Window* f, Fl_Widget* x) {f->add(x);}
237 inline void fl_insert_object(Fl_Widget* o, Fl_Widget* b) {b->parent()->insert(*o,b);}
238
239 inline Fl_Window* FL_ObjWin(Fl_Widget* o) {return o->window();}
240
242// things that appered in the demos a lot that I don't emulate, but
243// I did not want to edit out of all the demos...
244
245 inline int fl_get_border_width() {return 3;}
246 inline void fl_set_border_width(int) {}
247 inline void fl_set_object_dblbuffer(Fl_Widget*, int) {}
248 inline void fl_set_form_dblbuffer(Fl_Window*, int) {}
249
251// Fl_Window:
252
253 inline void fl_free_form(Fl_Window* x) {delete x;}
254 inline void fl_redraw_form(Fl_Window* f) {f->redraw();}
255
256 inline Fl_Window* fl_bgn_form(Fl_Boxtype b,int w,int h) {
257 Fl_Window* g = new Fl_Window(w,h,0);
258 g->box(b);
259 return g;
260}
261FL_EXPORT void fl_end_form();
262 inline void fl_addto_form(Fl_Window* f) {f->begin();}
263 inline Fl_Group* fl_bgn_group() {return new Fl_Group(0,0,0,0,0);}
264 inline void fl_end_group() {Fl_Group::current()->forms_end();}
265 inline void fl_addto_group(Fl_Widget* o) {((Fl_Group* )o)->begin();}
266#define resizebox _ddfdesign_kludge()
267
268 inline void fl_scale_form(Fl_Window* f, double x, double y) {
269 f->resizable(f); f->size(int(f->w()*x),int(f->h()*y));}
270 inline void fl_set_form_position(Fl_Window* f,int x,int y) {f->position(x,y);}
271 inline void fl_set_form_size(Fl_Window* f, int w, int h) {f->size(w,h);}
272 inline void fl_set_form_geometry(Fl_Window* f,int x,int y,int w,int h) {
273 f->resize(x,y,w,h);}
274#define fl_set_initial_placement fl_set_form_geometry
275 inline void fl_adjust_form_size(Fl_Window*) {}
276
277FL_EXPORT void fl_show_form(Fl_Window* f,int p,int b,const char* n);
278 enum { // "p" argument values:
279 FL_PLACE_FREE = 0, // make resizable
280 FL_PLACE_MOUSE = 1, // mouse centered on form
281 FL_PLACE_CENTER = 2, // center of the screen
282 FL_PLACE_POSITION = 4,// fixed position, resizable
283 FL_PLACE_SIZE = 8, // fixed size, normal fltk behavior
284 FL_PLACE_GEOMETRY =16,// fixed size and position
285 FL_PLACE_ASPECT = 32, // keep aspect ratio (ignored)
286 FL_PLACE_FULLSCREEN=64,// fill screen
287 FL_PLACE_HOTSPOT = 128,// enables hotspot
288 FL_PLACE_ICONIC = 256,// iconic (ignored)
289 FL_FREE_SIZE=(1<<14), // force resizable
290 FL_FIX_SIZE =(1<<15) // force off resizable
291};
292#define FL_PLACE_FREE_CENTER (FL_PLACE_CENTER|FL_FREE_SIZE)
293#define FL_PLACE_CENTERFREE (FL_PLACE_CENTER|FL_FREE_SIZE)
294 enum { // "b" arguement values:
295 FL_NOBORDER = 0,
296 FL_FULLBORDER,
297 FL_TRANSIENT
298//FL_MODAL = (1<<8) // not implemented yet in Forms
299};
300 inline void fl_set_form_hotspot(Fl_Window* w,int x,int y) {w->hotspot(x,y);}
301 inline void fl_set_form_hotobject(Fl_Window* w, Fl_Widget* o) {w->hotspot(o);}
302 extern FL_EXPORT char fl_flip; // in forms.C
303 inline void fl_flip_yorigin() {fl_flip = 1;}
304
305#define fl_prepare_form_window fl_show_form
306 inline void fl_show_form_window(Fl_Window*) {}
307
308 inline void fl_raise_form(Fl_Window* f) {f->show();}
309
310 inline void fl_hide_form(Fl_Window* f) {f->hide();}
311 inline void fl_pop_form(Fl_Window* f) {f->show();}
312
313 extern FL_EXPORT char fl_modal_next; // in forms.C
314 inline void fl_activate_all_forms() {}
315 inline void fl_deactivate_all_forms() {fl_modal_next = 1;}
316 inline void fl_deactivate_form(Fl_Window*w) {w->deactivate();}
317 inline void fl_activate_form(Fl_Window*w) {w->activate();}
318
319 inline void fl_set_form_title(Fl_Window* f, const char* s) {f->label(s);}
320 inline void fl_title_form(Fl_Window* f, const char* s) {f->label(s);}
321
322 typedef void (*Forms_FormCB)(Fl_Widget*);
323 inline void fl_set_form_callback(Fl_Window* f,Forms_FormCB c) {f->callback(c);}
324#define fl_set_form_call_back fl_set_form_callback
325
326 inline void fl_init() {}
327FL_EXPORT void fl_set_graphics_mode(int,int);
328
329 inline int fl_form_is_visible(Fl_Window* f) {return f->visible();}
330
331 inline int fl_mouse_button() {return Fl::event_button();}
332#define fl_mousebutton fl_mouse_button
333
334#define fl_free free
335#define fl_malloc malloc
336#define fl_calloc calloc
337#define fl_realloc realloc
338
340// Drawing functions. Only usable inside an Fl_Free object?
341
342 inline void fl_drw_box(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3) {
343 fl_draw_box(b,x,y,w,h,bgc);}
344 inline void fl_drw_frame(Fl_Boxtype b,int x,int y,int w,int h,Fl_Color bgc,int=3) {
345 fl_draw_box(b,x,y,w,h,bgc);}
346
347 inline void fl_drw_text(Fl_Align align, int x, int y, int w, int h,
348 Fl_Color fgcolor, int size, Fl_Font style,
349 const char* s) {
350 fl_font(style,size);
351 fl_color(fgcolor);
352 fl_draw(s,x,y,w,h,align);
353}
354
355// this does not work except for CENTER...
356 inline void fl_drw_text_beside(Fl_Align align, int x, int y, int w, int h,
357 Fl_Color fgcolor, int size, Fl_Font style,
358 const char* s) {
359 fl_font(style,size);
360 fl_color(fgcolor);
361 fl_draw(s,x,y,w,h,align);
362}
363
364 inline void fl_set_font_name(Fl_Font n,const char* s) {Fl::set_font(n,s);}
365
366 inline void fl_mapcolor(Fl_Color c, uchar r, uchar g, uchar b) {Fl::set_color(c,r,g,b);}
367
368#define fl_set_clipping(x,y,w,h) fl_push_clip(x,y,w,h)
369#define fl_unset_clipping() fl_pop_clip()
370
372// Forms classes:
373
374 inline Fl_Widget* fl_add_new(Fl_Widget* p) {return p;}
375 inline Fl_Widget* fl_add_new(uchar t,Fl_Widget* p) {p->type(t); return p;}
376
377#define forms_constructor(type,name) \
378 inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \
379 return (type*)(fl_add_new(t, new type(x,y,w,h,l)));}
380#define forms_constructort(type,name) \
381 inline type* name(uchar t,int x,int y,int w,int h,const char* l) { \
382 return (type*)(fl_add_new(new type(t,x,y,w,h,l)));}
383#define forms_constructorb(type,name) \
384 inline type* name(Fl_Boxtype t,int x,int y,int w,int h,const char* l) { \
385 return (type*)(fl_add_new(new type(t,x,y,w,h,l)));}
386
387#include "Fl_FormsBitmap.H"
388#define FL_NORMAL_BITMAP FL_NO_BOX
389forms_constructorb(Fl_FormsBitmap, fl_add_bitmap)
390 inline void fl_set_bitmap_data(Fl_Widget* o, int w, int h, const uchar* b) {
391 ((Fl_FormsBitmap*)o)->set(w,h,b);
392}
393
394#include "Fl_FormsPixmap.H"
395#define FL_NORMAL_PIXMAP FL_NO_BOX
396forms_constructorb(Fl_FormsPixmap, fl_add_pixmap)
397 inline void fl_set_pixmap_data(Fl_Widget* o, char*const* b) {
398 ((Fl_FormsPixmap*)o)->set(b);
399}
400//inline void fl_set_pixmap_file(Fl_Widget*, const char*);
401 inline void fl_set_pixmap_align(Fl_Widget* o,Fl_Align a,int,int) {o->align(a);}
402//inline void fl_set_pixmap_colorcloseness(int, int, int);
403
404#include "Fl_Box.H"
405forms_constructorb(Fl_Box, fl_add_box)
406
407#include "Fl_Browser.H"
408forms_constructor(Fl_Browser, fl_add_browser)
409
410 inline void fl_clear_browser(Fl_Widget* o) {
411 ((Fl_Browser*)o)->clear();}
412 inline void fl_add_browser_line(Fl_Widget* o, const char* s) {
413 ((Fl_Browser*)o)->add(s);}
414 inline void fl_addto_browser(Fl_Widget* o, const char* s) {
415 ((Fl_Browser*)o)->add(s);} /* should also scroll to bottom */
416//inline void fl_addto_browser_chars(Fl_Widget*, const char*)
417//#define fl_append_browser fl_addto_browser_chars
418 inline void fl_insert_browser_line(Fl_Widget* o, int n, const char* s) {
419 ((Fl_Browser*)o)->insert(n,s);}
420 inline void fl_delete_browser_line(Fl_Widget* o, int n) {
421 ((Fl_Browser*)o)->remove(n);}
422 inline void fl_replace_browser_line(Fl_Widget* o, int n, const char* s) {
423 ((Fl_Browser*)o)->replace(n,s);}
424 inline char* fl_get_browser_line(Fl_Widget* o, int n) {
425 return (char*)(((Fl_Browser*)o)->text(n));}
426 inline int fl_load_browser(Fl_Widget* o, const char* f) {
427 return ((Fl_Browser*)o)->load(f);}
428 inline void fl_select_browser_line(Fl_Widget* o, int n) {
429 ((Fl_Browser*)o)->select(n,1);}
430 inline void fl_deselect_browser_line(Fl_Widget* o, int n) {
431 ((Fl_Browser*)o)->select(n,0);}
432 inline void fl_deselect_browser(Fl_Widget* o) {
433 ((Fl_Browser*)o)->deselect();}
434 inline int fl_isselected_browser_line(Fl_Widget* o, int n) {
435 return ((Fl_Browser*)o)->selected(n);}
436 inline int fl_get_browser_topline(Fl_Widget* o) {
437 return ((Fl_Browser*)o)->topline();}
438 inline int fl_get_browser(Fl_Widget* o) {
439 return ((Fl_Browser*)o)->value();}
440 inline int fl_get_browser_maxline(Fl_Widget* o) {
441 return ((Fl_Browser*)o)->size();}
442//linline int fl_get_browser_screenlines(Fl_Widget*);
443 inline void fl_set_browser_topline(Fl_Widget* o, int n) {
444 ((Fl_Browser*)o)->topline(n);}
445 inline void fl_set_browser_fontsize(Fl_Widget* o, int s) {
446 ((Fl_Browser*)o)->textsize(s);}
447 inline void fl_set_browser_fontstyle(Fl_Widget* o, Fl_Font s) {
448 ((Fl_Browser*)o)->textfont(s);}
449 inline void fl_set_browser_specialkey(Fl_Widget* o, char c) {
450 ((Fl_Browser*)o)->format_char(c);}
451//inline void fl_set_browser_vscrollbar(Fl_Widget*, int);
452//inline void fl_set_browser_hscrollbar(Fl_Widget*, int);
453//inline void fl_set_browser_leftslider(Fl_Widget*, int);
454//#define fl_set_browser_leftscrollbar fl_set_browser_leftslider
455//inline void fl_set_browser_line_selectable(Fl_Widget*, int, int);
456//inline void fl_get_browser_dimension(Fl_Widget*,int*,int*,int*,int*);
457//inline void fl_set_browser_dblclick_callback(Fl_Widget*,FL_CALLBACKPTR,long);
458//inline void fl_set_browser_xoffset(Fl_Widget*, FL_Coord);
459//inline void fl_set_browser_scrollbarsize(Fl_Widget*, int, int);
460 inline void fl_setdisplayed_browser_line(Fl_Widget* o, int n, int i) {
461 ((Fl_Browser*)o)->display(n,i);}
462 inline int fl_isdisplayed_browser_line(Fl_Widget* o, int n) {
463 return ((Fl_Browser*)o)->displayed(n);}
464
465#include "Fl_Button.H"
466
467#define FL_NORMAL_BUTTON 0
468#define FL_TOUCH_BUTTON 4
469#define FL_INOUT_BUTTON 5
470#define FL_RETURN_BUTTON 6
471#define FL_HIDDEN_RET_BUTTON 7
472#define FL_PUSH_BUTTON FL_TOGGLE_BUTTON
473#define FL_MENU_BUTTON 9
474
475FL_EXPORT Fl_Button* fl_add_button(uchar t,int x,int y,int w,int h,const char* l);
476 inline int fl_get_button(Fl_Widget* b) {return ((Fl_Button*)b)->value();}
477 inline void fl_set_button(Fl_Widget* b, int v) {((Fl_Button*)b)->value(v);}
478 inline int fl_get_button_numb(Fl_Widget*) {return Fl::event_button();}
479 inline void fl_set_button_shortcut(Fl_Widget* b, const char* s,int=0) {
480 ((Fl_Button*)b)->shortcut(s);}
481//#define fl_set_object_shortcut(b,s) fl_set_button_shortcut(b,s)
482
483#include "Fl_Light_Button.H"
484forms_constructor(Fl_Light_Button, fl_add_lightbutton)
485
486#include "Fl_Round_Button.H"
487forms_constructor(Fl_Round_Button, fl_add_roundbutton)
488forms_constructor(Fl_Round_Button, fl_add_round3dbutton)
489
490#include "Fl_Check_Button.H"
491forms_constructor(Fl_Check_Button, fl_add_checkbutton)
492
493 inline Fl_Widget* fl_add_bitmapbutton(int t,int x,int y,int w,int h,const char* l) {Fl_Widget* o = fl_add_button(t,x,y,w,h,l); return o;}
494 inline void fl_set_bitmapbutton_data(Fl_Widget* o,int a,int b,uchar* c) {
495 (new Fl_Bitmap(c,a,b))->label(o);} // does not delete old Fl_Bitmap!
496
497 inline Fl_Widget* fl_add_pixmapbutton(int t,int x,int y,int w,int h,const char* l) {Fl_Widget* o = fl_add_button(t,x,y,w,h,l); return o;}
498 inline void fl_set_pixmapbutton_data(Fl_Widget* o, const char*const* c) {
499 (new Fl_Pixmap(c))->label(o);} // does not delete old Fl_Pixmap!
500
501// Fl_Canvas object not yet implemented!
502
503#include "Fl_Chart.H"
504
505forms_constructor(Fl_Chart, fl_add_chart)
506 inline void fl_clear_chart(Fl_Widget* o) {
507 ((Fl_Chart*)o)->clear();}
508 inline void fl_add_chart_value(Fl_Widget* o,double v,const char* s,uchar c){
509 ((Fl_Chart*)o)->add(v,s,c);}
510 inline void fl_insert_chart_value(Fl_Widget* o, int i, double v, const char* s, uchar c) {
511 ((Fl_Chart*)o)->insert(i,v,s,c);}
512 inline void fl_replace_chart_value(Fl_Widget* o, int i, double v, const char* s, uchar c) {
513 ((Fl_Chart*)o)->replace(i,v,s,c);}
514 inline void fl_set_chart_bounds(Fl_Widget* o, double a, double b) {
515 ((Fl_Chart*)o)->bounds(a,b);}
516 inline void fl_set_chart_maxnumb(Fl_Widget* o, int v) {
517 ((Fl_Chart*)o)->maxsize(v);}
518 inline void fl_set_chart_autosize(Fl_Widget* o, int v) {
519 ((Fl_Chart*)o)->autosize(v);}
520 inline void fl_set_chart_lstyle(Fl_Widget* o, Fl_Font v) {
521 ((Fl_Chart*)o)->textfont(v);}
522 inline void fl_set_chart_lsize(Fl_Widget* o, int v) {
523 ((Fl_Chart*)o)->textsize(v);}
524 inline void fl_set_chart_lcolor(Fl_Widget* o, Fl_Color v) {
525 ((Fl_Chart*)o)->textcolor(v);}
526#define fl_set_chart_lcol fl_set_chart_lcolor
527
528#include "Fl_Choice.H"
529
530#define FL_NORMAL_CHOICE 0
531#define FL_NORMAL_CHOICE2 0
532#define FL_DROPLIST_CHOICE 0
533
534forms_constructor(Fl_Choice, fl_add_choice)
535 inline void fl_clear_choice(Fl_Widget* o) {
536 ((Fl_Choice*)o)->clear();}
537 inline void fl_addto_choice(Fl_Widget* o, const char* s) {
538 ((Fl_Choice*)o)->add(s);}
539 inline void fl_replace_choice(Fl_Widget* o, int i, const char* s) {
540 ((Fl_Choice*)o)->replace(i-1,s);}
541 inline void fl_delete_choice(Fl_Widget* o, int i) {
542 ((Fl_Choice*)o)->remove(i-1);}
543 inline void fl_set_choice(Fl_Widget* o, int i) {
544 ((Fl_Choice*)o)->value(i-1);}
545// inline void fl_set_choice_text(Fl_Widget*, const char*);
546 inline int fl_get_choice(Fl_Widget* o) {
547 return ((Fl_Choice*)o)->value()+1;}
548// inline const char* fl_get_choice_item_text(Fl_Widget*, int);
549// inline int fl_get_choice_maxitems(Fl_Widget*);
550 inline const char* fl_get_choice_text(Fl_Widget* o) {
551 return ((Fl_Choice*)o)->text();}
552 inline void fl_set_choice_fontsize(Fl_Widget* o, int x) {
553 ((Fl_Choice*)o)->textsize(x);}
554 inline void fl_set_choice_fontstyle(Fl_Widget* o, Fl_Font x) {
555 ((Fl_Choice*)o)->textfont(x);}
556// inline void fl_set_choice_item_mode(Fl_Widget*, int, unsigned);
557// inline void fl_set_choice_item_shortcut(Fl_Widget*, int, const char*);
558
559#include "Fl_Clock.H"
560forms_constructort(Fl_Clock, fl_add_clock)
561 inline void fl_get_clock(Fl_Widget* o, int* h, int* m, int* s) {
562 *h = ((Fl_Clock*)o)->hour();
563 *m = ((Fl_Clock*)o)->minute();
564 *s = ((Fl_Clock*)o)->second();
565}
566
567#include "Fl_Counter.H"
568forms_constructor(Fl_Counter, fl_add_counter)
569 inline void fl_set_counter_value(Fl_Widget* o, double v) {
570 ((Fl_Counter*)o)->value(v);}
571 inline void fl_set_counter_bounds(Fl_Widget* o, double a, double b) {
572 ((Fl_Counter*)o)->bounds(a,b);}
573 inline void fl_set_counter_step(Fl_Widget* o, double a, double b) {
574 ((Fl_Counter*)o)->step(a,b);}
575 inline void fl_set_counter_precision(Fl_Widget* o, int v) {
576 ((Fl_Counter*)o)->precision(v);}
577 inline void fl_set_counter_return(Fl_Widget* o, int v) {
578 ((Fl_Counter*)o)->when((Fl_When)(v|FL_WHEN_RELEASE));}
579 inline double fl_get_counter_value(Fl_Widget* o) {
580 return ((Fl_Counter*)o)->value();}
581 inline void fl_get_counter_bounds(Fl_Widget* o, float* a, float* b) {
582 *a = float(((Fl_Counter*)o)->minimum());
583 *b = float(((Fl_Counter*)o)->maximum());
584}
585//inline void fl_set_counter_filter(Fl_Widget*,const char* (*)(Fl_Widget*,double,int));
586
587// Cursor stuff cannot be emulated because it uses X stuff
588 inline void fl_set_cursor(Fl_Window* w, Fl_Cursor c) {w->cursor(c);}
589#define FL_INVISIBLE_CURSOR FL_CURSOR_NONE
590#define FL_DEFAULT_CURSOR FL_CURSOR_DEFAULT
591
592#include "Fl_Dial.H"
593
594#define FL_DIAL_COL1 FL_GRAY
595#define FL_DIAL_COL2 37
596
597forms_constructor(Fl_Dial, fl_add_dial)
598 inline void fl_set_dial_value(Fl_Widget* o, double v) {
599 ((Fl_Dial*)o)->value(v);}
600 inline double fl_get_dial_value(Fl_Widget* o) {
601 return ((Fl_Dial*)o)->value();}
602 inline void fl_set_dial_bounds(Fl_Widget* o, double a, double b) {
603 ((Fl_Dial*)o)->bounds(a, b);}
604 inline void fl_get_dial_bounds(Fl_Widget* o, float* a, float* b) {
605 *a = float(((Fl_Dial*)o)->minimum());
606 *b = float(((Fl_Dial*)o)->maximum());
607}
608 inline void fl_set_dial_return(Fl_Widget* o, int i) {
609 ((Fl_Dial*)o)->when((Fl_When)(i|FL_WHEN_RELEASE));}
610 inline void fl_set_dial_angles(Fl_Widget* o, int a, int b) {
611 ((Fl_Dial*)o)->angles((short)a, (short)b);}
612//inline void fl_set_dial_cross(Fl_Widget* o, int);
613// inline void fl_set_dial_direction(Fl_Widget* o, uchar d) {
614// ((Fl_Dial*)o)->direction(d);}
615 inline void fl_set_dial_step(Fl_Widget* o, double v) {
616 ((Fl_Dial*)o)->step(v);}
617
618// Frames:
619
620 inline Fl_Widget* fl_add_frame(Fl_Boxtype i,int x,int y,int w,int h,const char* l) {
621 return fl_add_box(i,x-3,y-3,w+6,h+6,l);}
622
623// labelframe nyi
624 inline Fl_Widget* fl_add_labelframe(Fl_Boxtype i,int x,int y,int w,int h,const char* l) {
625 Fl_Widget* o = fl_add_box(i,x-3,y-3,w+6,h+6,l);
626 o->align(FL_ALIGN_TOP_LEFT);
627 return o;
628}
629
630#include "Fl_Free.H"
631 inline Fl_Free*
632fl_add_free(int t,double x,double y,double w,double h,const char* l,
633 FL_HANDLEPTR hdl) {
634 return (Fl_Free*)(fl_add_new(
635 new Fl_Free(t,int(x),int(y),int(w),int(h),l,hdl)));
636}
637
638#include "fl_ask.H"
639#include "fl_show_colormap.H"
640
641 inline int fl_show_question(const char* c, int = 0) {return fl_choice("%s",fl_no,fl_yes,0L,c);}
642FL_EXPORT void fl_show_message(const char *,const char *,const char *);
643FL_EXPORT void fl_show_alert(const char *,const char *,const char *,int=0);
644FL_EXPORT int fl_show_question(const char *,const char *,const char *);
645 inline const char *fl_show_input(const char *l,const char*d=0) {return fl_input("%s",d,l);}
646FL_EXPORT /*const*/ char *fl_show_simple_input(const char *label, const char *deflt = 0);
647FL_EXPORT int fl_show_choice(
648 const char *m1,
649 const char *m2,
650 const char *m3,
651 int numb,
652 const char *b0,
653 const char *b1,
654 const char *b2);
655
656 inline void fl_set_goodies_font(Fl_Font a, Fl_Fontsize b) {fl_message_font(a,b);}
657#define fl_show_messages fl_message
658 inline int fl_show_choices(const char* c,int n,const char* b1,const char* b2,
659 const char* b3, int) {
660 return fl_show_choice(0,c,0,n,b1,b2,b3);
661}
662
663#include "filename.H"
664#include "Fl_File_Chooser.H"
665 inline int do_matching(char* a, const char* b) {return fl_filename_match(a,b);}
666
667// Forms-compatible file chooser (implementation in fselect.C):
668FL_EXPORT char* fl_show_file_selector(const char* message,const char* dir,
669 const char* pat,const char* fname);
670FL_EXPORT char* fl_get_directory();
671FL_EXPORT char* fl_get_pattern();
672FL_EXPORT char* fl_get_filename();
673
674#include "Fl_Input.H"
675forms_constructor(Fl_Input, fl_add_input)
676 inline void fl_set_input(Fl_Widget* o, const char* v) {
677 ((Fl_Input*)o)->value(v);}
678 inline void fl_set_input_return(Fl_Widget* o, int x) {
679 ((Fl_Input*)o)->when((Fl_When)(x | FL_WHEN_RELEASE));}
680 inline void fl_set_input_color(Fl_Widget* o, Fl_Color a, Fl_Color b) {
681 ((Fl_Input*)o)->textcolor(a);
682 ((Fl_Input*)o)->cursor_color(b);
683}
684// inline void fl_set_input_scroll(Fl_Widget*, int);
685 inline void fl_set_input_cursorpos(Fl_Widget* o, int x, int /*y*/) {
686 ((Fl_Input*)o)->insert_position(x);}
687// inline void fl_set_input_selected(Fl_Widget*, int);
688// inline void fl_set_input_selected_range(Fl_Widget*, int, int);
689// inline void fl_set_input_maxchars(Fl_Widget*, int);
690// inline void fl_set_input_format(Fl_Widget*, int, int);
691// inline void fl_set_input_hscrollbar(Fl_Widget*, int);
692// inline void fl_set_input_vscrollbar(Fl_Widget*, int);
693// inline void fl_set_input_xoffset(Fl_Widget*, int);
694// inline void fl_set_input_topline(Fl_Widget*, int);
695// inline void fl_set_input_scrollbarsize(Fl_Widget*, int, int);
696// inline int fl_get_input_topline(Fl_Widget*);
697// inline int fl_get_input_screenlines(Fl_Widget*);
698 inline int fl_get_input_cursorpos(Fl_Widget* o, int*x, int*y) {
699 *x = ((Fl_Input*)o)->insert_position(); *y = 0; return *x;}
700// inline int fl_get_input_numberoflines(Fl_Widget*);
701// inline void fl_get_input_format(Fl_Widget*, int*, int*);
702 inline const char* fl_get_input(Fl_Widget* o) {return ((Fl_Input*)o)->value();}
703
704#include "Fl_Menu_Button.H"
705
706// types are not implemented, they all act like FL_PUSH_MENU:
707#define FL_TOUCH_MENU 0
708#define FL_PUSH_MENU 1
709#define FL_PULLDOWN_MENU 2
710forms_constructor(Fl_Menu_Button, fl_add_menu)
711
712 inline void fl_clear_menu(Fl_Widget* o) {
713 ((Fl_Menu_Button*)o)->clear();}
714 inline void fl_set_menu(Fl_Widget* o, const char* s) {
715 ((Fl_Menu_Button*)o)->clear(); ((Fl_Menu_Button*)o)->add(s);}
716 inline void fl_addto_menu(Fl_Widget* o, const char* s) {
717 ((Fl_Menu_Button*)o)->add(s);}
718 inline void fl_replace_menu_item(Fl_Widget* o, int i, const char* s) {
719 ((Fl_Menu_Button*)o)->replace(i-1,s);}
720 inline void fl_delete_menu_item(Fl_Widget* o, int i) {
721 ((Fl_Menu_Button*)o)->remove(i-1);}
722 inline void fl_set_menu_item_shortcut(Fl_Widget* o, int i, const char* s) {
723 ((Fl_Menu_Button*)o)->shortcut(i-1,fl_old_shortcut(s));}
724 inline void fl_set_menu_item_mode(Fl_Widget* o, int i, long x) {
725 ((Fl_Menu_Button*)o)->mode(i-1,(int)x);}
726 inline void fl_show_menu_symbol(Fl_Widget*, int ) {
727/* ((Fl_Menu_Button*)o)->show_menu_symbol(i); */}
728// inline void fl_set_menu_popup(Fl_Widget*, int);
729 inline int fl_get_menu(Fl_Widget* o) {
730 return ((Fl_Menu_Button*)o)->value()+1;}
731 inline const char* fl_get_menu_item_text(Fl_Widget* o, int i) {
732 return ((Fl_Menu_Button*)o)->text(i);}
733 inline int fl_get_menu_maxitems(Fl_Widget* o) {
734 return ((Fl_Menu_Button*)o)->size();}
735 inline int fl_get_menu_item_mode(Fl_Widget* o, int i) {
736 return ((Fl_Menu_Button*)o)->mode(i);}
737 inline const char* fl_get_menu_text(Fl_Widget* o) {
738 return ((Fl_Menu_Button*)o)->text();}
739
740#include "Fl_Positioner.H"
741#define FL_NORMAL_POSITIONER 0
742forms_constructor(Fl_Positioner, fl_add_positioner)
743 inline void fl_set_positioner_xvalue(Fl_Widget* o, double v) {
744 ((Fl_Positioner*)o)->xvalue(v);}
745 inline double fl_get_positioner_xvalue(Fl_Widget* o) {
746 return ((Fl_Positioner*)o)->xvalue();}
747 inline void fl_set_positioner_xbounds(Fl_Widget* o, double a, double b) {
748 ((Fl_Positioner*)o)->xbounds(a,b);}
749 inline void fl_get_positioner_xbounds(Fl_Widget* o, float* a, float* b) {
750 *a = float(((Fl_Positioner*)o)->xminimum());
751 *b = float(((Fl_Positioner*)o)->xmaximum());
752}
753 inline void fl_set_positioner_yvalue(Fl_Widget* o, double v) {
754 ((Fl_Positioner*)o)->yvalue(v);}
755 inline double fl_get_positioner_yvalue(Fl_Widget* o) {
756 return ((Fl_Positioner*)o)->yvalue();}
757 inline void fl_set_positioner_ybounds(Fl_Widget* o, double a, double b) {
758 ((Fl_Positioner*)o)->ybounds(a,b);}
759 inline void fl_get_positioner_ybounds(Fl_Widget* o, float* a, float* b) {
760 *a = float(((Fl_Positioner*)o)->yminimum());
761 *b = float(((Fl_Positioner*)o)->ymaximum());
762}
763 inline void fl_set_positioner_xstep(Fl_Widget* o, double v) {
764 ((Fl_Positioner*)o)->xstep(v);}
765 inline void fl_set_positioner_ystep(Fl_Widget* o, double v) {
766 ((Fl_Positioner*)o)->ystep(v);}
767 inline void fl_set_positioner_return(Fl_Widget* o, int v) {
768 ((Fl_Positioner*)o)->when((Fl_When)(v|FL_WHEN_RELEASE));}
769
770#include "Fl_Slider.H"
771
772#define FL_HOR_BROWSER_SLIDER FL_HOR_SLIDER
773#define FL_VERT_BROWSER_SLIDER FL_VERT_SLIDER
774
775forms_constructort(Fl_Slider, fl_add_slider)
776#define FL_SLIDER_COL1 FL_GRAY
777 inline void fl_set_slider_value(Fl_Widget* o, double v) {
778 ((Fl_Slider*)o)->value(v);}
779 inline double fl_get_slider_value(Fl_Widget* o) {
780 return ((Fl_Slider*)o)->value();}
781 inline void fl_set_slider_bounds(Fl_Widget* o, double a, double b) {
782 ((Fl_Slider*)o)->bounds(a, b);}
783 inline void fl_get_slider_bounds(Fl_Widget* o, float* a, float* b) {
784 *a = float(((Fl_Slider*)o)->minimum());
785 *b = float(((Fl_Slider*)o)->maximum());
786}
787 inline void fl_set_slider_return(Fl_Widget* o, int i) {
788 ((Fl_Slider*)o)->when((Fl_When)(i|FL_WHEN_RELEASE));}
789 inline void fl_set_slider_step(Fl_Widget* o, double v) {
790 ((Fl_Slider*)o)->step(v);}
791// inline void fl_set_slider_increment(Fl_Widget* o, double v, double);
792 inline void fl_set_slider_size(Fl_Widget* o, double v) {
793 ((Fl_Slider*)o)->slider_size(v);}
794
795#include "Fl_Value_Slider.H"
796forms_constructor(Fl_Value_Slider, fl_add_valslider)
797
798 inline void fl_set_slider_precision(Fl_Widget* o, int i) {
799 ((Fl_Value_Slider*)o)->precision(i);}
800// filter function!
801
802// The forms text object was the same as an Fl_Box except it inverted the
803// meaning of FL_ALIGN_INSIDE. Implementation in forms.cxx
804 class FL_EXPORT Fl_FormsText : public Fl_Widget {
805 protected:
806 void draw() FL_OVERRIDE;
807public:
808 Fl_FormsText(Fl_Boxtype b, int X, int Y, int W, int H, const char* l=0)
809 : Fl_Widget(X,Y,W,H,l) {box(b); align(FL_ALIGN_LEFT);}
810};
811#define FL_NORMAL_TEXT FL_NO_BOX
812forms_constructorb(Fl_FormsText, fl_add_text)
813
814#include "Fl_Timer.H"
815forms_constructort(Fl_Timer, fl_add_timer)
816 inline void fl_set_timer(Fl_Widget* o, double v) {((Fl_Timer*)o)->value(v);}
817 inline double fl_get_timer(Fl_Widget* o) {return ((Fl_Timer*)o)->value();}
818 inline void fl_suspend_timer(Fl_Widget* o) {((Fl_Timer*)o)->suspended(1);}
819 inline void fl_resume_timer(Fl_Widget* o) {((Fl_Timer*)o)->suspended(0);}
820 inline void fl_set_timer_countup(Fl_Widget* o,char d) {((Fl_Timer*)o)->direction(d);}
821 void FL_EXPORT fl_gettime(long* sec, long* usec);
822
823// Fl_XYPlot nyi
824
825
826// stuff from DDForms:
827
828 inline int fl_double_click() {return Fl::event_clicks();}
829 inline void fl_draw() {Fl::flush();}
830
831#endif /* define __FORMS_H__ */
Fl_Font
int Fl_Font
A font number is an index into the internal font table.
Definition Enumerations.H:1063
Fl_Align
unsigned Fl_Align
FLTK type for alignment control.
Definition Enumerations.H:986
Fl_Cursor
Fl_Cursor
The following constants define the mouse cursors that are available in FLTK.
Definition Enumerations.H:1283
Fl_Color
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition Enumerations.H:1120
Fl_Labeltype
Fl_Labeltype
The labeltype() method sets the type of the label.
Definition Enumerations.H:835
Fl_Fontsize
int Fl_Fontsize
Size of a font in pixels.
Definition Enumerations.H:1092
Fl_When
Fl_When
These constants determine when a callback is performed.
Definition Enumerations.H:435
FL_WHEN_RELEASE
@ FL_WHEN_RELEASE
Do the callback when the button or key is released and the value changes.
Definition Enumerations.H:439
Fl_Boxtype
Fl_Boxtype
FLTK standard box types.
Definition Enumerations.H:644
FL_ALIGN_LEFT
const Fl_Align FL_ALIGN_LEFT
Align the label at the left of the widget.
Definition Enumerations.H:1001
Fl.H
Fl static class.
Fl_Box.H
Fl_Box widget.
Fl_Chart.H
Fl_Chart widget.
Fl_Group.H
Fl_Group and Fl_End classes.
Fl_Window.H
Fl_Window widget .
Fl_Bitmap
The Fl_Bitmap class supports caching and drawing of mono-color (bitmap) images.
Definition Fl_Bitmap.H:32
Fl_Box
This widget simply draws its box, and possibly its label.
Definition Fl_Box.H:34
Fl_Browser
The Fl_Browser widget displays a scrolling list of text lines, and manages all the storage for the te...
Definition Fl_Browser.H:86
Fl_Button
Buttons generate callbacks when they are clicked by the user.
Definition Fl_Button.H:76
Fl_Chart
Fl_Chart displays simple charts.
Definition Fl_Chart.H:71
Fl_Check_Button
A button with a "checkmark" to show its status.
Definition Fl_Check_Button.H:28
Fl_Choice
A button that is used to pop up a menu.
Definition Fl_Choice.H:104
Fl_Clock
This widget provides a round analog clock display.
Definition Fl_Clock.H:152
Fl_Counter
Controls a single floating point value with button (or keyboard) arrows.
Definition Fl_Counter.H:44
Fl_Dial
The Fl_Dial widget provides a circular dial to control a single floating point value.
Definition Fl_Dial.H:45
Fl_FormsBitmap
Forms compatibility Bitmap Image Widget.
Definition Fl_FormsBitmap.H:28
Fl_FormsPixmap
Forms pixmap drawing routines.
Definition Fl_FormsPixmap.H:29
Fl_FormsText
Definition forms.H:804
Fl_FormsText::draw
void draw() FL_OVERRIDE
Draws the widget.
Fl_Free
Emulation of the Forms "free" widget.
Definition Fl_Free.H:55
Fl_Group
The Fl_Group class is the main FLTK container widget.
Definition Fl_Group.H:56
Fl_Group::forms_end
void forms_end()
This is for forms compatibility only.
Definition forms_compatibility.cxx:28
Fl_Group::remove
void remove(int index)
Removes the widget at index from the group but does not delete it.
Definition Fl_Group.cxx:585
Fl_Group::current
static Fl_Group * current()
Returns the currently active group.
Definition Fl_Group.cxx:82
Fl_Input
This is the FLTK text input widget.
Definition Fl_Input.H:220
Fl_Light_Button
This subclass displays the "on" state by turning on a light, rather than drawing pushed in.
Definition Fl_Light_Button.H:36
Fl_Pixmap
The Fl_Pixmap class supports caching and drawing of colormap (pixmap) images, including transparency.
Definition Fl_Pixmap.H:36
Fl_Positioner
This class is provided for Forms compatibility.
Definition Fl_Positioner.H:35
Fl_Round_Button
Buttons generate callbacks when they are clicked by the user.
Definition Fl_Round_Button.H:34
Fl_Slider
The Fl_Slider widget contains a sliding knob inside a box.
Definition Fl_Slider.H:59
Fl_Timer
This is provided only to emulate the Forms Timer widget.
Definition Fl_Timer.H:39
Fl_Value_Slider
The Fl_Value_Slider widget is a Fl_Slider widget with a box displaying the current value.
Definition Fl_Value_Slider.H:31
Fl_Widget
Fl_Widget is the base class for all widgets in FLTK.
Definition Fl_Widget.H:112
Fl_Widget::labelcolor
Fl_Color labelcolor() const
Gets the label color.
Definition Fl_Widget.H:550
Fl_Widget::labelfont
Fl_Font labelfont() const
Gets the font to use.
Definition Fl_Widget.H:565
Fl_Widget::color
Fl_Color color() const
Gets the background color of the widget.
Definition Fl_Widget.H:455
Fl_Widget::hide
virtual void hide()
Makes a widget invisible.
Definition Fl_Widget.cxx:263
Fl_Widget::deactivate
void deactivate()
Deactivates the widget.
Definition Fl_Widget.cxx:233
Fl_Widget::label
const char * label() const
Gets the current label text.
Definition Fl_Widget.H:498
Fl_Widget::align
Fl_Align align() const
Gets the label alignment.
Definition Fl_Widget.H:425
Fl_Widget::window
Fl_Window * window() const
Returns a pointer to the nearest parent window up the widget hierarchy.
Definition Fl_Window.cxx:107
Fl_Widget::box
Fl_Boxtype box() const
Gets the box type of the widget.
Definition Fl_Widget.H:440
Fl_Widget::labelsize
Fl_Fontsize labelsize() const
Gets the font size in pixels.
Definition Fl_Widget.H:580
Fl_Widget::redraw
void redraw()
Schedules the drawing of the widget.
Definition Fl.cxx:1668
Fl_Widget::show
virtual void show()
Makes a widget visible.
Definition Fl_Widget.cxx:251
Fl_Widget::labeltype
Fl_Labeltype labeltype() const
Gets the label type.
Definition Fl_Widget.H:534
Fl_Widget::x
void x(int v)
Internal use only.
Definition Fl_Widget.H:150
Fl_Widget::callback
Fl_Callback_p callback() const
Gets the current callback function for the widget.
Definition Fl_Widget.H:740
Fl_Widget::position
void position(int X, int Y)
Repositions the window or widget.
Definition Fl_Widget.H:409
Fl_Widget::resize
virtual void resize(int x, int y, int w, int h)
Changes the size or position of the widget.
Definition Fl_Widget.cxx:138
Fl_Widget::parent
Fl_Group * parent() const
Returns a pointer to the parent widget.
Definition Fl_Widget.H:334
Fl_Widget::when
Fl_When when() const
Returns the conditions under which the callback is called.
Definition Fl_Widget.H:827
Fl_Widget::w
void w(int v)
Internal use only.
Definition Fl_Widget.H:154
Fl_Widget::type
uchar type() const
Gets the widget type.
Definition Fl_Widget.H:351
Fl_Widget::activate
void activate()
Activates the widget.
Definition Fl_Widget.cxx:221
Fl_Widget::size
void size(int W, int H)
Changes the size of the widget.
Definition Fl_Widget.H:418
Fl_Widget::y
void y(int v)
Internal use only.
Definition Fl_Widget.H:152
Fl_Widget::h
void h(int v)
Internal use only.
Definition Fl_Widget.H:156
Fl_Widget::do_callback
void do_callback(Fl_Callback_Reason reason=FL_REASON_UNKNOWN)
Calls the widget callback function with default arguments.
Definition Fl_Widget.H:1089
Fl_Window
This widget produces an actual window.
Definition Fl_Window.H:55
Fl::flush
static void flush()
Causes all the windows that need it to be redrawn and graphics forced out through the pipes.
Definition Fl.cxx:812
Fl::remove_fd
static void remove_fd(int, int when)
Removes a file descriptor handler.
Definition Fl.cxx:2241
Fl::set_idle
static void set_idle(Fl_Old_Idle_Handler cb)
Sets an idle callback.
Definition Fl.H:1300
Fl::add_fd
static void add_fd(int fd, int when, Fl_FD_Handler cb, void *=0)
Adds file descriptor fd to listen to.
Definition Fl.cxx:2228
Fl::add_timeout
static void add_timeout(double t, Fl_Timeout_Handler cb, void *data=0)
Adds a one-shot timeout callback.
Definition Fl.cxx:277
filename.H
File names and URI utility functions.
fl_ask.H
API for common dialogs.
FL_OVERRIDE
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
fl_draw.H
utility header to pull drawing functions together
fl_show_colormap.H
The fl_show_colormap() function hides the implementation classes used to provide the popup window and...
uchar
unsigned char uchar
unsigned char
Definition fl_types.h:30
fl_filename_match
int fl_filename_match(const char *name, const char *pattern)
Checks if a string s matches a pattern p.
Definition filename_match.cxx:49
Fl::set_font
static void set_font(Fl_Font, const char *)
Changes a face.
Definition fl_set_font.cxx:45
Fl::set_color
static void set_color(Fl_Color, uchar, uchar, uchar)
Sets an entry in the fl_color index table.
Definition fl_color.cxx:62
fl_font
Fl_Font fl_font()
Return the face set by the most recent call to fl_font().
Definition fl_draw.H:811
fl_color
Fl_Color fl_color()
Return the last fl_color() that was set.
Definition fl_draw.H:74
fl_draw
void fl_draw(const char *str, int x, int y)
Draw a nul-terminated UTF-8 string starting at the given x, y location.
Definition fl_font.cxx:32
fl_draw_box
void fl_draw_box(Fl_Boxtype, int x, int y, int w, int h, Fl_Color)
Draws a box using given type, position, size and color.
Definition fl_boxtype.cxx:471
Fl::focus
static Fl_Widget * focus()
Gets the current Fl::focus() widget.
Definition Fl.H:883
Fl::event_button
static int event_button()
Gets which particular mouse button caused the current event.
Definition Fl.H:713
Fl::event_clicks
static int event_clicks()
Returns non zero if we had a double click event.
Definition Fl.H:678
fl_yes
const char * fl_yes
string pointer used in common dialogs, you can change it to another language
Definition fl_ask.cxx:64
fl_no
const char * fl_no
string pointer used in common dialogs, you can change it to another language
Definition fl_ask.cxx:63
FL_SOCKET
opaque FL_SOCKET
socket or file descriptor
Definition platform_types.h:57