FLTK 1.3.0
Enumerations.H
Go to the documentation of this file.
00001 //
00002 // "$Id: Enumerations.H 8710 2011-05-21 21:55:59Z manolo $"
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 
00369 // These use the Private Use Area (PUA) of the Basic Multilingual Plane
00370 // of Unicode. Guaranteed not to conflict with a proper Unicode character.
00371 
00372 // These primarily map to the XFree86 keysym range
00373 #define FL_Volume_Down  0xEF11   /* Volume control down        */
00374 #define FL_Volume_Mute  0xEF12   /* Mute sound from the system */
00375 #define FL_Volume_Up    0xEF13   /* Volume control up          */
00376 #define FL_Media_Play   0xEF14   /* Start playing of audio     */
00377 #define FL_Media_Stop   0xEF15   /* Stop playing audio         */
00378 #define FL_Media_Prev   0xEF16   /* Previous track             */
00379 #define FL_Media_Next   0xEF17   /* Next track                 */
00380 #define FL_Home_Page    0xEF18   /* Display user's home page   */
00381 #define FL_Mail         0xEF19   /* Invoke user's mail program */
00382 #define FL_Search       0xEF1B   /* Search                     */
00383 #define FL_Back         0xEF26   /* Like back on a browser     */
00384 #define FL_Forward      0xEF27   /* Like forward on a browser  */
00385 #define FL_Stop         0xEF28   /* Stop current operation     */
00386 #define FL_Refresh      0xEF29   /* Refresh the page           */
00387 #define FL_Sleep        0xEF2F   /* Put system to sleep        */
00388 #define FL_Favorites    0xEF30   /* Show favorite locations    */
00389         // group: Mouse and Keyboard Events
00391 
00400 
00401 #define FL_LEFT_MOUSE   1       ///< The left mouse button
00402 #define FL_MIDDLE_MOUSE 2       ///< The middle mouse button
00403 #define FL_RIGHT_MOUSE  3       ///< The right mouse button
00404                 // group: Mouse Buttons
00406 
00407 
00413                 // group: Event States
00414 
00415 // FIXME: it would be nice to have the modifiers in the upper 8 bit so that
00416 //        a unicode ke (24bit) can be sent as an unsigned with the modifiers.
00417 
00418 #define FL_SHIFT        0x00010000      ///< One of the shift keys is down
00419 #define FL_CAPS_LOCK    0x00020000      ///< The caps lock is on
00420 #define FL_CTRL         0x00040000      ///< One of the ctrl keys is down
00421 #define FL_ALT          0x00080000      ///< One of the alt keys is down
00422 #define FL_NUM_LOCK     0x00100000      ///< The num lock is on
00423                                         // most X servers do this?
00424 #define FL_META         0x00400000      ///< One of the meta/Windows keys is down
00425                                         // correct for XFree86
00426 #define FL_SCROLL_LOCK  0x00800000      ///< The scroll lock is on
00427                                         // correct for XFree86
00428 #define FL_BUTTON1      0x01000000      ///< Mouse button 1 is pushed
00429 #define FL_BUTTON2      0x02000000      ///< Mouse button 2 is pushed
00430 #define FL_BUTTON3      0x04000000      ///< Mouse button 3 is pushed
00431 #define FL_BUTTONS      0x7f000000      ///< Any mouse button is pushed
00432 #define FL_BUTTON(n)    (0x00800000<<(n)) ///< Mouse button n (n > 0) is pushed
00433 
00434 #define FL_KEY_MASK 0x0000ffff          ///< All keys are 16 bit for now 
00435                                         //   FIXME: Unicode needs 24 bits!
00436 
00437 #ifdef __APPLE__
00438 #  define FL_COMMAND    FL_META         ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
00439 #  define FL_CONTROL    FL_CTRL         ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X
00440 #else
00441 #  define FL_COMMAND    FL_CTRL         ///< An alias for FL_CTRL on WIN32 and X11, or FL_META on MacOS X
00442 #  define FL_CONTROL    FL_META         ///< An alias for FL_META on WIN32 and X11, or FL_CTRL on MacOS X
00443 #endif // __APPLE__
00444                 // group: Event States
00446 
00464 enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C):
00465 
00466   FL_NO_BOX = 0,                
00467   FL_FLAT_BOX,                  
00468   FL_UP_BOX,                    
00469   FL_DOWN_BOX,                  
00470   FL_UP_FRAME,                  
00471   FL_DOWN_FRAME,                
00472   FL_THIN_UP_BOX,               
00473   FL_THIN_DOWN_BOX,             
00474   FL_THIN_UP_FRAME,             
00475   FL_THIN_DOWN_FRAME,           
00476   FL_ENGRAVED_BOX,              
00477   FL_EMBOSSED_BOX,              
00478   FL_ENGRAVED_FRAME,            
00479   FL_EMBOSSED_FRAME,            
00480   FL_BORDER_BOX,                
00481   _FL_SHADOW_BOX,               
00482   FL_BORDER_FRAME,              
00483   _FL_SHADOW_FRAME,             
00484   _FL_ROUNDED_BOX,              
00485   _FL_RSHADOW_BOX,              
00486   _FL_ROUNDED_FRAME,            
00487   _FL_RFLAT_BOX,                
00488   _FL_ROUND_UP_BOX,             
00489   _FL_ROUND_DOWN_BOX,           
00490   _FL_DIAMOND_UP_BOX,           
00491   _FL_DIAMOND_DOWN_BOX,         
00492   _FL_OVAL_BOX,                 
00493   _FL_OSHADOW_BOX,              
00494   _FL_OVAL_FRAME,               
00495   _FL_OFLAT_BOX,                
00496   _FL_PLASTIC_UP_BOX,           
00497   _FL_PLASTIC_DOWN_BOX,         
00498   _FL_PLASTIC_UP_FRAME,         
00499   _FL_PLASTIC_DOWN_FRAME,       
00500   _FL_PLASTIC_THIN_UP_BOX,      
00501   _FL_PLASTIC_THIN_DOWN_BOX,    
00502   _FL_PLASTIC_ROUND_UP_BOX,     
00503   _FL_PLASTIC_ROUND_DOWN_BOX,   
00504   _FL_GTK_UP_BOX,               
00505   _FL_GTK_DOWN_BOX,             
00506   _FL_GTK_UP_FRAME,             
00507   _FL_GTK_DOWN_FRAME,           
00508   _FL_GTK_THIN_UP_BOX,          
00509   _FL_GTK_THIN_DOWN_BOX,        
00510   _FL_GTK_THIN_UP_FRAME,        
00511   _FL_GTK_THIN_DOWN_FRAME,      
00512   _FL_GTK_ROUND_UP_BOX,         
00513   _FL_GTK_ROUND_DOWN_BOX,       
00514   FL_FREE_BOXTYPE               
00515 };
00516 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX();
00517 #define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX()
00518 #define FL_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_ROUND_UP_BOX()+1)
00519 extern FL_EXPORT Fl_Boxtype fl_define_FL_SHADOW_BOX();
00520 #define FL_SHADOW_BOX fl_define_FL_SHADOW_BOX()
00521 #define FL_SHADOW_FRAME (Fl_Boxtype)(fl_define_FL_SHADOW_BOX()+2)
00522 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUNDED_BOX();
00523 #define FL_ROUNDED_BOX fl_define_FL_ROUNDED_BOX()
00524 #define FL_ROUNDED_FRAME (Fl_Boxtype)(fl_define_FL_ROUNDED_BOX()+2)
00525 extern FL_EXPORT Fl_Boxtype fl_define_FL_RFLAT_BOX();
00526 #define FL_RFLAT_BOX fl_define_FL_RFLAT_BOX()
00527 extern FL_EXPORT Fl_Boxtype fl_define_FL_RSHADOW_BOX();
00528 #define FL_RSHADOW_BOX fl_define_FL_RSHADOW_BOX()
00529 extern FL_EXPORT Fl_Boxtype fl_define_FL_DIAMOND_BOX();
00530 #define FL_DIAMOND_UP_BOX fl_define_FL_DIAMOND_BOX()
00531 #define FL_DIAMOND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_DIAMOND_BOX()+1)
00532 extern FL_EXPORT Fl_Boxtype fl_define_FL_OVAL_BOX();
00533 #define FL_OVAL_BOX fl_define_FL_OVAL_BOX()
00534 #define FL_OSHADOW_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+1)
00535 #define FL_OVAL_FRAME (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+2)
00536 #define FL_OFLAT_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+3)
00537 
00538 extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX();
00539 #define FL_PLASTIC_UP_BOX fl_define_FL_PLASTIC_UP_BOX()
00540 #define FL_PLASTIC_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+1)
00541 #define FL_PLASTIC_UP_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+2)
00542 #define FL_PLASTIC_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+3)
00543 #define FL_PLASTIC_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+4)
00544 #define FL_PLASTIC_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+5)
00545 #define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6)
00546 #define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7)
00547 
00548 extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX();
00549 #define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX()
00550 #define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1)
00551 #define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2)
00552 #define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3)
00553 #define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4)
00554 #define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5)
00555 #define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6)
00556 #define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7)
00557 #define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8)
00558 #define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9)
00559 
00560 // conversions of box types to other boxtypes:
00566 inline Fl_Boxtype fl_box(Fl_Boxtype b) {
00567   return (Fl_Boxtype)((b<FL_UP_BOX||b%4>1)?b:(b-2));
00568 }
00574 inline Fl_Boxtype fl_down(Fl_Boxtype b) {
00575   return (Fl_Boxtype)((b<FL_UP_BOX)?b:(b|1));
00576 }
00582 inline Fl_Boxtype fl_frame(Fl_Boxtype b) {
00583   return (Fl_Boxtype)((b%4<2)?b:(b+2));
00584 }
00585 
00586 // back-compatibility box types:
00587 #define FL_FRAME FL_ENGRAVED_FRAME
00588 #define FL_FRAME_BOX FL_ENGRAVED_BOX
00589 #define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX
00590 #define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX
00591         // group: Box Types
00593 
00606 enum Fl_Labeltype {     // labeltypes:
00607   FL_NORMAL_LABEL       = 0,    
00608   FL_NO_LABEL,                  
00609   _FL_SHADOW_LABEL,             
00610   _FL_ENGRAVED_LABEL,           
00611   _FL_EMBOSSED_LABEL,           
00612   _FL_MULTI_LABEL,              
00613   _FL_ICON_LABEL,               
00614   _FL_IMAGE_LABEL,              
00615 
00616   FL_FREE_LABELTYPE             
00617 };
00618 
00623 #define FL_SYMBOL_LABEL FL_NORMAL_LABEL
00624 extern Fl_Labeltype FL_EXPORT fl_define_FL_SHADOW_LABEL();
00625 #define FL_SHADOW_LABEL fl_define_FL_SHADOW_LABEL()
00626 extern Fl_Labeltype FL_EXPORT fl_define_FL_ENGRAVED_LABEL();
00627 #define FL_ENGRAVED_LABEL fl_define_FL_ENGRAVED_LABEL()
00628 extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL();
00629 #define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL()
00630 
00663 typedef unsigned Fl_Align;
00665 const Fl_Align FL_ALIGN_CENTER          = (Fl_Align)0;
00668 const Fl_Align FL_ALIGN_TOP             = (Fl_Align)1;
00670 const Fl_Align FL_ALIGN_BOTTOM          = (Fl_Align)2;
00674 const Fl_Align FL_ALIGN_LEFT            = (Fl_Align)4;
00676 const Fl_Align FL_ALIGN_RIGHT           = (Fl_Align)8;
00678 const Fl_Align FL_ALIGN_INSIDE          = (Fl_Align)16;
00680 const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = (Fl_Align)0x0020;
00682 const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = (Fl_Align)0x0000;
00684 const Fl_Align FL_ALIGN_CLIP            = (Fl_Align)64;
00686 const Fl_Align FL_ALIGN_WRAP            = (Fl_Align)128;
00688 const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT = (Fl_Align)0x0100;
00690 const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE = (Fl_Align)0x0120;
00692 const Fl_Align FL_ALIGN_IMAGE_BACKDROP  = (Fl_Align)0x0200;
00693 const Fl_Align FL_ALIGN_TOP_LEFT        = FL_ALIGN_TOP | FL_ALIGN_LEFT;
00694 const Fl_Align FL_ALIGN_TOP_RIGHT       = FL_ALIGN_TOP | FL_ALIGN_RIGHT;
00695 const Fl_Align FL_ALIGN_BOTTOM_LEFT     = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT;
00696 const Fl_Align FL_ALIGN_BOTTOM_RIGHT    = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT;
00697 const Fl_Align FL_ALIGN_LEFT_TOP        = 0x0007; // magic value
00698 const Fl_Align FL_ALIGN_RIGHT_TOP       = 0x000b; // magic value
00699 const Fl_Align FL_ALIGN_LEFT_BOTTOM     = 0x000d; // magic value
00700 const Fl_Align FL_ALIGN_RIGHT_BOTTOM    = 0x000e; // magic value
00701 const Fl_Align FL_ALIGN_NOWRAP          = (Fl_Align)0; // for back compatibility
00702 const Fl_Align FL_ALIGN_POSITION_MASK   = 0x000f; // left, right, top, bottom
00703 const Fl_Align FL_ALIGN_IMAGE_MASK      = 0x0320; // l/r, t/b, backdrop
00712 typedef int Fl_Font;
00713 
00714 const Fl_Font FL_HELVETICA              = 0;    
00715 const Fl_Font FL_HELVETICA_BOLD         = 1;    
00716 const Fl_Font FL_HELVETICA_ITALIC       = 2;    
00717 const Fl_Font FL_HELVETICA_BOLD_ITALIC  = 3;    
00718 const Fl_Font FL_COURIER                = 4;    
00719 const Fl_Font FL_COURIER_BOLD           = 5;    
00720 const Fl_Font FL_COURIER_ITALIC         = 6;    
00721 const Fl_Font FL_COURIER_BOLD_ITALIC    = 7;    
00722 const Fl_Font FL_TIMES                  = 8;    
00723 const Fl_Font FL_TIMES_BOLD             = 9;    
00724 const Fl_Font FL_TIMES_ITALIC           = 10;   
00725 const Fl_Font FL_TIMES_BOLD_ITALIC      = 11;   
00726 const Fl_Font FL_SYMBOL                 = 12;   
00727 const Fl_Font FL_SCREEN                 = 13;   
00728 const Fl_Font FL_SCREEN_BOLD            = 14;   
00729 const Fl_Font FL_ZAPF_DINGBATS          = 15;   
00730 
00731 const Fl_Font FL_FREE_FONT              = 16;   
00732 const Fl_Font FL_BOLD                   = 1;    
00733 const Fl_Font FL_ITALIC                 = 2;    
00734 const Fl_Font FL_BOLD_ITALIC            = 3;    
00735 
00741 typedef int Fl_Fontsize;
00742 
00743 extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE;    
00744 
00769 typedef unsigned int Fl_Color;
00770 
00771 // Standard colors. These are used as default colors in widgets and altered as necessary
00772 const Fl_Color FL_FOREGROUND_COLOR  = 0;        
00773 const Fl_Color FL_BACKGROUND2_COLOR = 7;        
00774 const Fl_Color FL_INACTIVE_COLOR    = 8;        
00775 const Fl_Color FL_SELECTION_COLOR   = 15;       
00776 
00777   // boxtypes generally limit themselves to these colors so
00778   // the whole ramp is not allocated:
00779 
00780 const Fl_Color FL_GRAY0   = 32;                 // 'A'
00781 const Fl_Color FL_DARK3   = 39;                 // 'H'
00782 const Fl_Color FL_DARK2   = 45;                 // 'N'
00783 const Fl_Color FL_DARK1   = 47;                 // 'P'
00784 const Fl_Color FL_BACKGROUND_COLOR  = 49;       // 'R' default background color
00785 const Fl_Color FL_LIGHT1  = 50;                 // 'S'
00786 const Fl_Color FL_LIGHT2  = 52;                 // 'U'
00787 const Fl_Color FL_LIGHT3  = 54;                 // 'W'
00788 
00789   // FLTK provides a 5x8x5 color cube that is used with colormap visuals
00790 
00791 const Fl_Color FL_BLACK   = 56;
00792 const Fl_Color FL_RED     = 88;
00793 const Fl_Color FL_GREEN   = 63;
00794 const Fl_Color FL_YELLOW  = 95;
00795 const Fl_Color FL_BLUE    = 216;
00796 const Fl_Color FL_MAGENTA = 248;
00797 const Fl_Color FL_CYAN    = 223;
00798 const Fl_Color FL_DARK_RED = 72;
00799 
00800 const Fl_Color FL_DARK_GREEN    = 60;
00801 const Fl_Color FL_DARK_YELLOW   = 76;
00802 const Fl_Color FL_DARK_BLUE     = 136;
00803 const Fl_Color FL_DARK_MAGENTA  = 152;
00804 const Fl_Color FL_DARK_CYAN     = 140;
00805 
00806 const Fl_Color FL_WHITE         = 255;
00807 
00808 
00809 #define FL_FREE_COLOR     (Fl_Color)16
00810 #define FL_NUM_FREE_COLOR 16
00811 #define FL_GRAY_RAMP      (Fl_Color)32
00812 #define FL_NUM_GRAY       24
00813 #define FL_GRAY           FL_BACKGROUND_COLOR
00814 #define FL_COLOR_CUBE     (Fl_Color)56
00815 #define FL_NUM_RED        5
00816 #define FL_NUM_GREEN      8
00817 #define FL_NUM_BLUE       5
00818 
00819 FL_EXPORT Fl_Color fl_inactive(Fl_Color c);
00820 
00821 FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg);
00822 
00823 FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight);
00824 
00826 inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); }
00827 
00829 inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); }
00830 
00832 inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) {
00833   if (!r && !g && !b) return FL_BLACK;
00834   else return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8);
00835 }
00836 
00838 inline Fl_Color fl_rgb_color(uchar g) {
00839   if (!g) return FL_BLACK;
00840   else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8);
00841 }
00842 
00851 inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);}
00852 
00867 inline Fl_Color fl_color_cube(int r, int g, int b) {
00868   return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);}
00869                 // group: Colors  
00871 
00874 
00882 enum Fl_Cursor {
00883   FL_CURSOR_DEFAULT     =  0, 
00884   FL_CURSOR_ARROW       = 35, 
00885   FL_CURSOR_CROSS       = 66, 
00886   FL_CURSOR_WAIT        = 76, 
00887   FL_CURSOR_INSERT      = 77, 
00888   FL_CURSOR_HAND        = 31, 
00889   FL_CURSOR_HELP        = 47, 
00890   FL_CURSOR_MOVE        = 27, 
00891   // fltk provides bitmaps for these:
00892   FL_CURSOR_NS          = 78, 
00893   FL_CURSOR_WE          = 79, 
00894   FL_CURSOR_NWSE        = 80, 
00895   FL_CURSOR_NESW        = 81, 
00896   FL_CURSOR_NONE        =255, 
00897   // for back compatibility (non MSWindows ones):
00898   FL_CURSOR_N           = 70, 
00899   FL_CURSOR_NE          = 69, 
00900   FL_CURSOR_E           = 49, 
00901   FL_CURSOR_SE          =  8, 
00902   FL_CURSOR_S           =  9, 
00903   FL_CURSOR_SW          =  7, 
00904   FL_CURSOR_W           = 36, 
00905   FL_CURSOR_NW          = 68 
00906 };              // group: Cursors  
00908 
00910 enum { // values for "when" passed to Fl::add_fd()
00911   FL_READ   = 1, 
00912   FL_WRITE  = 4, 
00913   FL_EXCEPT = 8  
00914 };
00915 
00917 enum Fl_Mode { 
00918   FL_RGB        = 0,
00919   FL_INDEX      = 1,
00920   FL_SINGLE     = 0,
00921   FL_DOUBLE     = 2,
00922   FL_ACCUM      = 4,
00923   FL_ALPHA      = 8,
00924   FL_DEPTH      = 16,
00925   FL_STENCIL    = 32,
00926   FL_RGB8       = 64,
00927   FL_MULTISAMPLE= 128,
00928   FL_STEREO     = 256,
00929   FL_FAKE_SINGLE = 512  // Fake single buffered windows using double-buffer
00930 };
00931 
00932 // image alpha blending
00933 
00934 #define FL_IMAGE_WITH_ALPHA 0x40000000
00935 
00937 enum Fl_Damage {
00938   FL_DAMAGE_CHILD    = 0x01, 
00939   FL_DAMAGE_EXPOSE   = 0x02, 
00940   FL_DAMAGE_SCROLL   = 0x04, 
00941   FL_DAMAGE_OVERLAY  = 0x08, 
00942   FL_DAMAGE_USER1    = 0x10, 
00943   FL_DAMAGE_USER2    = 0x20, 
00944   FL_DAMAGE_ALL      = 0x80  
00945 };
00946 
00947 // FLTK 1.0.x compatibility definitions...
00948 #  ifdef FLTK_1_0_COMPAT
00949 #    define contrast    fl_contrast
00950 #    define down        fl_down
00951 #    define frame       fl_frame
00952 #    define inactive    fl_inactive
00953 #  endif // FLTK_1_0_COMPAT
00954 
00955 #endif
00956 
00957 //
00958 // End of "$Id: Enumerations.H 8710 2011-05-21 21:55:59Z manolo $".
00959 //