FLTK 1.3.2
|
00001 // 00002 // "$Id$" 00003 // 00004 // Enumerations for the Fast Light Tool Kit (FLTK). 00005 // 00006 // Copyright 1998-2012 by Bill Spitzak and others. 00007 // 00008 // This library is free software. Distribution and use rights are outlined in 00009 // the file "COPYING" which should have been included with this file. If this 00010 // file is missing or damaged, see the license at: 00011 // 00012 // http://www.fltk.org/COPYING.php 00013 // 00014 // Please report all bugs and problems on the following page: 00015 // 00016 // http://www.fltk.org/str.php 00017 // 00018 00023 #ifndef Fl_Enumerations_H 00024 #define Fl_Enumerations_H 00025 00026 /* Uncomment the following FLTK_ABI_VERSION line to enable ABI breaking fixes 00027 * in the current patch release of FLTK. ** Use for static builds only! ** 00028 * For more info on this macro, see: http://fltk.org/cmp.php#FLTK_ABI_VERSION 00029 */ 00030 //#define FLTK_ABI_VERSION 10303 00031 00032 # include "Fl_Export.H" 00033 # include "fl_types.h" 00034 00043 00048 #define FL_MAJOR_VERSION 1 00049 00055 #define FL_MINOR_VERSION 3 00056 00062 #define FL_PATCH_VERSION 2 00063 00075 #define FL_VERSION ((double)FL_MAJOR_VERSION + \ 00076 (double)FL_MINOR_VERSION * 0.01 + \ 00077 (double)FL_PATCH_VERSION * 0.0001) 00078 // group: Version Numbers 00080 00096 enum Fl_Event { // events 00098 FL_NO_EVENT = 0, 00099 00111 FL_PUSH = 1, 00112 00119 FL_RELEASE = 2, 00120 00128 FL_ENTER = 3, 00129 00134 FL_LEAVE = 4, 00135 00143 FL_DRAG = 5, 00144 00158 FL_FOCUS = 6, 00159 00163 FL_UNFOCUS = 7, 00164 00185 FL_KEYDOWN = 8, 00186 00190 FL_KEYBOARD = 8, 00191 00195 FL_KEYUP = 9, 00196 00202 FL_CLOSE = 10, 00203 00210 FL_MOVE = 11, 00211 00224 FL_SHORTCUT = 12, 00225 00231 FL_DEACTIVATE = 13, 00232 00236 FL_ACTIVATE = 14, 00237 00244 FL_HIDE = 15, 00245 00252 FL_SHOW = 16, 00253 00258 FL_PASTE = 17, 00259 00265 FL_SELECTIONCLEAR = 18, 00266 00270 FL_MOUSEWHEEL = 19, 00271 00276 FL_DND_ENTER = 20, 00277 00282 FL_DND_DRAG = 21, 00283 00286 FL_DND_LEAVE = 22, 00287 00292 FL_DND_RELEASE = 23, 00296 FL_SCREEN_CONFIGURATION_CHANGED = 24, 00299 FL_FULLSCREEN = 25 00300 }; 00301 00309 enum Fl_When { // Fl_Widget::when(): 00310 FL_WHEN_NEVER = 0, 00311 FL_WHEN_CHANGED = 1, 00312 FL_WHEN_NOT_CHANGED = 2, 00313 FL_WHEN_RELEASE = 4, 00314 FL_WHEN_RELEASE_ALWAYS= 6, 00315 FL_WHEN_ENTER_KEY = 8, 00316 FL_WHEN_ENTER_KEY_ALWAYS=10, 00317 FL_WHEN_ENTER_KEY_CHANGED=11 00318 }; 00319 // group: When Conditions 00321 00334 00335 // FIXME: These codes collide with valid Unicode keys 00336 00337 #define FL_Button 0xfee8 ///< A mouse button; use Fl_Button + n for mouse button n. 00338 #define FL_BackSpace 0xff08 ///< The backspace key. 00339 #define FL_Tab 0xff09 ///< The tab key. 00340 #define FL_Iso_Key 0xff0c ///< The additional key of ISO keyboards. 00341 #define FL_Enter 0xff0d ///< The enter key. 00342 #define FL_Pause 0xff13 ///< The pause key. 00343 #define FL_Scroll_Lock 0xff14 ///< The scroll lock key. 00344 #define FL_Escape 0xff1b ///< The escape key. 00345 #define FL_Kana 0xff2e ///< The Kana key of JIS keyboards. 00346 #define FL_Eisu 0xff2f ///< The Eisu key of JIS keyboards. 00347 #define FL_Yen 0xff30 ///< The Yen key of JIS keyboards. 00348 #define FL_JIS_Underscore 0xff31 ///< The underscore key of JIS keyboards. 00349 #define FL_Home 0xff50 ///< The home key. 00350 #define FL_Left 0xff51 ///< The left arrow key. 00351 #define FL_Up 0xff52 ///< The up arrow key. 00352 #define FL_Right 0xff53 ///< The right arrow key. 00353 #define FL_Down 0xff54 ///< The down arrow key. 00354 #define FL_Page_Up 0xff55 ///< The page-up key. 00355 #define FL_Page_Down 0xff56 ///< The page-down key. 00356 #define FL_End 0xff57 ///< The end key. 00357 #define FL_Print 0xff61 ///< The print (or print-screen) key. 00358 #define FL_Insert 0xff63 ///< The insert key. 00359 #define FL_Menu 0xff67 ///< The menu key. 00360 #define FL_Help 0xff68 ///< The 'help' key on Mac keyboards 00361 #define FL_Num_Lock 0xff7f ///< The num lock key. 00362 #define FL_KP 0xff80 ///< One of the keypad numbers; use FL_KP + 'n' for digit n. 00363 #define FL_KP_Enter 0xff8d ///< The enter key on the keypad, same as Fl_KP+'\\r'. 00364 #define FL_KP_Last 0xffbd ///< The last keypad key; use to range-check keypad. 00365 #define FL_F 0xffbd ///< One of the function keys; use FL_F + n for function key n. 00366 #define FL_F_Last 0xffe0 ///< The last function key; use to range-check function keys. 00367 #define FL_Shift_L 0xffe1 ///< The lefthand shift key. 00368 #define FL_Shift_R 0xffe2 ///< The righthand shift key. 00369 #define FL_Control_L 0xffe3 ///< The lefthand control key. 00370 #define FL_Control_R 0xffe4 ///< The righthand control key. 00371 #define FL_Caps_Lock 0xffe5 ///< The caps lock key. 00372 #define FL_Meta_L 0xffe7 ///< The left meta/Windows key. 00373 #define FL_Meta_R 0xffe8 ///< The right meta/Windows key. 00374 #define FL_Alt_L 0xffe9 ///< The left alt key. 00375 #define FL_Alt_R 0xffea ///< The right alt key. 00376 #define FL_Delete 0xffff ///< The delete key. 00377 00378 // These use the Private Use Area (PUA) of the Basic Multilingual Plane 00379 // of Unicode. Guaranteed not to conflict with a proper Unicode character. 00380 00381 // These primarily map to the XFree86 keysym range 00382 #define FL_Volume_Down 0xEF11 /* Volume control down */ 00383 #define FL_Volume_Mute 0xEF12 /* Mute sound from the system */ 00384 #define FL_Volume_Up 0xEF13 /* Volume control up */ 00385 #define FL_Media_Play 0xEF14 /* Start playing of audio */ 00386 #define FL_Media_Stop 0xEF15 /* Stop playing audio */ 00387 #define FL_Media_Prev 0xEF16 /* Previous track */ 00388 #define FL_Media_Next 0xEF17 /* Next track */ 00389 #define FL_Home_Page 0xEF18 /* Display user's home page */ 00390 #define FL_Mail 0xEF19 /* Invoke user's mail program */ 00391 #define FL_Search 0xEF1B /* Search */ 00392 #define FL_Back 0xEF26 /* Like back on a browser */ 00393 #define FL_Forward 0xEF27 /* Like forward on a browser */ 00394 #define FL_Stop 0xEF28 /* Stop current operation */ 00395 #define FL_Refresh 0xEF29 /* Refresh the page */ 00396 #define FL_Sleep 0xEF2F /* Put system to sleep */ 00397 #define FL_Favorites 0xEF30 /* Show favorite locations */ 00398 // group: Mouse and Keyboard Events 00400 00409 00410 #define FL_LEFT_MOUSE 1 ///< The left mouse button 00411 #define FL_MIDDLE_MOUSE 2 ///< The middle mouse button 00412 #define FL_RIGHT_MOUSE 3 ///< The right mouse button 00413 // group: Mouse Buttons 00415 00416 00422 // group: Event States 00423 00424 // FIXME: it would be nice to have the modifiers in the upper 8 bit so that 00425 // a unicode ke (24bit) can be sent as an unsigned with the modifiers. 00426 00427 #define FL_SHIFT 0x00010000 ///< One of the shift keys is down 00428 #define FL_CAPS_LOCK 0x00020000 ///< The caps lock is on 00429 #define FL_CTRL 0x00040000 ///< One of the ctrl keys is down 00430 #define FL_ALT 0x00080000 ///< One of the alt keys is down 00431 #define FL_NUM_LOCK 0x00100000 ///< The num lock is on 00432 // most X servers do this? 00433 #define FL_META 0x00400000 ///< One of the meta/Windows keys is down 00434 // correct for XFree86 00435 #define FL_SCROLL_LOCK 0x00800000 ///< The scroll lock is on 00436 // correct for XFree86 00437 #define FL_BUTTON1 0x01000000 ///< Mouse button 1 is pushed 00438 #define FL_BUTTON2 0x02000000 ///< Mouse button 2 is pushed 00439 #define FL_BUTTON3 0x04000000 ///< Mouse button 3 is pushed 00440 #define FL_BUTTONS 0x7f000000 ///< Any mouse button is pushed 00441 #define FL_BUTTON(n) (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed 00442 00443 #define FL_KEY_MASK 0x0000ffff ///< All keys are 16 bit for now 00444 // FIXME: Unicode needs 24 bits! 00445 00446 #ifdef __APPLE__ 00447 # define FL_COMMAND FL_META ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X 00448 # define FL_CONTROL FL_CTRL ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X 00449 #else 00450 # define FL_COMMAND FL_CTRL ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X 00451 # define FL_CONTROL FL_META ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X 00452 #endif // __APPLE__ 00453 // group: Event States 00455 00473 enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C): 00474 00475 FL_NO_BOX = 0, 00476 FL_FLAT_BOX, 00477 FL_UP_BOX, 00478 FL_DOWN_BOX, 00479 FL_UP_FRAME, 00480 FL_DOWN_FRAME, 00481 FL_THIN_UP_BOX, 00482 FL_THIN_DOWN_BOX, 00483 FL_THIN_UP_FRAME, 00484 FL_THIN_DOWN_FRAME, 00485 FL_ENGRAVED_BOX, 00486 FL_EMBOSSED_BOX, 00487 FL_ENGRAVED_FRAME, 00488 FL_EMBOSSED_FRAME, 00489 FL_BORDER_BOX, 00490 _FL_SHADOW_BOX, 00491 FL_BORDER_FRAME, 00492 _FL_SHADOW_FRAME, 00493 _FL_ROUNDED_BOX, 00494 _FL_RSHADOW_BOX, 00495 _FL_ROUNDED_FRAME, 00496 _FL_RFLAT_BOX, 00497 _FL_ROUND_UP_BOX, 00498 _FL_ROUND_DOWN_BOX, 00499 _FL_DIAMOND_UP_BOX, 00500 _FL_DIAMOND_DOWN_BOX, 00501 _FL_OVAL_BOX, 00502 _FL_OSHADOW_BOX, 00503 _FL_OVAL_FRAME, 00504 _FL_OFLAT_BOX, 00505 _FL_PLASTIC_UP_BOX, 00506 _FL_PLASTIC_DOWN_BOX, 00507 _FL_PLASTIC_UP_FRAME, 00508 _FL_PLASTIC_DOWN_FRAME, 00509 _FL_PLASTIC_THIN_UP_BOX, 00510 _FL_PLASTIC_THIN_DOWN_BOX, 00511 _FL_PLASTIC_ROUND_UP_BOX, 00512 _FL_PLASTIC_ROUND_DOWN_BOX, 00513 _FL_GTK_UP_BOX, 00514 _FL_GTK_DOWN_BOX, 00515 _FL_GTK_UP_FRAME, 00516 _FL_GTK_DOWN_FRAME, 00517 _FL_GTK_THIN_UP_BOX, 00518 _FL_GTK_THIN_DOWN_BOX, 00519 _FL_GTK_THIN_UP_FRAME, 00520 _FL_GTK_THIN_DOWN_FRAME, 00521 _FL_GTK_ROUND_UP_BOX, 00522 _FL_GTK_ROUND_DOWN_BOX, 00523 FL_FREE_BOXTYPE 00524 }; 00525 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX(); 00526 #define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX() 00527 #define FL_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_ROUND_UP_BOX()+1) 00528 extern FL_EXPORT Fl_Boxtype fl_define_FL_SHADOW_BOX(); 00529 #define FL_SHADOW_BOX fl_define_FL_SHADOW_BOX() 00530 #define FL_SHADOW_FRAME (Fl_Boxtype)(fl_define_FL_SHADOW_BOX()+2) 00531 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUNDED_BOX(); 00532 #define FL_ROUNDED_BOX fl_define_FL_ROUNDED_BOX() 00533 #define FL_ROUNDED_FRAME (Fl_Boxtype)(fl_define_FL_ROUNDED_BOX()+2) 00534 extern FL_EXPORT Fl_Boxtype fl_define_FL_RFLAT_BOX(); 00535 #define FL_RFLAT_BOX fl_define_FL_RFLAT_BOX() 00536 extern FL_EXPORT Fl_Boxtype fl_define_FL_RSHADOW_BOX(); 00537 #define FL_RSHADOW_BOX fl_define_FL_RSHADOW_BOX() 00538 extern FL_EXPORT Fl_Boxtype fl_define_FL_DIAMOND_BOX(); 00539 #define FL_DIAMOND_UP_BOX fl_define_FL_DIAMOND_BOX() 00540 #define FL_DIAMOND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_DIAMOND_BOX()+1) 00541 extern FL_EXPORT Fl_Boxtype fl_define_FL_OVAL_BOX(); 00542 #define FL_OVAL_BOX fl_define_FL_OVAL_BOX() 00543 #define FL_OSHADOW_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+1) 00544 #define FL_OVAL_FRAME (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+2) 00545 #define FL_OFLAT_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+3) 00546 00547 extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX(); 00548 #define FL_PLASTIC_UP_BOX fl_define_FL_PLASTIC_UP_BOX() 00549 #define FL_PLASTIC_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+1) 00550 #define FL_PLASTIC_UP_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+2) 00551 #define FL_PLASTIC_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+3) 00552 #define FL_PLASTIC_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+4) 00553 #define FL_PLASTIC_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+5) 00554 #define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6) 00555 #define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7) 00556 00557 extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX(); 00558 #define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX() 00559 #define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1) 00560 #define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2) 00561 #define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3) 00562 #define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4) 00563 #define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5) 00564 #define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6) 00565 #define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7) 00566 #define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8) 00567 #define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9) 00568 00569 // conversions of box types to other boxtypes: 00575 inline Fl_Boxtype fl_box(Fl_Boxtype b) { 00576 return (Fl_Boxtype)((b<FL_UP_BOX||b%4>1)?b:(b-2)); 00577 } 00583 inline Fl_Boxtype fl_down(Fl_Boxtype b) { 00584 return (Fl_Boxtype)((b<FL_UP_BOX)?b:(b|1)); 00585 } 00591 inline Fl_Boxtype fl_frame(Fl_Boxtype b) { 00592 return (Fl_Boxtype)((b%4<2)?b:(b+2)); 00593 } 00594 00595 // back-compatibility box types: 00596 #define FL_FRAME FL_ENGRAVED_FRAME 00597 #define FL_FRAME_BOX FL_ENGRAVED_BOX 00598 #define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX 00599 #define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX 00600 // group: Box Types 00602 00615 enum Fl_Labeltype { // labeltypes: 00616 FL_NORMAL_LABEL = 0, 00617 FL_NO_LABEL, 00618 _FL_SHADOW_LABEL, 00619 _FL_ENGRAVED_LABEL, 00620 _FL_EMBOSSED_LABEL, 00621 _FL_MULTI_LABEL, 00622 _FL_ICON_LABEL, 00623 _FL_IMAGE_LABEL, 00624 00625 FL_FREE_LABELTYPE 00626 }; 00627 00632 #define FL_SYMBOL_LABEL FL_NORMAL_LABEL 00633 extern Fl_Labeltype FL_EXPORT fl_define_FL_SHADOW_LABEL(); 00634 #define FL_SHADOW_LABEL fl_define_FL_SHADOW_LABEL() 00635 extern Fl_Labeltype FL_EXPORT fl_define_FL_ENGRAVED_LABEL(); 00636 #define FL_ENGRAVED_LABEL fl_define_FL_ENGRAVED_LABEL() 00637 extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL(); 00638 #define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL() 00639 00672 typedef unsigned Fl_Align; 00674 const Fl_Align FL_ALIGN_CENTER = (Fl_Align)0; 00677 const Fl_Align FL_ALIGN_TOP = (Fl_Align)1; 00679 const Fl_Align FL_ALIGN_BOTTOM = (Fl_Align)2; 00683 const Fl_Align FL_ALIGN_LEFT = (Fl_Align)4; 00685 const Fl_Align FL_ALIGN_RIGHT = (Fl_Align)8; 00687 const Fl_Align FL_ALIGN_INSIDE = (Fl_Align)16; 00689 const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = (Fl_Align)0x0020; 00691 const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = (Fl_Align)0x0000; 00693 const Fl_Align FL_ALIGN_CLIP = (Fl_Align)64; 00695 const Fl_Align FL_ALIGN_WRAP = (Fl_Align)128; 00697 const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT = (Fl_Align)0x0100; 00699 const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE = (Fl_Align)0x0120; 00701 const Fl_Align FL_ALIGN_IMAGE_BACKDROP = (Fl_Align)0x0200; 00702 const Fl_Align FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT; 00703 const Fl_Align FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT; 00704 const Fl_Align FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT; 00705 const Fl_Align FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT; 00706 const Fl_Align FL_ALIGN_LEFT_TOP = 0x0007; // magic value 00707 const Fl_Align FL_ALIGN_RIGHT_TOP = 0x000b; // magic value 00708 const Fl_Align FL_ALIGN_LEFT_BOTTOM = 0x000d; // magic value 00709 const Fl_Align FL_ALIGN_RIGHT_BOTTOM = 0x000e; // magic value 00710 const Fl_Align FL_ALIGN_NOWRAP = (Fl_Align)0; // for back compatibility 00711 const Fl_Align FL_ALIGN_POSITION_MASK = 0x000f; // left, right, top, bottom 00712 const Fl_Align FL_ALIGN_IMAGE_MASK = 0x0320; // l/r, t/b, backdrop 00721 typedef int Fl_Font; 00722 00723 const Fl_Font FL_HELVETICA = 0; 00724 const Fl_Font FL_HELVETICA_BOLD = 1; 00725 const Fl_Font FL_HELVETICA_ITALIC = 2; 00726 const Fl_Font FL_HELVETICA_BOLD_ITALIC = 3; 00727 const Fl_Font FL_COURIER = 4; 00728 const Fl_Font FL_COURIER_BOLD = 5; 00729 const Fl_Font FL_COURIER_ITALIC = 6; 00730 const Fl_Font FL_COURIER_BOLD_ITALIC = 7; 00731 const Fl_Font FL_TIMES = 8; 00732 const Fl_Font FL_TIMES_BOLD = 9; 00733 const Fl_Font FL_TIMES_ITALIC = 10; 00734 const Fl_Font FL_TIMES_BOLD_ITALIC = 11; 00735 const Fl_Font FL_SYMBOL = 12; 00736 const Fl_Font FL_SCREEN = 13; 00737 const Fl_Font FL_SCREEN_BOLD = 14; 00738 const Fl_Font FL_ZAPF_DINGBATS = 15; 00739 00740 const Fl_Font FL_FREE_FONT = 16; 00741 const Fl_Font FL_BOLD = 1; 00742 const Fl_Font FL_ITALIC = 2; 00743 const Fl_Font FL_BOLD_ITALIC = 3; 00744 00750 typedef int Fl_Fontsize; 00751 00752 extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; 00753 00778 typedef unsigned int Fl_Color; 00779 00780 // Standard colors. These are used as default colors in widgets and altered as necessary 00781 const Fl_Color FL_FOREGROUND_COLOR = 0; 00782 const Fl_Color FL_BACKGROUND2_COLOR = 7; 00783 const Fl_Color FL_INACTIVE_COLOR = 8; 00784 const Fl_Color FL_SELECTION_COLOR = 15; 00785 00786 // boxtypes generally limit themselves to these colors so 00787 // the whole ramp is not allocated: 00788 00789 const Fl_Color FL_GRAY0 = 32; // 'A' 00790 const Fl_Color FL_DARK3 = 39; // 'H' 00791 const Fl_Color FL_DARK2 = 45; // 'N' 00792 const Fl_Color FL_DARK1 = 47; // 'P' 00793 const Fl_Color FL_BACKGROUND_COLOR = 49; // 'R' default background color 00794 const Fl_Color FL_LIGHT1 = 50; // 'S' 00795 const Fl_Color FL_LIGHT2 = 52; // 'U' 00796 const Fl_Color FL_LIGHT3 = 54; // 'W' 00797 00798 // FLTK provides a 5x8x5 color cube that is used with colormap visuals 00799 00800 const Fl_Color FL_BLACK = 56; 00801 const Fl_Color FL_RED = 88; 00802 const Fl_Color FL_GREEN = 63; 00803 const Fl_Color FL_YELLOW = 95; 00804 const Fl_Color FL_BLUE = 216; 00805 const Fl_Color FL_MAGENTA = 248; 00806 const Fl_Color FL_CYAN = 223; 00807 const Fl_Color FL_DARK_RED = 72; 00808 00809 const Fl_Color FL_DARK_GREEN = 60; 00810 const Fl_Color FL_DARK_YELLOW = 76; 00811 const Fl_Color FL_DARK_BLUE = 136; 00812 const Fl_Color FL_DARK_MAGENTA = 152; 00813 const Fl_Color FL_DARK_CYAN = 140; 00814 00815 const Fl_Color FL_WHITE = 255; 00816 00817 00818 #define FL_FREE_COLOR (Fl_Color)16 00819 #define FL_NUM_FREE_COLOR 16 00820 #define FL_GRAY_RAMP (Fl_Color)32 00821 #define FL_NUM_GRAY 24 00822 #define FL_GRAY FL_BACKGROUND_COLOR 00823 #define FL_COLOR_CUBE (Fl_Color)56 00824 #define FL_NUM_RED 5 00825 #define FL_NUM_GREEN 8 00826 #define FL_NUM_BLUE 5 00827 00828 FL_EXPORT Fl_Color fl_inactive(Fl_Color c); 00829 00830 FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg); 00831 00832 FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight); 00833 00835 inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); } 00836 00838 inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); } 00839 00841 inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) { 00842 if (!r && !g && !b) return FL_BLACK; 00843 else return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8); 00844 } 00845 00847 inline Fl_Color fl_rgb_color(uchar g) { 00848 if (!g) return FL_BLACK; 00849 else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8); 00850 } 00851 00860 inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);} 00861 00876 inline Fl_Color fl_color_cube(int r, int g, int b) { 00877 return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);} 00878 // group: Colors 00880 00883 00891 enum Fl_Cursor { 00892 FL_CURSOR_DEFAULT = 0, 00893 FL_CURSOR_ARROW = 35, 00894 FL_CURSOR_CROSS = 66, 00895 FL_CURSOR_WAIT = 76, 00896 FL_CURSOR_INSERT = 77, 00897 FL_CURSOR_HAND = 31, 00898 FL_CURSOR_HELP = 47, 00899 FL_CURSOR_MOVE = 27, 00900 // fltk provides bitmaps for these: 00901 FL_CURSOR_NS = 78, 00902 FL_CURSOR_WE = 79, 00903 FL_CURSOR_NWSE = 80, 00904 FL_CURSOR_NESW = 81, 00905 FL_CURSOR_NONE =255, 00906 // for back compatibility (non MSWindows ones): 00907 FL_CURSOR_N = 70, 00908 FL_CURSOR_NE = 69, 00909 FL_CURSOR_E = 49, 00910 FL_CURSOR_SE = 8, 00911 FL_CURSOR_S = 9, 00912 FL_CURSOR_SW = 7, 00913 FL_CURSOR_W = 36, 00914 FL_CURSOR_NW = 68 00915 }; // group: Cursors 00917 00919 enum { // values for "when" passed to Fl::add_fd() 00920 FL_READ = 1, 00921 FL_WRITE = 4, 00922 FL_EXCEPT = 8 00923 }; 00924 00926 enum Fl_Mode { 00927 FL_RGB = 0, 00928 FL_INDEX = 1, 00929 FL_SINGLE = 0, 00930 FL_DOUBLE = 2, 00931 FL_ACCUM = 4, 00932 FL_ALPHA = 8, 00933 FL_DEPTH = 16, 00934 FL_STENCIL = 32, 00935 FL_RGB8 = 64, 00936 FL_MULTISAMPLE= 128, 00937 FL_STEREO = 256, 00938 FL_FAKE_SINGLE = 512 // Fake single buffered windows using double-buffer 00939 }; 00940 00941 // image alpha blending 00942 00943 #define FL_IMAGE_WITH_ALPHA 0x40000000 00944 00946 enum Fl_Damage { 00947 FL_DAMAGE_CHILD = 0x01, 00948 FL_DAMAGE_EXPOSE = 0x02, 00949 FL_DAMAGE_SCROLL = 0x04, 00950 FL_DAMAGE_OVERLAY = 0x08, 00951 FL_DAMAGE_USER1 = 0x10, 00952 FL_DAMAGE_USER2 = 0x20, 00953 FL_DAMAGE_ALL = 0x80 00954 }; 00955 00956 // FLTK 1.0.x compatibility definitions... 00957 # ifdef FLTK_1_0_COMPAT 00958 # define contrast fl_contrast 00959 # define down fl_down 00960 # define frame fl_frame 00961 # define inactive fl_inactive 00962 # endif // FLTK_1_0_COMPAT 00963 00964 #endif 00965 00966 // 00967 // End of "$Id$". 00968 //