FLTK 1.3.2

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

- File List
- File Members

Enumerations.H
Go to the documentation of this file.
1 //
2 // "$Id: Enumerations.H 9742 2012-12-09 18:45:57Z manolo $"
3 //
4 // Enumerations for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2012 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_Enumerations_H
24 #define Fl_Enumerations_H
25
26 /* Uncomment the following FLTK_ABI_VERSION line to enable ABI breaking fixes
27 * in the current patch release of FLTK. ** Use for static builds only! **
28 * For more info on this macro, see: http://fltk.org/cmp.php#FLTK_ABI_VERSION
29 */
30 //#define FLTK_ABI_VERSION 10303
31
32 # include "Fl_Export.H"
33 # include "fl_types.h"
34
43
48 #define FL_MAJOR_VERSION 1
49
55 #define FL_MINOR_VERSION 3
56
62 #define FL_PATCH_VERSION 2
63
75 #define FL_VERSION ((double)FL_MAJOR_VERSION + \
76 (double)FL_MINOR_VERSION * 0.01 + \
77 (double)FL_PATCH_VERSION * 0.0001)
78 // group: Version Numbers
80
96 enum Fl_Event { // events
98 FL_NO_EVENT = 0,
99
111 FL_PUSH = 1,
112
119 FL_RELEASE = 2,
120
128 FL_ENTER = 3,
129
134 FL_LEAVE = 4,
135
143 FL_DRAG = 5,
144
158 FL_FOCUS = 6,
159
163 FL_UNFOCUS = 7,
164
185 FL_KEYDOWN = 8,
186
190 FL_KEYBOARD = 8,
191
195 FL_KEYUP = 9,
196
202 FL_CLOSE = 10,
203
210 FL_MOVE = 11,
211
224 FL_SHORTCUT = 12,
225
231 FL_DEACTIVATE = 13,
232
236 FL_ACTIVATE = 14,
237
244 FL_HIDE = 15,
245
252 FL_SHOW = 16,
253
258 FL_PASTE = 17,
259
265 FL_SELECTIONCLEAR = 18,
266
270 FL_MOUSEWHEEL = 19,
271
276 FL_DND_ENTER = 20,
277
282 FL_DND_DRAG = 21,
283
286 FL_DND_LEAVE = 22,
287
292 FL_DND_RELEASE = 23,
296 FL_SCREEN_CONFIGURATION_CHANGED = 24,
299 FL_FULLSCREEN = 25
300 };
301
309 enum Fl_When { // Fl_Widget::when():
310 FL_WHEN_NEVER = 0,
311 FL_WHEN_CHANGED = 1,
312 FL_WHEN_NOT_CHANGED = 2,
313 FL_WHEN_RELEASE = 4,
314 FL_WHEN_RELEASE_ALWAYS= 6,
315 FL_WHEN_ENTER_KEY = 8,
316 FL_WHEN_ENTER_KEY_ALWAYS=10,
317 FL_WHEN_ENTER_KEY_CHANGED=11
318 };
319 // group: When Conditions
321
334
335 // FIXME: These codes collide with valid Unicode keys
336
337 #define FL_Button 0xfee8
338 #define FL_BackSpace 0xff08
339 #define FL_Tab 0xff09
340 #define FL_Iso_Key 0xff0c
341 #define FL_Enter 0xff0d
342 #define FL_Pause 0xff13
343 #define FL_Scroll_Lock 0xff14
344 #define FL_Escape 0xff1b
345 #define FL_Home 0xff50
346 #define FL_Left 0xff51
347 #define FL_Up 0xff52
348 #define FL_Right 0xff53
349 #define FL_Down 0xff54
350 #define FL_Page_Up 0xff55
351 #define FL_Page_Down 0xff56
352 #define FL_End 0xff57
353 #define FL_Print 0xff61
354 #define FL_Insert 0xff63
355 #define FL_Menu 0xff67
356 #define FL_Help 0xff68
357 #define FL_Num_Lock 0xff7f
358 #define FL_KP 0xff80
359 #define FL_KP_Enter 0xff8d
360 #define FL_KP_Last 0xffbd
361 #define FL_F 0xffbd
362 #define FL_F_Last 0xffe0
363 #define FL_Shift_L 0xffe1
364 #define FL_Shift_R 0xffe2
365 #define FL_Control_L 0xffe3
366 #define FL_Control_R 0xffe4
367 #define FL_Caps_Lock 0xffe5
368 #define FL_Meta_L 0xffe7
369 #define FL_Meta_R 0xffe8
370 #define FL_Alt_L 0xffe9
371 #define FL_Alt_R 0xffea
372 #define FL_Delete 0xffff
373
374 // These use the Private Use Area (PUA) of the Basic Multilingual Plane
375 // of Unicode. Guaranteed not to conflict with a proper Unicode character.
376
377 // These primarily map to the XFree86 keysym range
378 #define FL_Volume_Down 0xEF11 /* Volume control down */
379 #define FL_Volume_Mute 0xEF12 /* Mute sound from the system */
380 #define FL_Volume_Up 0xEF13 /* Volume control up */
381 #define FL_Media_Play 0xEF14 /* Start playing of audio */
382 #define FL_Media_Stop 0xEF15 /* Stop playing audio */
383 #define FL_Media_Prev 0xEF16 /* Previous track */
384 #define FL_Media_Next 0xEF17 /* Next track */
385 #define FL_Home_Page 0xEF18 /* Display user's home page */
386 #define FL_Mail 0xEF19 /* Invoke user's mail program */
387 #define FL_Search 0xEF1B /* Search */
388 #define FL_Back 0xEF26 /* Like back on a browser */
389 #define FL_Forward 0xEF27 /* Like forward on a browser */
390 #define FL_Stop 0xEF28 /* Stop current operation */
391 #define FL_Refresh 0xEF29 /* Refresh the page */
392 #define FL_Sleep 0xEF2F /* Put system to sleep */
393 #define FL_Favorites 0xEF30 /* Show favorite locations */
394 // group: Mouse and Keyboard Events
396
405
406 #define FL_LEFT_MOUSE 1
407 #define FL_MIDDLE_MOUSE 2
408 #define FL_RIGHT_MOUSE 3
409
410 // group: Mouse Buttons
411
412
418 // group: Event States
419
420 // FIXME: it would be nice to have the modifiers in the upper 8 bit so that
421 // a unicode ke (24bit) can be sent as an unsigned with the modifiers.
422
423 #define FL_SHIFT 0x00010000
424 #define FL_CAPS_LOCK 0x00020000
425 #define FL_CTRL 0x00040000
426 #define FL_ALT 0x00080000
427 #define FL_NUM_LOCK 0x00100000
428 // most X servers do this?
429 #define FL_META 0x00400000
430 // correct for XFree86
431 #define FL_SCROLL_LOCK 0x00800000
432 // correct for XFree86
433 #define FL_BUTTON1 0x01000000
434 #define FL_BUTTON2 0x02000000
435 #define FL_BUTTON3 0x04000000
436 #define FL_BUTTONS 0x7f000000
437 #define FL_BUTTON(n) (0x00800000<<(n))
438
439 #define FL_KEY_MASK 0x0000ffff
440 // FIXME: Unicode needs 24 bits!
441
442 #ifdef __APPLE__
443 # define FL_COMMAND FL_META
444 # define FL_CONTROL FL_CTRL
445 #else
446 # define FL_COMMAND FL_CTRL
447 # define FL_CONTROL FL_META
448 #endif // __APPLE__
449 // group: Event States
451
469 enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C):
470
471 FL_NO_BOX = 0,
472 FL_FLAT_BOX,
473 FL_UP_BOX,
474 FL_DOWN_BOX,
475 FL_UP_FRAME,
476 FL_DOWN_FRAME,
477 FL_THIN_UP_BOX,
478 FL_THIN_DOWN_BOX,
479 FL_THIN_UP_FRAME,
480 FL_THIN_DOWN_FRAME,
481 FL_ENGRAVED_BOX,
482 FL_EMBOSSED_BOX,
483 FL_ENGRAVED_FRAME,
484 FL_EMBOSSED_FRAME,
485 FL_BORDER_BOX,
486 _FL_SHADOW_BOX,
487 FL_BORDER_FRAME,
488 _FL_SHADOW_FRAME,
489 _FL_ROUNDED_BOX,
490 _FL_RSHADOW_BOX,
491 _FL_ROUNDED_FRAME,
492 _FL_RFLAT_BOX,
493 _FL_ROUND_UP_BOX,
494 _FL_ROUND_DOWN_BOX,
495 _FL_DIAMOND_UP_BOX,
496 _FL_DIAMOND_DOWN_BOX,
497 _FL_OVAL_BOX,
498 _FL_OSHADOW_BOX,
499 _FL_OVAL_FRAME,
500 _FL_OFLAT_BOX,
501 _FL_PLASTIC_UP_BOX,
502 _FL_PLASTIC_DOWN_BOX,
503 _FL_PLASTIC_UP_FRAME,
504 _FL_PLASTIC_DOWN_FRAME,
505 _FL_PLASTIC_THIN_UP_BOX,
506 _FL_PLASTIC_THIN_DOWN_BOX,
507 _FL_PLASTIC_ROUND_UP_BOX,
508 _FL_PLASTIC_ROUND_DOWN_BOX,
509 _FL_GTK_UP_BOX,
510 _FL_GTK_DOWN_BOX,
511 _FL_GTK_UP_FRAME,
512 _FL_GTK_DOWN_FRAME,
513 _FL_GTK_THIN_UP_BOX,
514 _FL_GTK_THIN_DOWN_BOX,
515 _FL_GTK_THIN_UP_FRAME,
516 _FL_GTK_THIN_DOWN_FRAME,
517 _FL_GTK_ROUND_UP_BOX,
518 _FL_GTK_ROUND_DOWN_BOX,
519 FL_FREE_BOXTYPE
520 };
521 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX();
522 #define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX()
523 #define FL_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_ROUND_UP_BOX()+1)
524 extern FL_EXPORT Fl_Boxtype fl_define_FL_SHADOW_BOX();
525 #define FL_SHADOW_BOX fl_define_FL_SHADOW_BOX()
526 #define FL_SHADOW_FRAME (Fl_Boxtype)(fl_define_FL_SHADOW_BOX()+2)
527 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUNDED_BOX();
528 #define FL_ROUNDED_BOX fl_define_FL_ROUNDED_BOX()
529 #define FL_ROUNDED_FRAME (Fl_Boxtype)(fl_define_FL_ROUNDED_BOX()+2)
530 extern FL_EXPORT Fl_Boxtype fl_define_FL_RFLAT_BOX();
531 #define FL_RFLAT_BOX fl_define_FL_RFLAT_BOX()
532 extern FL_EXPORT Fl_Boxtype fl_define_FL_RSHADOW_BOX();
533 #define FL_RSHADOW_BOX fl_define_FL_RSHADOW_BOX()
534 extern FL_EXPORT Fl_Boxtype fl_define_FL_DIAMOND_BOX();
535 #define FL_DIAMOND_UP_BOX fl_define_FL_DIAMOND_BOX()
536 #define FL_DIAMOND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_DIAMOND_BOX()+1)
537 extern FL_EXPORT Fl_Boxtype fl_define_FL_OVAL_BOX();
538 #define FL_OVAL_BOX fl_define_FL_OVAL_BOX()
539 #define FL_OSHADOW_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+1)
540 #define FL_OVAL_FRAME (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+2)
541 #define FL_OFLAT_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+3)
542
543 extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX();
544 #define FL_PLASTIC_UP_BOX fl_define_FL_PLASTIC_UP_BOX()
545 #define FL_PLASTIC_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+1)
546 #define FL_PLASTIC_UP_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+2)
547 #define FL_PLASTIC_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+3)
548 #define FL_PLASTIC_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+4)
549 #define FL_PLASTIC_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+5)
550 #define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6)
551 #define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7)
552
553 extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX();
554 #define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX()
555 #define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1)
556 #define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2)
557 #define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3)
558 #define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4)
559 #define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5)
560 #define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6)
561 #define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7)
562 #define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8)
563 #define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9)
564
565 // conversions of box types to other boxtypes:
571 inline Fl_Boxtype fl_box(Fl_Boxtype b) {
572 return (Fl_Boxtype)((b<FL_UP_BOX||b%4>1)?b:(b-2));
573 }
579 inline Fl_Boxtype fl_down(Fl_Boxtype b) {
580 return (Fl_Boxtype)((b<FL_UP_BOX)?b:(b|1));
581 }
587 inline Fl_Boxtype fl_frame(Fl_Boxtype b) {
588 return (Fl_Boxtype)((b%4<2)?b:(b+2));
589 }
590
591 // back-compatibility box types:
592 #define FL_FRAME FL_ENGRAVED_FRAME
593 #define FL_FRAME_BOX FL_ENGRAVED_BOX
594 #define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX
595 #define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX
596 // group: Box Types
598
611 enum Fl_Labeltype { // labeltypes:
612 FL_NORMAL_LABEL = 0,
613 FL_NO_LABEL,
614 _FL_SHADOW_LABEL,
615 _FL_ENGRAVED_LABEL,
616 _FL_EMBOSSED_LABEL,
617 _FL_MULTI_LABEL,
618 _FL_ICON_LABEL,
619 _FL_IMAGE_LABEL,
620
621 FL_FREE_LABELTYPE
622 };
623
628 #define FL_SYMBOL_LABEL FL_NORMAL_LABEL
629 extern Fl_Labeltype FL_EXPORT fl_define_FL_SHADOW_LABEL();
630 #define FL_SHADOW_LABEL fl_define_FL_SHADOW_LABEL()
631 extern Fl_Labeltype FL_EXPORT fl_define_FL_ENGRAVED_LABEL();
632 #define FL_ENGRAVED_LABEL fl_define_FL_ENGRAVED_LABEL()
633 extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL();
634 #define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL()
635
668 typedef unsigned Fl_Align;
670 const Fl_Align FL_ALIGN_CENTER = (Fl_Align)0;
673 const Fl_Align FL_ALIGN_TOP = (Fl_Align)1;
675 const Fl_Align FL_ALIGN_BOTTOM = (Fl_Align)2;
679 const Fl_Align FL_ALIGN_LEFT = (Fl_Align)4;
681 const Fl_Align FL_ALIGN_RIGHT = (Fl_Align)8;
683 const Fl_Align FL_ALIGN_INSIDE = (Fl_Align)16;
685 const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = (Fl_Align)0x0020;
687 const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = (Fl_Align)0x0000;
689 const Fl_Align FL_ALIGN_CLIP = (Fl_Align)64;
691 const Fl_Align FL_ALIGN_WRAP = (Fl_Align)128;
693 const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT = (Fl_Align)0x0100;
695 const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE = (Fl_Align)0x0120;
697 const Fl_Align FL_ALIGN_IMAGE_BACKDROP = (Fl_Align)0x0200;
698 const Fl_Align FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT;
699 const Fl_Align FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT;
700 const Fl_Align FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT;
701 const Fl_Align FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT;
702 const Fl_Align FL_ALIGN_LEFT_TOP = 0x0007; // magic value
703 const Fl_Align FL_ALIGN_RIGHT_TOP = 0x000b; // magic value
704 const Fl_Align FL_ALIGN_LEFT_BOTTOM = 0x000d; // magic value
705 const Fl_Align FL_ALIGN_RIGHT_BOTTOM = 0x000e; // magic value
706 const Fl_Align FL_ALIGN_NOWRAP = (Fl_Align)0; // for back compatibility
707 const Fl_Align FL_ALIGN_POSITION_MASK = 0x000f; // left, right, top, bottom
708 const Fl_Align FL_ALIGN_IMAGE_MASK = 0x0320; // l/r, t/b, backdrop
717 typedef int Fl_Font;
718
719 const Fl_Font FL_HELVETICA = 0;
720 const Fl_Font FL_HELVETICA_BOLD = 1;
721 const Fl_Font FL_HELVETICA_ITALIC = 2;
722 const Fl_Font FL_HELVETICA_BOLD_ITALIC = 3;
723 const Fl_Font FL_COURIER = 4;
724 const Fl_Font FL_COURIER_BOLD = 5;
725 const Fl_Font FL_COURIER_ITALIC = 6;
726 const Fl_Font FL_COURIER_BOLD_ITALIC = 7;
727 const Fl_Font FL_TIMES = 8;
728 const Fl_Font FL_TIMES_BOLD = 9;
729 const Fl_Font FL_TIMES_ITALIC = 10;
730 const Fl_Font FL_TIMES_BOLD_ITALIC = 11;
731 const Fl_Font FL_SYMBOL = 12;
732 const Fl_Font FL_SCREEN = 13;
733 const Fl_Font FL_SCREEN_BOLD = 14;
734 const Fl_Font FL_ZAPF_DINGBATS = 15;
735
736 const Fl_Font FL_FREE_FONT = 16;
737 const Fl_Font FL_BOLD = 1;
738 const Fl_Font FL_ITALIC = 2;
739 const Fl_Font FL_BOLD_ITALIC = 3;
740
746 typedef int Fl_Fontsize;
747
748 extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE;
749
774 typedef unsigned int Fl_Color;
775
776 // Standard colors. These are used as default colors in widgets and altered as necessary
777 const Fl_Color FL_FOREGROUND_COLOR = 0;
778 const Fl_Color FL_BACKGROUND2_COLOR = 7;
779 const Fl_Color FL_INACTIVE_COLOR = 8;
780 const Fl_Color FL_SELECTION_COLOR = 15;
781
782 // boxtypes generally limit themselves to these colors so
783 // the whole ramp is not allocated:
784
785 const Fl_Color FL_GRAY0 = 32; // 'A'
786 const Fl_Color FL_DARK3 = 39; // 'H'
787 const Fl_Color FL_DARK2 = 45; // 'N'
788 const Fl_Color FL_DARK1 = 47; // 'P'
789 const Fl_Color FL_BACKGROUND_COLOR = 49; // 'R' default background color
790 const Fl_Color FL_LIGHT1 = 50; // 'S'
791 const Fl_Color FL_LIGHT2 = 52; // 'U'
792 const Fl_Color FL_LIGHT3 = 54; // 'W'
793
794 // FLTK provides a 5x8x5 color cube that is used with colormap visuals
795
796 const Fl_Color FL_BLACK = 56;
797 const Fl_Color FL_RED = 88;
798 const Fl_Color FL_GREEN = 63;
799 const Fl_Color FL_YELLOW = 95;
800 const Fl_Color FL_BLUE = 216;
801 const Fl_Color FL_MAGENTA = 248;
802 const Fl_Color FL_CYAN = 223;
803 const Fl_Color FL_DARK_RED = 72;
804
805 const Fl_Color FL_DARK_GREEN = 60;
806 const Fl_Color FL_DARK_YELLOW = 76;
807 const Fl_Color FL_DARK_BLUE = 136;
808 const Fl_Color FL_DARK_MAGENTA = 152;
809 const Fl_Color FL_DARK_CYAN = 140;
810
811 const Fl_Color FL_WHITE = 255;
812
813
814 #define FL_FREE_COLOR (Fl_Color)16
815 #define FL_NUM_FREE_COLOR 16
816 #define FL_GRAY_RAMP (Fl_Color)32
817 #define FL_NUM_GRAY 24
818 #define FL_GRAY FL_BACKGROUND_COLOR
819 #define FL_COLOR_CUBE (Fl_Color)56
820 #define FL_NUM_RED 5
821 #define FL_NUM_GREEN 8
822 #define FL_NUM_BLUE 5
823
824 FL_EXPORT Fl_Color fl_inactive(Fl_Color c);
825
826 FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg);
827
828 FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight);
829
831 inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); }
832
834 inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); }
835
837 inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) {
838 if (!r && !g && !b) return FL_BLACK;
839 else return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8);
840 }
841
843 inline Fl_Color fl_rgb_color(uchar g) {
844 if (!g) return FL_BLACK;
845 else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8);
846 }
847
856 inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);}
857
872 inline Fl_Color fl_color_cube(int r, int g, int b) {
873 return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);}
874 // group: Colors
876
879
887 enum Fl_Cursor {
888 FL_CURSOR_DEFAULT = 0,
889 FL_CURSOR_ARROW = 1,
890 FL_CURSOR_CROSS = 2,
891 FL_CURSOR_WAIT = 3,
892 FL_CURSOR_INSERT = 4,
893 FL_CURSOR_HAND = 5,
894 FL_CURSOR_HELP = 6,
895 FL_CURSOR_MOVE = 7,
897 /* Resize indicators */
898 FL_CURSOR_NS = 101,
899 FL_CURSOR_WE = 102,
900 FL_CURSOR_NWSE = 103,
901 FL_CURSOR_NESW = 104,
902 FL_CURSOR_NE = 110,
903 FL_CURSOR_N = 111,
904 FL_CURSOR_NW = 112,
905 FL_CURSOR_E = 113,
906 FL_CURSOR_W = 114,
907 FL_CURSOR_SE = 115,
908 FL_CURSOR_S = 116,
909 FL_CURSOR_SW = 117,
911 FL_CURSOR_NONE = 255,
912 }; // group: Cursors
914
916 enum { // values for "when" passed to Fl::add_fd()
917 FL_READ = 1,
918 FL_WRITE = 4,
919 FL_EXCEPT = 8
920 };
921
923 enum Fl_Mode {
924 FL_RGB = 0,
925 FL_INDEX = 1,
926 FL_SINGLE = 0,
927 FL_DOUBLE = 2,
928 FL_ACCUM = 4,
929 FL_ALPHA = 8,
930 FL_DEPTH = 16,
931 FL_STENCIL = 32,
932 FL_RGB8 = 64,
933 FL_MULTISAMPLE= 128,
934 FL_STEREO = 256,
935 FL_FAKE_SINGLE = 512 // Fake single buffered windows using double-buffer
936 };
937
938 // image alpha blending
939
940 #define FL_IMAGE_WITH_ALPHA 0x40000000
941
943 enum Fl_Damage {
944 FL_DAMAGE_CHILD = 0x01,
945 FL_DAMAGE_EXPOSE = 0x02,
946 FL_DAMAGE_SCROLL = 0x04,
947 FL_DAMAGE_OVERLAY = 0x08,
948 FL_DAMAGE_USER1 = 0x10,
949 FL_DAMAGE_USER2 = 0x20,
950 FL_DAMAGE_ALL = 0x80
951 };
952
953 // FLTK 1.0.x compatibility definitions...
954 # ifdef FLTK_1_0_COMPAT
955 # define contrast fl_contrast
956 # define down fl_down
957 # define frame fl_frame
958 # define inactive fl_inactive
959 # endif // FLTK_1_0_COMPAT
960
961 #endif
962
963 //
964 // End of "$Id: Enumerations.H 9742 2012-12-09 18:45:57Z manolo $".
965 //
FL_ALIGN_CLIP
const Fl_Align FL_ALIGN_CLIP
All parts of the label that are lager than the widget will not be drawn .
Definition: Enumerations.H:689
FL_CURSOR_WAIT
busy indicator (e.g.
Definition: Enumerations.H:891
FL_CURSOR_NONE
invisible.
Definition: Enumerations.H:911
FL_WHEN_RELEASE
Do the callback when the button or key is released and the value changes.
Definition: Enumerations.H:313
fl_box
Fl_Boxtype fl_box(Fl_Boxtype b)
Get the filled version of a frame.
Definition: Enumerations.H:571
_FL_GTK_DOWN_FRAME
gtk+ version of FL_DOWN_RAME
Definition: Enumerations.H:512
FL_SELECTIONCLEAR
The Fl::selection_owner() will get this event before the selection is moved to another widget...
Definition: Enumerations.H:265
fl_darker
Fl_Color fl_darker(Fl_Color c)
Returns a darker version of the specified color.
Definition: Enumerations.H:834
Fl_Cursor
Fl_Cursor
The following constants define the mouse cursors that are available in FLTK.
Definition: Enumerations.H:887
fl_frame
Fl_Boxtype fl_frame(Fl_Boxtype b)
Get the unfilled, frame only version of a box.
Definition: Enumerations.H:587
FL_FREE_FONT
const Fl_Font FL_FREE_FONT
first one to allocate
Definition: Enumerations.H:736
FL_HELVETICA_BOLD
const Fl_Font FL_HELVETICA_BOLD
Helvetica (or Arial) bold.
Definition: Enumerations.H:720
_FL_PLASTIC_THIN_DOWN_BOX
plastic version of FL_THIN_DOWN_BOX
Definition: Enumerations.H:506
FL_COURIER_ITALIC
const Fl_Font FL_COURIER_ITALIC
Courier italic.
Definition: Enumerations.H:725
FL_BACKGROUND2_COLOR
const Fl_Color FL_BACKGROUND2_COLOR
the default background color for text, list, and valuator widgets
Definition: Enumerations.H:778
FL_CURSOR_SW
downwards, left resize.
Definition: Enumerations.H:909
_FL_GTK_ROUND_DOWN_BOX
gtk+ version of FL_ROUND_DOWN_BOX
Definition: Enumerations.H:518
FL_EXCEPT
Call the callback if an exception occurs on the file.
Definition: Enumerations.H:919
FL_DAMAGE_USER2
Second user-defined damage bit.
Definition: Enumerations.H:949
FL_ALIGN_IMAGE_NEXT_TO_TEXT
const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT
If the label contains an image, draw the text to the right of the image.
Definition: Enumerations.H:693
_FL_ROUND_DOWN_BOX
see figure 1
Definition: Enumerations.H:494
_FL_SHADOW_BOX
see figure 1
Definition: Enumerations.H:486
_FL_DIAMOND_DOWN_BOX
see figure 1
Definition: Enumerations.H:496
FL_PASTE
You should get this event some time after you call Fl::paste().
Definition: Enumerations.H:258
_FL_PLASTIC_UP_FRAME
plastic version of FL_UP_FRAME
Definition: Enumerations.H:503
FL_CURSOR_HELP
question mark pointer.
Definition: Enumerations.H:894
FL_TIMES_BOLD
const Fl_Font FL_TIMES_BOLD
Times roman bold.
Definition: Enumerations.H:728
FL_PUSH
A mouse button has gone down with the mouse pointing at this widget.
Definition: Enumerations.H:111
FL_FOCUS
This indicates an attempt to give a widget the keyboard focus.
Definition: Enumerations.H:158
FL_CURSOR_HAND
pointing hand.
Definition: Enumerations.H:893
FL_DOWN_BOX
see figure 1
Definition: Enumerations.H:474
fl_gray_ramp
Fl_Color fl_gray_ramp(int i)
Returns a gray color value from black (i == 0) to white (i == FL_NUM_GRAY - 1).
Definition: Enumerations.H:856
FL_ZAPF_DINGBATS
const Fl_Font FL_ZAPF_DINGBATS
Zapf-dingbats font.
Definition: Enumerations.H:734
FL_DAMAGE_ALL
Everything needs to be redrawn.
Definition: Enumerations.H:950
FL_BORDER_BOX
see figure 1
Definition: Enumerations.H:485
FL_DEACTIVATE
This widget is no longer active, due to Fl_Widget::deactivate() being called on it or one of its pare...
Definition: Enumerations.H:231
FL_HIDE
This widget is no longer visible, due to Fl_Widget::hide() being called on it or one of its parents...
Definition: Enumerations.H:244
FL_ALIGN_IMAGE_OVER_TEXT
const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT
If the label contains an image, draw the text below the image.
Definition: Enumerations.H:687
fl_lighter
Fl_Color fl_lighter(Fl_Color c)
Returns a lighter version of the specified color.
Definition: Enumerations.H:831
FL_ACTIVATE
This widget is now active, due to Fl_Widget::activate() being called on it or one of its parents...
Definition: Enumerations.H:236
FL_WHEN_NOT_CHANGED
Do the callback whenever the user interacts with the widget.
Definition: Enumerations.H:312
_FL_OVAL_FRAME
see figure 1
Definition: Enumerations.H:499
FL_COURIER
const Fl_Font FL_COURIER
Courier normal.
Definition: Enumerations.H:723
FL_WHEN_ENTER_KEY
Do the callback when the user presses the ENTER key and the value changes.
Definition: Enumerations.H:315
Fl_When
Fl_When
These constants determine when a callback is performed.
Definition: Enumerations.H:309
FL_DOWN_FRAME
see figure 1
Definition: Enumerations.H:476
FL_ENGRAVED_BOX
see figure 1
Definition: Enumerations.H:481
FL_FOREGROUND_COLOR
const Fl_Color FL_FOREGROUND_COLOR
the default foreground color (0) used for labels and text
Definition: Enumerations.H:777
_FL_IMAGE_LABEL
?
Definition: Enumerations.H:619
_FL_OFLAT_BOX
see figure 1
Definition: Enumerations.H:500
FL_CURSOR_S
downwards resize.
Definition: Enumerations.H:908
_FL_PLASTIC_DOWN_BOX
plastic version of FL_DOWN_BOX
Definition: Enumerations.H:502
FL_DND_RELEASE
The user has released the mouse button dropping data into the widget.
Definition: Enumerations.H:292
FL_INACTIVE_COLOR
const Fl_Color FL_INACTIVE_COLOR
the inactive foreground color
Definition: Enumerations.H:779
fl_rgb_color
Fl_Color fl_rgb_color(uchar r, uchar g, uchar b)
Returns the 24-bit color value closest to r, g, b.
Definition: Enumerations.H:837
FL_DND_DRAG
The mouse has been moved inside a widget while dragging data.
Definition: Enumerations.H:282
_FL_GTK_THIN_DOWN_FRAME
gtk+ version of FL_THIN_DOWN_FRAME
Definition: Enumerations.H:516
Fl_Mode
Fl_Mode
visual types and Fl_Gl_Window::mode() (values match Glut)
Definition: Enumerations.H:923
Fl_Damage
Fl_Damage
Damage masks.
Definition: Enumerations.H:943
FL_RELEASE
A mouse button has been released.
Definition: Enumerations.H:119
_FL_DIAMOND_UP_BOX
see figure 1
Definition: Enumerations.H:495
FL_KEYDOWN
A key was pressed (FL_KEYDOWN) or released (FL_KEYUP).
Definition: Enumerations.H:185
FL_THIN_DOWN_FRAME
see figure 1
Definition: Enumerations.H:480
fl_contrast
FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg)
Returns a color that contrasts with the background color.
Definition: fl_color.cxx:435
_FL_MULTI_LABEL
?
Definition: Enumerations.H:617
FL_DAMAGE_CHILD
A child needs to be redrawn.
Definition: Enumerations.H:944
_FL_ROUNDED_FRAME
see figure 1
Definition: Enumerations.H:491
FL_CURSOR_NWSE
diagonal resize.
Definition: Enumerations.H:900
FL_WHEN_CHANGED
Do the callback only when the widget value changes.
Definition: Enumerations.H:311
FL_ITALIC
const Fl_Font FL_ITALIC
add this to helvetica, courier, or times
Definition: Enumerations.H:738
FL_ALIGN_CENTER
const Fl_Align FL_ALIGN_CENTER
Align the label horizontally in the middle.
Definition: Enumerations.H:670
_FL_PLASTIC_THIN_UP_BOX
plastic version of FL_THIN_UP_BOX
Definition: Enumerations.H:505
Fl_Event
Fl_Event
Every time a user moves the mouse pointer, clicks a button, or presses a key, an event is generated a...
Definition: Enumerations.H:96
Fl_Boxtype
Fl_Boxtype
Definition: Enumerations.H:469
_FL_ROUNDED_BOX
see figure 1
Definition: Enumerations.H:489
FL_CURSOR_NESW
diagonal resize.
Definition: Enumerations.H:901
FL_MOUSEWHEEL
The user has moved the mouse wheel.
Definition: Enumerations.H:270
FL_THIN_DOWN_BOX
see figure 1
Definition: Enumerations.H:478
FL_ALIGN_INSIDE
const Fl_Align FL_ALIGN_INSIDE
Draw the label inside of the widget.
Definition: Enumerations.H:683
_FL_GTK_ROUND_UP_BOX
gtk+ version of FL_ROUND_UP_BOX
Definition: Enumerations.H:517
FL_BORDER_FRAME
see figure 1
Definition: Enumerations.H:487
FL_DND_ENTER
The mouse has been moved to point at this widget.
Definition: Enumerations.H:276
FL_UP_BOX
see figure 1
Definition: Enumerations.H:473
FL_CURSOR_NS
up/down resize.
Definition: Enumerations.H:898
FL_NORMAL_LABEL
draws the text (0)
Definition: Enumerations.H:612
FL_KEYUP
Key release event.
Definition: Enumerations.H:195
_FL_GTK_UP_BOX
gtk+ version of FL_UP_BOX
Definition: Enumerations.H:509
FL_EMBOSSED_FRAME
see figure 1
Definition: Enumerations.H:484
FL_FULLSCREEN
The fullscreen state of the window has changed.
Definition: Enumerations.H:299
FL_CURSOR_INSERT
I-beam.
Definition: Enumerations.H:892
FL_TIMES_BOLD_ITALIC
const Fl_Font FL_TIMES_BOLD_ITALIC
Times roman bold-italic.
Definition: Enumerations.H:730
_FL_PLASTIC_UP_BOX
plastic version of FL_UP_BOX
Definition: Enumerations.H:501
FL_CLOSE
The user clicked the close button of a window.
Definition: Enumerations.H:202
_FL_GTK_DOWN_BOX
gtk+ version of FL_DOWN_BOX
Definition: Enumerations.H:510
FL_CURSOR_W
rightwards resize.
Definition: Enumerations.H:906
_FL_SHADOW_LABEL
draws a drop shadow under the text
Definition: Enumerations.H:614
_FL_OVAL_BOX
see figure 1
Definition: Enumerations.H:497
fl_inactive
FL_EXPORT Fl_Color fl_inactive(Fl_Color c)
Returns the inactive, dimmed version of the given color.
Definition: fl_color.cxx:423
FL_DAMAGE_SCROLL
The Fl_Scroll widget was scrolled.
Definition: Enumerations.H:946
FL_ENGRAVED_FRAME
see figure 1
Definition: Enumerations.H:483
FL_COURIER_BOLD
const Fl_Font FL_COURIER_BOLD
Courier bold.
Definition: Enumerations.H:724
FL_NO_BOX
nothing is drawn at all, this box is invisible
Definition: Enumerations.H:471
FL_CURSOR_N
upwards resize.
Definition: Enumerations.H:903
FL_SCREEN_BOLD
const Fl_Font FL_SCREEN_BOLD
Default monospaced bold screen font.
Definition: Enumerations.H:733
FL_CURSOR_WE
left/right resize.
Definition: Enumerations.H:899
_FL_ENGRAVED_LABEL
draws edges as though the text is engraved
Definition: Enumerations.H:615
FL_WHEN_RELEASE_ALWAYS
Do the callback when the button or key is released, even if the value doesn&#39;t change.
Definition: Enumerations.H:314
FL_DAMAGE_OVERLAY
The overlay planes need to be redrawn.
Definition: Enumerations.H:947
FL_BOLD_ITALIC
const Fl_Font FL_BOLD_ITALIC
add this to helvetica, courier, or times
Definition: Enumerations.H:739
_FL_GTK_THIN_DOWN_BOX
gtk+ version of FL_THIN_DOWN_BOX
Definition: Enumerations.H:514
FL_UNFOCUS
This event is sent to the previous Fl::focus() widget when another widget gets the focus or the windo...
Definition: Enumerations.H:163
FL_HELVETICA_ITALIC
const Fl_Font FL_HELVETICA_ITALIC
Helvetica (or Arial) oblique.
Definition: Enumerations.H:721
FL_CURSOR_NW
upwards, left resize.
Definition: Enumerations.H:904
FL_WRITE
Call the callback when data can be written without blocking.
Definition: Enumerations.H:918
FL_CURSOR_ARROW
an arrow pointer.
Definition: Enumerations.H:889
FL_CURSOR_SE
downwards, right resize.
Definition: Enumerations.H:907
Fl_Fontsize
int Fl_Fontsize
Size of a font in pixels.
Definition: Enumerations.H:746
FL_WHEN_NEVER
Never call the callback.
Definition: Enumerations.H:310
FL_DRAG
The mouse has moved with a button held down.
Definition: Enumerations.H:143
FL_SELECTION_COLOR
const Fl_Color FL_SELECTION_COLOR
the default selection/highlight color
Definition: Enumerations.H:780
_FL_RSHADOW_BOX
see figure 1
Definition: Enumerations.H:490
_FL_PLASTIC_DOWN_FRAME
plastic version of FL_DOWN_FRAME
Definition: Enumerations.H:504
FL_ALIGN_WRAP
const Fl_Align FL_ALIGN_WRAP
Wrap text that does not fit the width of the widget.
Definition: Enumerations.H:691
_FL_GTK_UP_FRAME
gtk+ version of FL_UP_FRAME
Definition: Enumerations.H:511
FL_CURSOR_MOVE
4-pointed arrow or hand.
Definition: Enumerations.H:895
FL_UP_FRAME
see figure 1
Definition: Enumerations.H:475
FL_BOLD
const Fl_Font FL_BOLD
add this to helvetica, courier, or times
Definition: Enumerations.H:737
FL_CURSOR_CROSS
crosshair.
Definition: Enumerations.H:890
FL_SCREEN_CONFIGURATION_CHANGED
The screen configuration (number, positions) was changed.
Definition: Enumerations.H:296
FL_NORMAL_SIZE
FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE
normal font size
Definition: Fl_Widget.cxx:102
Fl_Color
unsigned int Fl_Color
an FLTK color value
Definition: Enumerations.H:774
Fl_Labeltype
Fl_Labeltype
The labeltype() method sets the type of the label.
Definition: Enumerations.H:611
FL_SHOW
This widget is visible again, due to Fl_Widget::show() being called on it or one of its parents...
Definition: Enumerations.H:252
FL_CURSOR_DEFAULT
the default cursor, usually an arrow.
Definition: Enumerations.H:888
fl_types.h
This file contains simple &quot;C&quot;-style type definitions.
Fl_Font
int Fl_Font
A font number is an index into the internal font table.
Definition: Enumerations.H:717
FL_ALIGN_TOP
const Fl_Align FL_ALIGN_TOP
Align the label at the top of the widget.
Definition: Enumerations.H:673
_FL_ICON_LABEL
draws the icon associated with the text
Definition: Enumerations.H:618
FL_THIN_UP_BOX
see figure 1
Definition: Enumerations.H:477
FL_FLAT_BOX
a flat box
Definition: Enumerations.H:472
Fl_Align
unsigned Fl_Align
FLTK type for alignment control.
Definition: Enumerations.H:668
FL_SYMBOL
const Fl_Font FL_SYMBOL
Standard symbol font.
Definition: Enumerations.H:731
FL_MOVE
The mouse has moved without any mouse buttons held down.
Definition: Enumerations.H:210
FL_DAMAGE_EXPOSE
The window was exposed.
Definition: Enumerations.H:945
_FL_PLASTIC_ROUND_UP_BOX
plastic version of FL_ROUND_UP_BOX
Definition: Enumerations.H:507
fl_color_cube
Fl_Color fl_color_cube(int r, int g, int b)
Returns a color out of the color cube.
Definition: Enumerations.H:872
FL_EMBOSSED_BOX
see figure 1
Definition: Enumerations.H:482
_FL_OSHADOW_BOX
see figure 1
Definition: Enumerations.H:498
FL_HELVETICA_BOLD_ITALIC
const Fl_Font FL_HELVETICA_BOLD_ITALIC
Helvetica (or Arial) bold-oblique.
Definition: Enumerations.H:722
_FL_ROUND_UP_BOX
see figure 1
Definition: Enumerations.H:493
FL_HELVETICA
const Fl_Font FL_HELVETICA
Helvetica (or Arial) normal (0)
Definition: Enumerations.H:719
_FL_GTK_THIN_UP_BOX
gtk+ version of FL_THIN_UP_BOX
Definition: Enumerations.H:513
FL_WHEN_ENTER_KEY_ALWAYS
Do the callback when the user presses the ENTER key, even if the value doesn&#39;t change.
Definition: Enumerations.H:316
FL_WHEN_ENTER_KEY_CHANGED
?
Definition: Enumerations.H:317
FL_CURSOR_NE
upwards, right resize.
Definition: Enumerations.H:902
FL_NO_LABEL
does nothing
Definition: Enumerations.H:613
_FL_RFLAT_BOX
see figure 1
Definition: Enumerations.H:492
FL_FREE_LABELTYPE
first free labeltype to use for creating own labeltypes
Definition: Enumerations.H:621
fl_color_average
FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight)
Returns the weighted average color between the two given colors.
Definition: fl_color.cxx:402
FL_ALIGN_BOTTOM
const Fl_Align FL_ALIGN_BOTTOM
Align the label at the bottom of the widget.
Definition: Enumerations.H:675
FL_TIMES_ITALIC
const Fl_Font FL_TIMES_ITALIC
Times roman italic.
Definition: Enumerations.H:729
FL_FREE_BOXTYPE
the first free box type for creation of new box types
Definition: Enumerations.H:519
FL_TIMES
const Fl_Font FL_TIMES
Times roman.
Definition: Enumerations.H:727
FL_ENTER
The mouse has been moved to point at this widget.
Definition: Enumerations.H:128
FL_DND_LEAVE
The mouse has moved out of the widget.
Definition: Enumerations.H:286
FL_ALIGN_TEXT_NEXT_TO_IMAGE
const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE
If the label contains an image, draw the text to the left of the image.
Definition: Enumerations.H:695
FL_ALIGN_LEFT
const Fl_Align FL_ALIGN_LEFT
Align the label at the left of the widget.
Definition: Enumerations.H:679
FL_ALIGN_TEXT_OVER_IMAGE
const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE
If the label contains an image, draw the text on top of the image.
Definition: Enumerations.H:685
FL_LEAVE
The mouse has moved out of the widget.
Definition: Enumerations.H:134
FL_DAMAGE_USER1
First user-defined damage bit.
Definition: Enumerations.H:948
FL_READ
Call the callback when there is data to be read.
Definition: Enumerations.H:917
FL_COURIER_BOLD_ITALIC
const Fl_Font FL_COURIER_BOLD_ITALIC
Courier bold-italic.
Definition: Enumerations.H:726
FL_KEYBOARD
Equivalent to FL_KEYDOWN.
Definition: Enumerations.H:190
FL_CURSOR_E
leftwards resize.
Definition: Enumerations.H:905
_FL_PLASTIC_ROUND_DOWN_BOX
plastic version of FL_ROUND_DOWN_BOX
Definition: Enumerations.H:508
_FL_SHADOW_FRAME
see figure 1
Definition: Enumerations.H:488
FL_THIN_UP_FRAME
see figure 1
Definition: Enumerations.H:479
uchar
unsigned char uchar
unsigned char
Definition: fl_types.h:30
FL_SHORTCUT
If the Fl::focus() widget is zero or ignores an FL_KEYBOARD event then FLTK tries sending this event ...
Definition: Enumerations.H:224
FL_SCREEN
const Fl_Font FL_SCREEN
Default monospaced screen font.
Definition: Enumerations.H:732
FL_NO_EVENT
No event.
Definition: Enumerations.H:98
FL_ALIGN_IMAGE_BACKDROP
const Fl_Align FL_ALIGN_IMAGE_BACKDROP
If the label contains an image, draw the image or deimage in the background.
Definition: Enumerations.H:697
_FL_GTK_THIN_UP_FRAME
gtk+ version of FL_UP_FRAME
Definition: Enumerations.H:515
fl_down
Fl_Boxtype fl_down(Fl_Boxtype b)
Get the &quot;pressed&quot; or &quot;down&quot; version of a box.
Definition: Enumerations.H:579
FL_ALIGN_RIGHT
const Fl_Align FL_ALIGN_RIGHT
Align the label to the right of the widget.
Definition: Enumerations.H:681
_FL_EMBOSSED_LABEL
draws edges as though the text is raised
Definition: Enumerations.H:616
- © 1998-2012 by Bill Spitzak and others.