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