FLTK 1.3.0
Enumerations.H
Go to the documentation of this file.
00001 //
00002 // "$Id: Enumerations.H 8623 2011-04-24 17:09:41Z AlbrechtS $"
00003 //
00004 // Enumerations for the Fast Light Tool Kit (FLTK).
00005 //
00006 // Copyright 1998-2011 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 
00078 #define FL_VERSION              ((double)FL_MAJOR_VERSION + \
00079                                  (double)FL_MINOR_VERSION * 0.01 + \
00080                                  (double)FL_PATCH_VERSION * 0.0001)
00081         // group: Version Numbers
00083 
00099 enum Fl_Event { // events
00101   FL_NO_EVENT           = 0,
00102 
00114   FL_PUSH               = 1,
00115 
00122   FL_RELEASE            = 2,
00123 
00131   FL_ENTER              = 3,
00132 
00137   FL_LEAVE              = 4,
00138 
00146   FL_DRAG               = 5,
00147 
00161   FL_FOCUS              = 6,
00162   
00166   FL_UNFOCUS            = 7,
00167 
00188   FL_KEYDOWN            = 8,
00189 
00193   FL_KEYBOARD           = 8,
00194  
00198   FL_KEYUP              = 9,
00199 
00205   FL_CLOSE              = 10,
00206 
00213   FL_MOVE               = 11,
00214 
00227   FL_SHORTCUT           = 12,
00228 
00234   FL_DEACTIVATE         = 13,
00235 
00239   FL_ACTIVATE           = 14,
00240 
00247   FL_HIDE               = 15,
00248 
00255   FL_SHOW               = 16,
00256 
00261   FL_PASTE              = 17,
00262 
00268   FL_SELECTIONCLEAR     = 18,
00269 
00273   FL_MOUSEWHEEL         = 19,
00274 
00279   FL_DND_ENTER          = 20,
00280 
00285   FL_DND_DRAG           = 21,
00286 
00289   FL_DND_LEAVE          = 22,
00290 
00295   FL_DND_RELEASE        = 23
00296 };
00297 
00305 enum Fl_When { // Fl_Widget::when():
00306   FL_WHEN_NEVER         = 0,    
00307   FL_WHEN_CHANGED       = 1,    
00308   FL_WHEN_NOT_CHANGED   = 2,    
00309   FL_WHEN_RELEASE       = 4,    
00310   FL_WHEN_RELEASE_ALWAYS= 6,    
00311   FL_WHEN_ENTER_KEY     = 8,    
00312   FL_WHEN_ENTER_KEY_ALWAYS=10,  
00313   FL_WHEN_ENTER_KEY_CHANGED=11  
00314 };
00315                 // group: When Conditions
00317 
00330 
00331 // FIXME: These codes collide with valid Unicode keys
00332 
00333 #define FL_Button       0xfee8  ///< A mouse button; use Fl_Button + n for mouse button n.
00334 #define FL_BackSpace    0xff08  ///< The backspace key.
00335 #define FL_Tab          0xff09  ///< The tab key.
00336 #define FL_Enter        0xff0d  ///< The enter key. 
00337 #define FL_Pause        0xff13  ///< The pause key.
00338 #define FL_Scroll_Lock  0xff14  ///< The scroll lock key.
00339 #define FL_Escape       0xff1b  ///< The escape key.
00340 #define FL_Home         0xff50  ///< The home key.
00341 #define FL_Left         0xff51  ///< The left arrow key.
00342 #define FL_Up           0xff52  ///< The up arrow key.
00343 #define FL_Right        0xff53  ///< The right arrow key.
00344 #define FL_Down         0xff54  ///< The down arrow key.
00345 #define FL_Page_Up      0xff55  ///< The page-up key.
00346 #define FL_Page_Down    0xff56  ///< The page-down key.
00347 #define FL_End          0xff57  ///< The end key.
00348 #define FL_Print        0xff61  ///< The print (or print-screen) key.
00349 #define FL_Insert       0xff63  ///< The insert key. 
00350 #define FL_Menu         0xff67  ///< The menu key.
00351 #define FL_Help         0xff68  ///< The 'help' key on Mac keyboards
00352 #define FL_Num_Lock     0xff7f  ///< The num lock key.
00353 #define FL_KP           0xff80  ///< One of the keypad numbers; use FL_KP + n for number n.
00354 #define FL_KP_Enter     0xff8d  ///< The enter key on the keypad, same as Fl_KP+'\\r'.
00355 #define FL_KP_Last      0xffbd  ///< The last keypad key; use to range-check keypad.
00356 #define FL_F            0xffbd  ///< One of the function keys; use FL_F + n for function key n.
00357 #define FL_F_Last       0xffe0  ///< The last function key; use to range-check function keys.
00358 #define FL_Shift_L      0xffe1  ///< The lefthand shift key.
00359 #define FL_Shift_R      0xffe2  ///< The righthand shift key.
00360 #define FL_Control_L    0xffe3  ///< The lefthand control key.
00361 #define FL_Control_R    0xffe4  ///< The righthand control key.
00362 #define FL_Caps_Lock    0xffe5  ///< The caps lock key.
00363 #define FL_Meta_L       0xffe7  ///< The left meta/Windows key.
00364 #define FL_Meta_R       0xffe8  ///< The right meta/Windows key.
00365 #define FL_Alt_L        0xffe9  ///< The left alt key.
00366 #define FL_Alt_R        0xffea  ///< The right alt key. 
00367 #define FL_Delete       0xffff  ///< The delete key.
00368         // group: Mouse and Keyboard Events
00370 
00379 
00380 #define FL_LEFT_MOUSE   1       ///< The left mouse button
00381 #define FL_MIDDLE_MOUSE 2       ///< The middle mouse button
00382 #define FL_RIGHT_MOUSE  3       ///< The right mouse button
00383                 // group: Mouse Buttons
00385 
00386 
00392                 // group: Event States
00393 
00394 // FIXME: it would be nice to have the modifiers in the upper 8 bit so that
00395 //        a unicode ke (24bit) can be sent as an unsigned with the modifiers.
00396 
00397 #define FL_SHIFT        0x00010000      ///< One of the shift keys is down
00398 #define FL_CAPS_LOCK    0x00020000      ///< The caps lock is on
00399 #define FL_CTRL         0x00040000      ///< One of the ctrl keys is down
00400 #define FL_ALT          0x00080000      ///< One of the alt keys is down
00401 #define FL_NUM_LOCK     0x00100000      ///< The num lock is on
00402                                         // most X servers do this?
00403 #define FL_META         0x00400000      ///< One of the meta/Windows keys is down
00404                                         // correct for XFree86
00405 #define FL_SCROLL_LOCK  0x00800000      ///< The scroll lock is on
00406                                         // correct for XFree86
00407 #define FL_BUTTON1      0x01000000      ///< Mouse button 1 is pushed
00408 #define FL_BUTTON2      0x02000000      ///< Mouse button 2 is pushed
00409 #define FL_BUTTON3      0x04000000      ///< Mouse button 3 is pushed
00410 #define FL_BUTTONS      0x7f000000      ///< Any mouse button is pushed
00411 #define FL_BUTTON(n)    (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed
00412 
00413 #define FL_KEY_MASK 0x0000ffff          ///< All keys are 16 bit for now 
00414                                         //   FIXME: Unicode needs 24 bits!
00415 
00416 #ifdef __APPLE__
00417 #  define FL_COMMAND    FL_META         ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
00418 #  define FL_CONTROL    FL_CTRL         ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X
00419 #else
00420 #  define FL_COMMAND    FL_CTRL         ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
00421 #  define FL_CONTROL    FL_META         ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X
00422 #endif // __APPLE__
00423                 // group: Event States
00425 
00443 enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C):
00444 
00445   FL_NO_BOX = 0,                
00446   FL_FLAT_BOX,                  
00447   FL_UP_BOX,                    
00448   FL_DOWN_BOX,                  
00449   FL_UP_FRAME,                  
00450   FL_DOWN_FRAME,                
00451   FL_THIN_UP_BOX,               
00452   FL_THIN_DOWN_BOX,             
00453   FL_THIN_UP_FRAME,             
00454   FL_THIN_DOWN_FRAME,           
00455   FL_ENGRAVED_BOX,              
00456   FL_EMBOSSED_BOX,              
00457   FL_ENGRAVED_FRAME,            
00458   FL_EMBOSSED_FRAME,            
00459   FL_BORDER_BOX,                
00460   _FL_SHADOW_BOX,               
00461   FL_BORDER_FRAME,              
00462   _FL_SHADOW_FRAME,             
00463   _FL_ROUNDED_BOX,              
00464   _FL_RSHADOW_BOX,              
00465   _FL_ROUNDED_FRAME,            
00466   _FL_RFLAT_BOX,                
00467   _FL_ROUND_UP_BOX,             
00468   _FL_ROUND_DOWN_BOX,           
00469   _FL_DIAMOND_UP_BOX,           
00470   _FL_DIAMOND_DOWN_BOX,         
00471   _FL_OVAL_BOX,                 
00472   _FL_OSHADOW_BOX,              
00473   _FL_OVAL_FRAME,               
00474   _FL_OFLAT_BOX,                
00475   _FL_PLASTIC_UP_BOX,           
00476   _FL_PLASTIC_DOWN_BOX,         
00477   _FL_PLASTIC_UP_FRAME,         
00478   _FL_PLASTIC_DOWN_FRAME,       
00479   _FL_PLASTIC_THIN_UP_BOX,      
00480   _FL_PLASTIC_THIN_DOWN_BOX,    
00481   _FL_PLASTIC_ROUND_UP_BOX,     
00482   _FL_PLASTIC_ROUND_DOWN_BOX,   
00483   _FL_GTK_UP_BOX,               
00484   _FL_GTK_DOWN_BOX,             
00485   _FL_GTK_UP_FRAME,             
00486   _FL_GTK_DOWN_FRAME,           
00487   _FL_GTK_THIN_UP_BOX,          
00488   _FL_GTK_THIN_DOWN_BOX,        
00489   _FL_GTK_THIN_UP_FRAME,        
00490   _FL_GTK_THIN_DOWN_FRAME,      
00491   _FL_GTK_ROUND_UP_BOX,         
00492   _FL_GTK_ROUND_DOWN_BOX,       
00493   FL_FREE_BOXTYPE               
00494 };
00495 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX();
00496 #define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX()
00497 #define FL_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_ROUND_UP_BOX()+1)
00498 extern FL_EXPORT Fl_Boxtype fl_define_FL_SHADOW_BOX();
00499 #define FL_SHADOW_BOX fl_define_FL_SHADOW_BOX()
00500 #define FL_SHADOW_FRAME (Fl_Boxtype)(fl_define_FL_SHADOW_BOX()+2)
00501 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUNDED_BOX();
00502 #define FL_ROUNDED_BOX fl_define_FL_ROUNDED_BOX()
00503 #define FL_ROUNDED_FRAME (Fl_Boxtype)(fl_define_FL_ROUNDED_BOX()+2)
00504 extern FL_EXPORT Fl_Boxtype fl_define_FL_RFLAT_BOX();
00505 #define FL_RFLAT_BOX fl_define_FL_RFLAT_BOX()
00506 extern FL_EXPORT Fl_Boxtype fl_define_FL_RSHADOW_BOX();
00507 #define FL_RSHADOW_BOX fl_define_FL_RSHADOW_BOX()
00508 extern FL_EXPORT Fl_Boxtype fl_define_FL_DIAMOND_BOX();
00509 #define FL_DIAMOND_UP_BOX fl_define_FL_DIAMOND_BOX()
00510 #define FL_DIAMOND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_DIAMOND_BOX()+1)
00511 extern FL_EXPORT Fl_Boxtype fl_define_FL_OVAL_BOX();
00512 #define FL_OVAL_BOX fl_define_FL_OVAL_BOX()
00513 #define FL_OSHADOW_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+1)
00514 #define FL_OVAL_FRAME (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+2)
00515 #define FL_OFLAT_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+3)
00516 
00517 extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX();
00518 #define FL_PLASTIC_UP_BOX fl_define_FL_PLASTIC_UP_BOX()
00519 #define FL_PLASTIC_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+1)
00520 #define FL_PLASTIC_UP_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+2)
00521 #define FL_PLASTIC_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+3)
00522 #define FL_PLASTIC_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+4)
00523 #define FL_PLASTIC_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+5)
00524 #define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6)
00525 #define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7)
00526 
00527 extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX();
00528 #define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX()
00529 #define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1)
00530 #define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2)
00531 #define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3)
00532 #define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4)
00533 #define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5)
00534 #define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6)
00535 #define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7)
00536 #define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8)
00537 #define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9)
00538 
00539 // conversions of box types to other boxtypes:
00545 inline Fl_Boxtype fl_box(Fl_Boxtype b) {
00546   return (Fl_Boxtype)((b<FL_UP_BOX||b%4>1)?b:(b-2));
00547 }
00553 inline Fl_Boxtype fl_down(Fl_Boxtype b) {
00554   return (Fl_Boxtype)((b<FL_UP_BOX)?b:(b|1));
00555 }
00561 inline Fl_Boxtype fl_frame(Fl_Boxtype b) {
00562   return (Fl_Boxtype)((b%4<2)?b:(b+2));
00563 }
00564 
00565 // back-compatibility box types:
00566 #define FL_FRAME FL_ENGRAVED_FRAME
00567 #define FL_FRAME_BOX FL_ENGRAVED_BOX
00568 #define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX
00569 #define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX
00570         // group: Box Types
00572 
00585 enum Fl_Labeltype {     // labeltypes:
00586   FL_NORMAL_LABEL       = 0,    
00587   FL_NO_LABEL,                  
00588   _FL_SHADOW_LABEL,             
00589   _FL_ENGRAVED_LABEL,           
00590   _FL_EMBOSSED_LABEL,           
00591   _FL_MULTI_LABEL,              
00592   _FL_ICON_LABEL,               
00593   _FL_IMAGE_LABEL,              
00594 
00595   FL_FREE_LABELTYPE             
00596 };
00597 
00602 #define FL_SYMBOL_LABEL FL_NORMAL_LABEL
00603 extern Fl_Labeltype FL_EXPORT fl_define_FL_SHADOW_LABEL();
00604 #define FL_SHADOW_LABEL fl_define_FL_SHADOW_LABEL()
00605 extern Fl_Labeltype FL_EXPORT fl_define_FL_ENGRAVED_LABEL();
00606 #define FL_ENGRAVED_LABEL fl_define_FL_ENGRAVED_LABEL()
00607 extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL();
00608 #define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL()
00609 
00642 typedef unsigned Fl_Align;
00644 const Fl_Align FL_ALIGN_CENTER          = (Fl_Align)0;
00647 const Fl_Align FL_ALIGN_TOP             = (Fl_Align)1;
00649 const Fl_Align FL_ALIGN_BOTTOM          = (Fl_Align)2;
00653 const Fl_Align FL_ALIGN_LEFT            = (Fl_Align)4;
00655 const Fl_Align FL_ALIGN_RIGHT           = (Fl_Align)8;
00657 const Fl_Align FL_ALIGN_INSIDE          = (Fl_Align)16;
00659 const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = (Fl_Align)0x0020;
00661 const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = (Fl_Align)0x0000;
00663 const Fl_Align FL_ALIGN_CLIP            = (Fl_Align)64;
00665 const Fl_Align FL_ALIGN_WRAP            = (Fl_Align)128;
00667 const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT = (Fl_Align)0x0100;
00669 const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE = (Fl_Align)0x0120;
00671 const Fl_Align FL_ALIGN_IMAGE_BACKDROP  = (Fl_Align)0x0200;
00672 const Fl_Align FL_ALIGN_TOP_LEFT        = FL_ALIGN_TOP | FL_ALIGN_LEFT;
00673 const Fl_Align FL_ALIGN_TOP_RIGHT       = FL_ALIGN_TOP | FL_ALIGN_RIGHT;
00674 const Fl_Align FL_ALIGN_BOTTOM_LEFT     = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT;
00675 const Fl_Align FL_ALIGN_BOTTOM_RIGHT    = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT;
00676 const Fl_Align FL_ALIGN_LEFT_TOP        = 0x0007; // magic value
00677 const Fl_Align FL_ALIGN_RIGHT_TOP       = 0x000b; // magic value
00678 const Fl_Align FL_ALIGN_LEFT_BOTTOM     = 0x000d; // magic value
00679 const Fl_Align FL_ALIGN_RIGHT_BOTTOM    = 0x000e; // magic value
00680 const Fl_Align FL_ALIGN_NOWRAP          = (Fl_Align)0; // for back compatibility
00681 const Fl_Align FL_ALIGN_POSITION_MASK   = 0x000f; // left, right, top, bottom
00682 const Fl_Align FL_ALIGN_IMAGE_MASK      = 0x0320; // l/r, t/b, backdrop
00691 typedef int Fl_Font;
00692 
00693 const Fl_Font FL_HELVETICA              = 0;    
00694 const Fl_Font FL_HELVETICA_BOLD         = 1;    
00695 const Fl_Font FL_HELVETICA_ITALIC       = 2;    
00696 const Fl_Font FL_HELVETICA_BOLD_ITALIC  = 3;    
00697 const Fl_Font FL_COURIER                = 4;    
00698 const Fl_Font FL_COURIER_BOLD           = 5;    
00699 const Fl_Font FL_COURIER_ITALIC         = 6;    
00700 const Fl_Font FL_COURIER_BOLD_ITALIC    = 7;    
00701 const Fl_Font FL_TIMES                  = 8;    
00702 const Fl_Font FL_TIMES_BOLD             = 9;    
00703 const Fl_Font FL_TIMES_ITALIC           = 10;   
00704 const Fl_Font FL_TIMES_BOLD_ITALIC      = 11;   
00705 const Fl_Font FL_SYMBOL                 = 12;   
00706 const Fl_Font FL_SCREEN                 = 13;   
00707 const Fl_Font FL_SCREEN_BOLD            = 14;   
00708 const Fl_Font FL_ZAPF_DINGBATS          = 15;   
00709 
00710 const Fl_Font FL_FREE_FONT              = 16;   
00711 const Fl_Font FL_BOLD                   = 1;    
00712 const Fl_Font FL_ITALIC                 = 2;    
00713 const Fl_Font FL_BOLD_ITALIC            = 3;    
00714 
00720 typedef int Fl_Fontsize;
00721 
00722 extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE;    
00723 
00748 typedef unsigned int Fl_Color;
00749 
00750 // Standard colors. These are used as default colors in widgets and altered as necessary
00751 const Fl_Color FL_FOREGROUND_COLOR  = 0;        
00752 const Fl_Color FL_BACKGROUND2_COLOR = 7;        
00753 const Fl_Color FL_INACTIVE_COLOR    = 8;        
00754 const Fl_Color FL_SELECTION_COLOR   = 15;       
00755 
00756   // boxtypes generally limit themselves to these colors so
00757   // the whole ramp is not allocated:
00758 
00759 const Fl_Color FL_GRAY0   = 32;                 // 'A'
00760 const Fl_Color FL_DARK3   = 39;                 // 'H'
00761 const Fl_Color FL_DARK2   = 45;                 // 'N'
00762 const Fl_Color FL_DARK1   = 47;                 // 'P'
00763 const Fl_Color FL_BACKGROUND_COLOR  = 49;       // 'R' default background color
00764 const Fl_Color FL_LIGHT1  = 50;                 // 'S'
00765 const Fl_Color FL_LIGHT2  = 52;                 // 'U'
00766 const Fl_Color FL_LIGHT3  = 54;                 // 'W'
00767 
00768   // FLTK provides a 5x8x5 color cube that is used with colormap visuals
00769 
00770 const Fl_Color FL_BLACK   = 56;
00771 const Fl_Color FL_RED     = 88;
00772 const Fl_Color FL_GREEN   = 63;
00773 const Fl_Color FL_YELLOW  = 95;
00774 const Fl_Color FL_BLUE    = 216;
00775 const Fl_Color FL_MAGENTA = 248;
00776 const Fl_Color FL_CYAN    = 223;
00777 const Fl_Color FL_DARK_RED = 72;
00778 
00779 const Fl_Color FL_DARK_GREEN    = 60;
00780 const Fl_Color FL_DARK_YELLOW   = 76;
00781 const Fl_Color FL_DARK_BLUE     = 136;
00782 const Fl_Color FL_DARK_MAGENTA  = 152;
00783 const Fl_Color FL_DARK_CYAN     = 140;
00784 
00785 const Fl_Color FL_WHITE         = 255;
00786 
00787 
00788 #define FL_FREE_COLOR     (Fl_Color)16
00789 #define FL_NUM_FREE_COLOR 16
00790 #define FL_GRAY_RAMP      (Fl_Color)32
00791 #define FL_NUM_GRAY       24
00792 #define FL_GRAY           FL_BACKGROUND_COLOR
00793 #define FL_COLOR_CUBE     (Fl_Color)56
00794 #define FL_NUM_RED        5
00795 #define FL_NUM_GREEN      8
00796 #define FL_NUM_BLUE       5
00797 
00798 FL_EXPORT Fl_Color fl_inactive(Fl_Color c);
00799 
00800 FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg);
00801 
00802 FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight);
00803 
00805 inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); }
00806 
00808 inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); }
00809 
00811 inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) {
00812   if (!r && !g && !b) return FL_BLACK;
00813   else return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8);
00814 }
00815 
00817 inline Fl_Color fl_rgb_color(uchar g) {
00818   if (!g) return FL_BLACK;
00819   else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8);
00820 }
00821 
00830 inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);}
00831 
00846 inline Fl_Color fl_color_cube(int r, int g, int b) {
00847   return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);}
00848                 // group: Colors  
00850 
00853 
00861 enum Fl_Cursor {
00862   FL_CURSOR_DEFAULT     =  0, 
00863   FL_CURSOR_ARROW       = 35, 
00864   FL_CURSOR_CROSS       = 66, 
00865   FL_CURSOR_WAIT        = 76, 
00866   FL_CURSOR_INSERT      = 77, 
00867   FL_CURSOR_HAND        = 31, 
00868   FL_CURSOR_HELP        = 47, 
00869   FL_CURSOR_MOVE        = 27, 
00870   // fltk provides bitmaps for these:
00871   FL_CURSOR_NS          = 78, 
00872   FL_CURSOR_WE          = 79, 
00873   FL_CURSOR_NWSE        = 80, 
00874   FL_CURSOR_NESW        = 81, 
00875   FL_CURSOR_NONE        =255, 
00876   // for back compatibility (non MSWindows ones):
00877   FL_CURSOR_N           = 70, 
00878   FL_CURSOR_NE          = 69, 
00879   FL_CURSOR_E           = 49, 
00880   FL_CURSOR_SE          =  8, 
00881   FL_CURSOR_S           =  9, 
00882   FL_CURSOR_SW          =  7, 
00883   FL_CURSOR_W           = 36, 
00884   FL_CURSOR_NW          = 68 
00885 };              // group: Cursors  
00887 
00889 enum { // values for "when" passed to Fl::add_fd()
00890   FL_READ   = 1, 
00891   FL_WRITE  = 4, 
00892   FL_EXCEPT = 8  
00893 };
00894 
00896 enum Fl_Mode { 
00897   FL_RGB        = 0,
00898   FL_INDEX      = 1,
00899   FL_SINGLE     = 0,
00900   FL_DOUBLE     = 2,
00901   FL_ACCUM      = 4,
00902   FL_ALPHA      = 8,
00903   FL_DEPTH      = 16,
00904   FL_STENCIL    = 32,
00905   FL_RGB8       = 64,
00906   FL_MULTISAMPLE= 128,
00907   FL_STEREO     = 256,
00908   FL_FAKE_SINGLE = 512  // Fake single buffered windows using double-buffer
00909 };
00910 
00911 // image alpha blending
00912 
00913 #define FL_IMAGE_WITH_ALPHA 0x40000000
00914 
00916 enum Fl_Damage {
00917   FL_DAMAGE_CHILD    = 0x01, 
00918   FL_DAMAGE_EXPOSE   = 0x02, 
00919   FL_DAMAGE_SCROLL   = 0x04, 
00920   FL_DAMAGE_OVERLAY  = 0x08, 
00921   FL_DAMAGE_USER1    = 0x10, 
00922   FL_DAMAGE_USER2    = 0x20, 
00923   FL_DAMAGE_ALL      = 0x80  
00924 };
00925 
00926 // FLTK 1.0.x compatibility definitions...
00927 #  ifdef FLTK_1_0_COMPAT
00928 #    define contrast    fl_contrast
00929 #    define down        fl_down
00930 #    define frame       fl_frame
00931 #    define inactive    fl_inactive
00932 #  endif // FLTK_1_0_COMPAT
00933 
00934 #endif
00935 
00936 //
00937 // End of "$Id: Enumerations.H 8623 2011-04-24 17:09:41Z AlbrechtS $".
00938 //