FLTK 1.3.0
|
00001 // 00002 // "$Id$" 00003 // 00004 // Enumerations for the Fast Light Tool Kit (FLTK). 00005 // 00006 // Copyright 1998-2010 by Bill Spitzak and others. 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Library General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2 of the License, or (at your option) any later version. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 // Library General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU Library General Public 00019 // License along with this library; if not, write to the Free Software 00020 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00021 // USA. 00022 // 00023 // Please report all bugs and problems on the following page: 00024 // 00025 // http://www.fltk.org/str.php 00026 // 00027 00032 #ifndef Fl_Enumerations_H 00033 #define Fl_Enumerations_H 00034 00035 # include "Fl_Export.H" 00036 # include "fl_types.h" 00037 00046 00051 #define FL_MAJOR_VERSION 1 00052 00058 #define FL_MINOR_VERSION 3 00059 00065 #define FL_PATCH_VERSION 0 00066 00082 #define FL_VERSION ((double)FL_MAJOR_VERSION + \ 00083 (double)FL_MINOR_VERSION * 0.01 + \ 00084 (double)FL_PATCH_VERSION * 0.0001) 00085 // group: Version Numbers 00087 00103 enum Fl_Event { // events 00105 FL_NO_EVENT = 0, 00106 00118 FL_PUSH = 1, 00119 00126 FL_RELEASE = 2, 00127 00135 FL_ENTER = 3, 00136 00141 FL_LEAVE = 4, 00142 00150 FL_DRAG = 5, 00151 00165 FL_FOCUS = 6, 00166 00170 FL_UNFOCUS = 7, 00171 00190 FL_KEYDOWN = 8, 00191 00195 FL_KEYBOARD = 8, 00196 00200 FL_KEYUP = 9, 00201 00207 FL_CLOSE = 10, 00208 00215 FL_MOVE = 11, 00216 00229 FL_SHORTCUT = 12, 00230 00236 FL_DEACTIVATE = 13, 00237 00241 FL_ACTIVATE = 14, 00242 00249 FL_HIDE = 15, 00250 00257 FL_SHOW = 16, 00258 00263 FL_PASTE = 17, 00264 00270 FL_SELECTIONCLEAR = 18, 00271 00275 FL_MOUSEWHEEL = 19, 00276 00281 FL_DND_ENTER = 20, 00282 00287 FL_DND_DRAG = 21, 00288 00291 FL_DND_LEAVE = 22, 00292 00297 FL_DND_RELEASE = 23 00298 }; 00299 00307 enum Fl_When { // Fl_Widget::when(): 00308 FL_WHEN_NEVER = 0, 00309 FL_WHEN_CHANGED = 1, 00310 FL_WHEN_NOT_CHANGED = 2, 00311 FL_WHEN_RELEASE = 4, 00312 FL_WHEN_RELEASE_ALWAYS= 6, 00313 FL_WHEN_ENTER_KEY = 8, 00314 FL_WHEN_ENTER_KEY_ALWAYS=10, 00315 FL_WHEN_ENTER_KEY_CHANGED=11 00316 }; 00317 // group: When Conditions 00319 00332 00333 // FIXME: These codes collide with valid Unicode keys 00334 00335 #define FL_Button 0xfee8 ///< A mouse button; use Fl_Button + n for mouse button n. 00336 #define FL_BackSpace 0xff08 ///< The backspace key. 00337 #define FL_Tab 0xff09 ///< The tab key. 00338 #define FL_Enter 0xff0d ///< The enter key. 00339 #define FL_Pause 0xff13 ///< The pause key. 00340 #define FL_Scroll_Lock 0xff14 ///< The scroll lock key. 00341 #define FL_Escape 0xff1b ///< The escape key. 00342 #define FL_Home 0xff50 ///< The home key. 00343 #define FL_Left 0xff51 ///< The left arrow key. 00344 #define FL_Up 0xff52 ///< The up arrow key. 00345 #define FL_Right 0xff53 ///< The right arrow key. 00346 #define FL_Down 0xff54 ///< The down arrow key. 00347 #define FL_Page_Up 0xff55 ///< The page-up key. 00348 #define FL_Page_Down 0xff56 ///< The page-down key. 00349 #define FL_End 0xff57 ///< The end key. 00350 #define FL_Print 0xff61 ///< The print (or print-screen) key. 00351 #define FL_Insert 0xff63 ///< The insert key. 00352 #define FL_Menu 0xff67 ///< The menu key. 00353 #define FL_Help 0xff68 ///< The 'help' key on Mac keyboards 00354 #define FL_Num_Lock 0xff7f ///< The num lock key. 00355 #define FL_KP 0xff80 ///< One of the keypad numbers; use FL_KP + n for number n. 00356 #define FL_KP_Enter 0xff8d ///< The enter key on the keypad, same as Fl_KP+'\\r'. 00357 #define FL_KP_Last 0xffbd ///< The last keypad key; use to range-check keypad. 00358 #define FL_F 0xffbd ///< One of the function keys; use FL_F + n for function key n. 00359 #define FL_F_Last 0xffe0 ///< The last function key; use to range-check function keys. 00360 #define FL_Shift_L 0xffe1 ///< The lefthand shift key. 00361 #define FL_Shift_R 0xffe2 ///< The righthand shift key. 00362 #define FL_Control_L 0xffe3 ///< The lefthand control key. 00363 #define FL_Control_R 0xffe4 ///< The righthand control key. 00364 #define FL_Caps_Lock 0xffe5 ///< The caps lock key. 00365 #define FL_Meta_L 0xffe7 ///< The left meta/Windows key. 00366 #define FL_Meta_R 0xffe8 ///< The right meta/Windows key. 00367 #define FL_Alt_L 0xffe9 ///< The left alt key. 00368 #define FL_Alt_R 0xffea ///< The right alt key. 00369 #define FL_Delete 0xffff ///< The delete key. 00370 // group: Mouse and Keyboard Events 00372 00381 00382 #define FL_LEFT_MOUSE 1 ///< The left mouse button 00383 #define FL_MIDDLE_MOUSE 2 ///< The middle mouse button 00384 #define FL_RIGHT_MOUSE 3 ///< The right mouse button 00385 // group: Mouse Buttons 00387 00388 00394 // group: Event States 00395 00396 // FIXME: it would be nice to have the modifiers in the upper 8 bit so that 00397 // a unicode ke (24bit) can be sent as an unsigned with the modifiers. 00398 00399 #define FL_SHIFT 0x00010000 ///< One of the shift keys is down 00400 #define FL_CAPS_LOCK 0x00020000 ///< The caps lock is on 00401 #define FL_CTRL 0x00040000 ///< One of the ctrl keys is down 00402 #define FL_ALT 0x00080000 ///< One of the alt keys is down 00403 #define FL_NUM_LOCK 0x00100000 ///< The num lock is on 00404 // most X servers do this? 00405 #define FL_META 0x00400000 ///< One of the meta/Windows keys is down 00406 // correct for XFree86 00407 #define FL_SCROLL_LOCK 0x00800000 ///< The scroll lock is on 00408 // correct for XFree86 00409 #define FL_BUTTON1 0x01000000 ///< Mouse button 1 is pushed 00410 #define FL_BUTTON2 0x02000000 ///< Mouse button 2 is pushed 00411 #define FL_BUTTON3 0x04000000 ///< Mouse button 3 is pushed 00412 #define FL_BUTTONS 0x7f000000 ///< Any mouse button is pushed 00413 #define FL_BUTTON(n) (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed 00414 00415 #define FL_KEY_MASK 0x0000ffff ///< All keys are 16 bit for now 00416 // FIXME: Unicode needs 24 bits! 00417 00418 #ifdef __APPLE__ 00419 # define FL_COMMAND FL_META ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X 00420 # define FL_CONTROL FL_CTRL ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X 00421 #else 00422 # define FL_COMMAND FL_CTRL ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X 00423 # define FL_CONTROL FL_META ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X 00424 #endif // __APPLE__ 00425 // group: Event States 00427 00445 enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C): 00446 00447 FL_NO_BOX = 0, 00448 FL_FLAT_BOX, 00449 FL_UP_BOX, 00450 FL_DOWN_BOX, 00451 FL_UP_FRAME, 00452 FL_DOWN_FRAME, 00453 FL_THIN_UP_BOX, 00454 FL_THIN_DOWN_BOX, 00455 FL_THIN_UP_FRAME, 00456 FL_THIN_DOWN_FRAME, 00457 FL_ENGRAVED_BOX, 00458 FL_EMBOSSED_BOX, 00459 FL_ENGRAVED_FRAME, 00460 FL_EMBOSSED_FRAME, 00461 FL_BORDER_BOX, 00462 _FL_SHADOW_BOX, 00463 FL_BORDER_FRAME, 00464 _FL_SHADOW_FRAME, 00465 _FL_ROUNDED_BOX, 00466 _FL_RSHADOW_BOX, 00467 _FL_ROUNDED_FRAME, 00468 _FL_RFLAT_BOX, 00469 _FL_ROUND_UP_BOX, 00470 _FL_ROUND_DOWN_BOX, 00471 _FL_DIAMOND_UP_BOX, 00472 _FL_DIAMOND_DOWN_BOX, 00473 _FL_OVAL_BOX, 00474 _FL_OSHADOW_BOX, 00475 _FL_OVAL_FRAME, 00476 _FL_OFLAT_BOX, 00477 _FL_PLASTIC_UP_BOX, 00478 _FL_PLASTIC_DOWN_BOX, 00479 _FL_PLASTIC_UP_FRAME, 00480 _FL_PLASTIC_DOWN_FRAME, 00481 _FL_PLASTIC_THIN_UP_BOX, 00482 _FL_PLASTIC_THIN_DOWN_BOX, 00483 _FL_PLASTIC_ROUND_UP_BOX, 00484 _FL_PLASTIC_ROUND_DOWN_BOX, 00485 _FL_GTK_UP_BOX, 00486 _FL_GTK_DOWN_BOX, 00487 _FL_GTK_UP_FRAME, 00488 _FL_GTK_DOWN_FRAME, 00489 _FL_GTK_THIN_UP_BOX, 00490 _FL_GTK_THIN_DOWN_BOX, 00491 _FL_GTK_THIN_UP_FRAME, 00492 _FL_GTK_THIN_DOWN_FRAME, 00493 _FL_GTK_ROUND_UP_BOX, 00494 _FL_GTK_ROUND_DOWN_BOX, 00495 FL_FREE_BOXTYPE 00496 }; 00497 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX(); 00498 #define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX() 00499 #define FL_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_ROUND_UP_BOX()+1) 00500 extern FL_EXPORT Fl_Boxtype fl_define_FL_SHADOW_BOX(); 00501 #define FL_SHADOW_BOX fl_define_FL_SHADOW_BOX() 00502 #define FL_SHADOW_FRAME (Fl_Boxtype)(fl_define_FL_SHADOW_BOX()+2) 00503 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUNDED_BOX(); 00504 #define FL_ROUNDED_BOX fl_define_FL_ROUNDED_BOX() 00505 #define FL_ROUNDED_FRAME (Fl_Boxtype)(fl_define_FL_ROUNDED_BOX()+2) 00506 extern FL_EXPORT Fl_Boxtype fl_define_FL_RFLAT_BOX(); 00507 #define FL_RFLAT_BOX fl_define_FL_RFLAT_BOX() 00508 extern FL_EXPORT Fl_Boxtype fl_define_FL_RSHADOW_BOX(); 00509 #define FL_RSHADOW_BOX fl_define_FL_RSHADOW_BOX() 00510 extern FL_EXPORT Fl_Boxtype fl_define_FL_DIAMOND_BOX(); 00511 #define FL_DIAMOND_UP_BOX fl_define_FL_DIAMOND_BOX() 00512 #define FL_DIAMOND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_DIAMOND_BOX()+1) 00513 extern FL_EXPORT Fl_Boxtype fl_define_FL_OVAL_BOX(); 00514 #define FL_OVAL_BOX fl_define_FL_OVAL_BOX() 00515 #define FL_OSHADOW_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+1) 00516 #define FL_OVAL_FRAME (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+2) 00517 #define FL_OFLAT_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+3) 00518 00519 extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX(); 00520 #define FL_PLASTIC_UP_BOX fl_define_FL_PLASTIC_UP_BOX() 00521 #define FL_PLASTIC_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+1) 00522 #define FL_PLASTIC_UP_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+2) 00523 #define FL_PLASTIC_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+3) 00524 #define FL_PLASTIC_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+4) 00525 #define FL_PLASTIC_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+5) 00526 #define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6) 00527 #define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7) 00528 00529 extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX(); 00530 #define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX() 00531 #define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1) 00532 #define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2) 00533 #define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3) 00534 #define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4) 00535 #define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5) 00536 #define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6) 00537 #define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7) 00538 #define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8) 00539 #define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9) 00540 00541 // conversions of box types to other boxtypes: 00547 inline Fl_Boxtype fl_box(Fl_Boxtype b) { 00548 return (Fl_Boxtype)((b<FL_UP_BOX||b%4>1)?b:(b-2)); 00549 } 00555 inline Fl_Boxtype fl_down(Fl_Boxtype b) { 00556 return (Fl_Boxtype)((b<FL_UP_BOX)?b:(b|1)); 00557 } 00563 inline Fl_Boxtype fl_frame(Fl_Boxtype b) { 00564 return (Fl_Boxtype)((b%4<2)?b:(b+2)); 00565 } 00566 00567 // back-compatibility box types: 00568 #define FL_FRAME FL_ENGRAVED_FRAME 00569 #define FL_FRAME_BOX FL_ENGRAVED_BOX 00570 #define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX 00571 #define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX 00572 // group: Box Types 00574 00587 enum Fl_Labeltype { // labeltypes: 00588 FL_NORMAL_LABEL = 0, 00589 FL_NO_LABEL, 00590 _FL_SHADOW_LABEL, 00591 _FL_ENGRAVED_LABEL, 00592 _FL_EMBOSSED_LABEL, 00593 _FL_MULTI_LABEL, 00594 _FL_ICON_LABEL, 00595 _FL_IMAGE_LABEL, 00596 00597 FL_FREE_LABELTYPE 00598 }; 00599 00604 #define FL_SYMBOL_LABEL FL_NORMAL_LABEL 00605 extern Fl_Labeltype FL_EXPORT fl_define_FL_SHADOW_LABEL(); 00606 #define FL_SHADOW_LABEL fl_define_FL_SHADOW_LABEL() 00607 extern Fl_Labeltype FL_EXPORT fl_define_FL_ENGRAVED_LABEL(); 00608 #define FL_ENGRAVED_LABEL fl_define_FL_ENGRAVED_LABEL() 00609 extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL(); 00610 #define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL() 00611 00644 typedef unsigned Fl_Align; 00646 const Fl_Align FL_ALIGN_CENTER = (Fl_Align)0; 00649 const Fl_Align FL_ALIGN_TOP = (Fl_Align)1; 00651 const Fl_Align FL_ALIGN_BOTTOM = (Fl_Align)2; 00655 const Fl_Align FL_ALIGN_LEFT = (Fl_Align)4; 00657 const Fl_Align FL_ALIGN_RIGHT = (Fl_Align)8; 00659 const Fl_Align FL_ALIGN_INSIDE = (Fl_Align)16; 00661 const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = (Fl_Align)0x0020; 00663 const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = (Fl_Align)0x0000; 00665 const Fl_Align FL_ALIGN_CLIP = (Fl_Align)64; 00667 const Fl_Align FL_ALIGN_WRAP = (Fl_Align)128; 00669 const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT = (Fl_Align)0x0100; 00671 const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE = (Fl_Align)0x0120; 00673 const Fl_Align FL_ALIGN_IMAGE_BACKDROP = (Fl_Align)0x0200; 00674 const Fl_Align FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP | FL_ALIGN_LEFT; 00675 const Fl_Align FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP | FL_ALIGN_RIGHT; 00676 const Fl_Align FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT; 00677 const Fl_Align FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT; 00678 const Fl_Align FL_ALIGN_LEFT_TOP = 0x0007; // magic value 00679 const Fl_Align FL_ALIGN_RIGHT_TOP = 0x000b; // magic value 00680 const Fl_Align FL_ALIGN_LEFT_BOTTOM = 0x000d; // magic value 00681 const Fl_Align FL_ALIGN_RIGHT_BOTTOM = 0x000e; // magic value 00682 const Fl_Align FL_ALIGN_NOWRAP = (Fl_Align)0; // for back compatability 00683 const Fl_Align FL_ALIGN_POSITION_MASK = 0x000f; // left, right, top, bottom 00684 const Fl_Align FL_ALIGN_IMAGE_MASK = 0x0320; // l/r, t/b, backdrop 00693 typedef int Fl_Font; 00694 00695 const Fl_Font FL_HELVETICA = 0; 00696 const Fl_Font FL_HELVETICA_BOLD = 1; 00697 const Fl_Font FL_HELVETICA_ITALIC = 2; 00698 const Fl_Font FL_HELVETICA_BOLD_ITALIC = 3; 00699 const Fl_Font FL_COURIER = 4; 00700 const Fl_Font FL_COURIER_BOLD = 5; 00701 const Fl_Font FL_COURIER_ITALIC = 6; 00702 const Fl_Font FL_COURIER_BOLD_ITALIC = 7; 00703 const Fl_Font FL_TIMES = 8; 00704 const Fl_Font FL_TIMES_BOLD = 9; 00705 const Fl_Font FL_TIMES_ITALIC = 10; 00706 const Fl_Font FL_TIMES_BOLD_ITALIC = 11; 00707 const Fl_Font FL_SYMBOL = 12; 00708 const Fl_Font FL_SCREEN = 13; 00709 const Fl_Font FL_SCREEN_BOLD = 14; 00710 const Fl_Font FL_ZAPF_DINGBATS = 15; 00711 00712 const Fl_Font FL_FREE_FONT = 16; 00713 const Fl_Font FL_BOLD = 1; 00714 const Fl_Font FL_ITALIC = 2; 00715 const Fl_Font FL_BOLD_ITALIC = 3; 00716 00722 typedef int Fl_Fontsize; 00723 00724 extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE; 00725 00750 typedef unsigned int Fl_Color; 00751 00752 // Standard colors. These are used as default colors in widgets and altered as necessary 00753 const Fl_Color FL_FOREGROUND_COLOR = 0; 00754 const Fl_Color FL_BACKGROUND2_COLOR = 7; 00755 const Fl_Color FL_INACTIVE_COLOR = 8; 00756 const Fl_Color FL_SELECTION_COLOR = 15; 00757 00758 // boxtypes generally limit themselves to these colors so 00759 // the whole ramp is not allocated: 00760 00761 const Fl_Color FL_GRAY0 = 32; // 'A' 00762 const Fl_Color FL_DARK3 = 39; // 'H' 00763 const Fl_Color FL_DARK2 = 45; // 'N' 00764 const Fl_Color FL_DARK1 = 47; // 'P' 00765 const Fl_Color FL_BACKGROUND_COLOR = 49; // 'R' default background color 00766 const Fl_Color FL_LIGHT1 = 50; // 'S' 00767 const Fl_Color FL_LIGHT2 = 52; // 'U' 00768 const Fl_Color FL_LIGHT3 = 54; // 'W' 00769 00770 // FLTK provides a 5x8x5 color cube that is used with colormap visuals 00771 00772 const Fl_Color FL_BLACK = 56; 00773 const Fl_Color FL_RED = 88; 00774 const Fl_Color FL_GREEN = 63; 00775 const Fl_Color FL_YELLOW = 95; 00776 const Fl_Color FL_BLUE = 216; 00777 const Fl_Color FL_MAGENTA = 248; 00778 const Fl_Color FL_CYAN = 223; 00779 const Fl_Color FL_DARK_RED = 72; 00780 00781 const Fl_Color FL_DARK_GREEN = 60; 00782 const Fl_Color FL_DARK_YELLOW = 76; 00783 const Fl_Color FL_DARK_BLUE = 136; 00784 const Fl_Color FL_DARK_MAGENTA = 152; 00785 const Fl_Color FL_DARK_CYAN = 140; 00786 00787 const Fl_Color FL_WHITE = 255; 00788 00789 00790 #define FL_FREE_COLOR (Fl_Color)16 00791 #define FL_NUM_FREE_COLOR 16 00792 #define FL_GRAY_RAMP (Fl_Color)32 00793 #define FL_NUM_GRAY 24 00794 #define FL_GRAY FL_BACKGROUND_COLOR 00795 #define FL_COLOR_CUBE (Fl_Color)56 00796 #define FL_NUM_RED 5 00797 #define FL_NUM_GREEN 8 00798 #define FL_NUM_BLUE 5 00799 00800 FL_EXPORT Fl_Color fl_inactive(Fl_Color c); 00801 00802 FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg); 00803 00804 FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight); 00805 00807 inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); } 00808 00810 inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); } 00811 00813 inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) { 00814 if (!r && !g && !b) return FL_BLACK; 00815 else return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8); 00816 } 00817 00819 inline Fl_Color fl_rgb_color(uchar g) { 00820 if (!g) return FL_BLACK; 00821 else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8); 00822 } 00823 00831 inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);} 00832 00845 inline Fl_Color fl_color_cube(int r, int g, int b) { 00846 return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);} 00847 // group: Colors 00849 00852 00860 enum Fl_Cursor { 00861 FL_CURSOR_DEFAULT = 0, 00862 FL_CURSOR_ARROW = 35, 00863 FL_CURSOR_CROSS = 66, 00864 FL_CURSOR_WAIT = 76, 00865 FL_CURSOR_INSERT = 77, 00866 FL_CURSOR_HAND = 31, 00867 FL_CURSOR_HELP = 47, 00868 FL_CURSOR_MOVE = 27, 00869 // fltk provides bitmaps for these: 00870 FL_CURSOR_NS = 78, 00871 FL_CURSOR_WE = 79, 00872 FL_CURSOR_NWSE = 80, 00873 FL_CURSOR_NESW = 81, 00874 FL_CURSOR_NONE =255, 00875 // for back compatability (non MSWindows ones): 00876 FL_CURSOR_N = 70, 00877 FL_CURSOR_NE = 69, 00878 FL_CURSOR_E = 49, 00879 FL_CURSOR_SE = 8, 00880 FL_CURSOR_S = 9, 00881 FL_CURSOR_SW = 7, 00882 FL_CURSOR_W = 36, 00883 FL_CURSOR_NW = 68 00884 }; // group: Cursors 00886 00888 enum { // values for "when" passed to Fl::add_fd() 00889 FL_READ = 1, 00890 FL_WRITE = 4, 00891 FL_EXCEPT = 8 00892 }; 00893 00895 enum Fl_Mode { 00896 FL_RGB = 0, 00897 FL_INDEX = 1, 00898 FL_SINGLE = 0, 00899 FL_DOUBLE = 2, 00900 FL_ACCUM = 4, 00901 FL_ALPHA = 8, 00902 FL_DEPTH = 16, 00903 FL_STENCIL = 32, 00904 FL_RGB8 = 64, 00905 FL_MULTISAMPLE= 128, 00906 FL_STEREO = 256, 00907 FL_FAKE_SINGLE = 512 // Fake single buffered windows using double-buffer 00908 }; 00909 00910 // image alpha blending 00911 00912 #define FL_IMAGE_WITH_ALPHA 0x40000000 00913 00915 enum Fl_Damage { 00916 FL_DAMAGE_CHILD = 0x01, 00917 FL_DAMAGE_EXPOSE = 0x02, 00918 FL_DAMAGE_SCROLL = 0x04, 00919 FL_DAMAGE_OVERLAY = 0x08, 00920 FL_DAMAGE_USER1 = 0x10, 00921 FL_DAMAGE_USER2 = 0x20, 00922 FL_DAMAGE_ALL = 0x80 00923 }; 00924 00925 // FLTK 1.0.x compatibility definitions... 00926 # ifdef FLTK_1_0_COMPAT 00927 # define contrast fl_contrast 00928 # define down fl_down 00929 # define frame fl_frame 00930 # define inactive fl_inactive 00931 # endif // FLTK_1_0_COMPAT 00932 00933 #endif 00934 00935 // 00936 // End of "$Id$". 00937 //