• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • File List
  • File Members

Enumerations.H

Go to the documentation of this file.
00001 //
00002 // "$Id$"
00003 //
00004 // Enumerations for the Fast Light Tool Kit (FLTK).
00005 //
00006 // Copyright 1998-2017 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 /*
00027  ******************************************************************************
00028  * Notes on FL_ABI_VERSION and deprecated (obsolete) FLTK_ABI_VERSION:
00029  *
00030  * (1)  FLTK_ABI_VERSION is deprecated, but still defined below.
00031  *      Do NOT define FLTK_ABI_VERSION here - it would be overwritten later.
00032  *
00033  * (2)  FL_ABI_VERSION is now (as of FLTK 1.3.4) defined by configure
00034  *      or CMake. Do NOT define it here. Its definition will be included
00035  *      below by "#include <FL/abi-version.h>".
00036  *
00037  * (3)  If you use the provided IDE files (Windows VC++ or Xcode) you should
00038  *      edit the definition in the provided file abi-version.ide. The correct
00039  *      file is `/path/to/fltk/abi-version.ide' .
00040  *
00041  ******************************************************************************
00042  * For more informations on FL_ABI_VERSION see README.abi-version.txt.
00043  ******************************************************************************
00044  */
00045 
00046 #include <FL/abi-version.h>
00047 
00048 #  include "Fl_Export.H"
00049 #  include "fl_types.h"
00050 
00059 
00064 #define FL_MAJOR_VERSION        1
00065 
00071 #define FL_MINOR_VERSION        3
00072 
00078 #define FL_PATCH_VERSION        5
00079 
00101 #define FL_VERSION      ( (double)FL_MAJOR_VERSION + \
00102                           (double)FL_MINOR_VERSION * 0.01 + \
00103                           (double)FL_PATCH_VERSION * 0.0001 )
00104 
00123 #define FL_API_VERSION (FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100 + FL_PATCH_VERSION)
00124 
00155 #ifndef FL_ABI_VERSION
00156 #define FL_ABI_VERSION (FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100)
00157 #endif
00158 
00159 /*
00160   Check if FL_ABI_VERSION is out of allowed range; redefine if necessary.
00161 
00162   This is done to prevent users from defining an illegal ABI version.
00163 
00164   Rule: FL_MAJOR_VERSION * 10000 + FL_MINOR_VERSION * 100
00165           <= FL_ABI_VERSION <= FL_API_VERSION.
00166 
00167   Example (FLTK 1.3.4):
00168 
00169     10300 <= FL_ABI_VERSION <= 10304
00170 
00171   Note: configure + CMake can be used to define FL_ABI_VERSION, but they
00172   do not check validity. This is done here.
00173 */
00174 
00175 #if FL_ABI_VERSION < FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100
00176 
00177 # undef FL_ABI_VERSION
00178 # define FL_ABI_VERSION (FL_MAJOR_VERSION*10000 + FL_MINOR_VERSION*100)
00179 
00180 #elif FL_ABI_VERSION > FL_API_VERSION
00181 
00182 # undef FL_ABI_VERSION
00183 # define FL_ABI_VERSION FL_API_VERSION
00184 
00185 #endif
00186 
00187 /*
00188   FLTK_ABI_VERSION is deprecated (replaced by FL_ABI_VERSION).
00189 
00190   This deprecated constant will be removed in FLTK 1.4.0 and later.
00191   Please use FL_ABI_VERSION when FLTK 1.4.0 has been released.
00192 */
00193 
00194 #ifdef FLTK_ABI_VERSION
00195 #undef FLTK_ABI_VERSION
00196 #endif
00197 
00198 #define FLTK_ABI_VERSION FL_ABI_VERSION
00199         // group: Version Numbers
00201 
00220 // DEV NOTE: Keep this list in sync with FL/names.H
00221 enum Fl_Event { // events
00223   FL_NO_EVENT           = 0,
00224 
00236   FL_PUSH               = 1,
00237 
00244   FL_RELEASE            = 2,
00245 
00253   FL_ENTER              = 3,
00254 
00259   FL_LEAVE              = 4,
00260 
00268   FL_DRAG               = 5,
00269 
00283   FL_FOCUS              = 6,
00284   
00288   FL_UNFOCUS            = 7,
00289 
00310   FL_KEYDOWN            = 8,
00311 
00315   FL_KEYBOARD           = 8,
00316  
00320   FL_KEYUP              = 9,
00321 
00327   FL_CLOSE              = 10,
00328 
00335   FL_MOVE               = 11,
00336 
00349   FL_SHORTCUT           = 12,
00350 
00356   FL_DEACTIVATE         = 13,
00357 
00361   FL_ACTIVATE           = 14,
00362 
00369   FL_HIDE               = 15,
00370 
00377   FL_SHOW               = 16,
00378 
00383   FL_PASTE              = 17,
00384 
00390   FL_SELECTIONCLEAR     = 18,
00391 
00395   FL_MOUSEWHEEL         = 19,
00396 
00401   FL_DND_ENTER          = 20,
00402 
00407   FL_DND_DRAG           = 21,
00408 
00411   FL_DND_LEAVE          = 22,
00412 
00417   FL_DND_RELEASE        = 23,
00421   FL_SCREEN_CONFIGURATION_CHANGED = 24,
00424   FL_FULLSCREEN         = 25,
00429   FL_ZOOM_GESTURE       = 26
00430 };
00431 
00439 enum Fl_When { // Fl_Widget::when():
00440   FL_WHEN_NEVER         = 0,    
00441   FL_WHEN_CHANGED       = 1,    
00442   FL_WHEN_NOT_CHANGED   = 2,    
00443   FL_WHEN_RELEASE       = 4,    
00444   FL_WHEN_RELEASE_ALWAYS= 6,    
00445   FL_WHEN_ENTER_KEY     = 8,    
00446   FL_WHEN_ENTER_KEY_ALWAYS=10,  
00447   FL_WHEN_ENTER_KEY_CHANGED=11  
00448 };
00449                 // group: When Conditions
00451 
00464 
00465 // FIXME: These codes collide with valid Unicode keys
00466 
00467 #define FL_Button       0xfee8  
00468 #define FL_BackSpace    0xff08  
00469 #define FL_Tab          0xff09  
00470 #define FL_Iso_Key      0xff0c  
00471 #define FL_Enter        0xff0d  
00472 #define FL_Pause        0xff13  
00473 #define FL_Scroll_Lock  0xff14  
00474 #define FL_Escape       0xff1b  
00475 #define FL_Kana         0xff2e  
00476 #define FL_Eisu         0xff2f  
00477 #define FL_Yen          0xff30  
00478 #define FL_JIS_Underscore 0xff31 
00479 #define FL_Home         0xff50  
00480 #define FL_Left         0xff51  
00481 #define FL_Up           0xff52  
00482 #define FL_Right        0xff53  
00483 #define FL_Down         0xff54  
00484 #define FL_Page_Up      0xff55  
00485 #define FL_Page_Down    0xff56  
00486 #define FL_End          0xff57  
00487 #define FL_Print        0xff61  
00488 #define FL_Insert       0xff63  
00489 #define FL_Menu         0xff67  
00490 #define FL_Help         0xff68  
00491 #define FL_Num_Lock     0xff7f  
00492 #define FL_KP           0xff80  
00493 #define FL_KP_Enter     0xff8d  
00494 #define FL_KP_Last      0xffbd  
00495 #define FL_F            0xffbd  
00496 #define FL_F_Last       0xffe0  
00497 #define FL_Shift_L      0xffe1  
00498 #define FL_Shift_R      0xffe2  
00499 #define FL_Control_L    0xffe3  
00500 #define FL_Control_R    0xffe4  
00501 #define FL_Caps_Lock    0xffe5  
00502 #define FL_Meta_L       0xffe7  
00503 #define FL_Meta_R       0xffe8  
00504 #define FL_Alt_L        0xffe9  
00505 #define FL_Alt_R        0xffea  
00506 #define FL_Delete       0xffff  
00507 
00508 // These use the Private Use Area (PUA) of the Basic Multilingual Plane
00509 // of Unicode. Guaranteed not to conflict with a proper Unicode character.
00510 
00511 // These primarily map to the XFree86 keysym range
00512 #define FL_Volume_Down  0xEF11   /* Volume control down        */
00513 #define FL_Volume_Mute  0xEF12   /* Mute sound from the system */
00514 #define FL_Volume_Up    0xEF13   /* Volume control up          */
00515 #define FL_Media_Play   0xEF14   /* Start playing of audio     */
00516 #define FL_Media_Stop   0xEF15   /* Stop playing audio         */
00517 #define FL_Media_Prev   0xEF16   /* Previous track             */
00518 #define FL_Media_Next   0xEF17   /* Next track                 */
00519 #define FL_Home_Page    0xEF18   /* Display user's home page   */
00520 #define FL_Mail         0xEF19   /* Invoke user's mail program */
00521 #define FL_Search       0xEF1B   /* Search                     */
00522 #define FL_Back         0xEF26   /* Like back on a browser     */
00523 #define FL_Forward      0xEF27   /* Like forward on a browser  */
00524 #define FL_Stop         0xEF28   /* Stop current operation     */
00525 #define FL_Refresh      0xEF29   /* Refresh the page           */
00526 #define FL_Sleep        0xEF2F   /* Put system to sleep        */
00527 #define FL_Favorites    0xEF30   /* Show favorite locations    */
00528         // group: Mouse and Keyboard Events
00530 
00539 
00540 #define FL_LEFT_MOUSE   1       
00541 #define FL_MIDDLE_MOUSE 2       
00542 #define FL_RIGHT_MOUSE  3       
00543 
00544                 // group: Mouse Buttons
00545 
00546 
00552                 // group: Event States
00553 
00554 // FIXME: it would be nice to have the modifiers in the upper 8 bit so that
00555 //        a unicode ke (24bit) can be sent as an unsigned with the modifiers.
00556 
00557 #define FL_SHIFT        0x00010000      
00558 #define FL_CAPS_LOCK    0x00020000      
00559 #define FL_CTRL         0x00040000      
00560 #define FL_ALT          0x00080000      
00561 #define FL_NUM_LOCK     0x00100000      
00562                                         // most X servers do this?
00563 #define FL_META         0x00400000      
00564                                         // correct for XFree86
00565 #define FL_SCROLL_LOCK  0x00800000      
00566                                         // correct for XFree86
00567 #define FL_BUTTON1      0x01000000      
00568 #define FL_BUTTON2      0x02000000      
00569 #define FL_BUTTON3      0x04000000      
00570 #define FL_BUTTONS      0x7f000000      
00571 #define FL_BUTTON(n)    (0x00800000<<(n)) 
00572 
00573 #define FL_KEY_MASK 0x0000ffff          
00574                                         //   FIXME: Unicode needs 24 bits!
00575 
00576 #ifdef __APPLE__
00577 #  define FL_COMMAND    FL_META         
00578 #  define FL_CONTROL    FL_CTRL         
00579 #else
00580 #  define FL_COMMAND    FL_CTRL         
00581 #  define FL_CONTROL    FL_META         
00582 #endif // __APPLE__
00583                 // group: Event States
00585 
00603 enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.cxx):
00604 
00605   FL_NO_BOX = 0,                
00606   FL_FLAT_BOX,                  
00607   FL_UP_BOX,                    
00608   FL_DOWN_BOX,                  
00609   FL_UP_FRAME,                  
00610   FL_DOWN_FRAME,                
00611   FL_THIN_UP_BOX,               
00612   FL_THIN_DOWN_BOX,             
00613   FL_THIN_UP_FRAME,             
00614   FL_THIN_DOWN_FRAME,           
00615   FL_ENGRAVED_BOX,              
00616   FL_EMBOSSED_BOX,              
00617   FL_ENGRAVED_FRAME,            
00618   FL_EMBOSSED_FRAME,            
00619   FL_BORDER_BOX,                
00620   _FL_SHADOW_BOX,               
00621   FL_BORDER_FRAME,              
00622   _FL_SHADOW_FRAME,             
00623   _FL_ROUNDED_BOX,              
00624   _FL_RSHADOW_BOX,              
00625   _FL_ROUNDED_FRAME,            
00626   _FL_RFLAT_BOX,                
00627   _FL_ROUND_UP_BOX,             
00628   _FL_ROUND_DOWN_BOX,           
00629   _FL_DIAMOND_UP_BOX,           
00630   _FL_DIAMOND_DOWN_BOX,         
00631   _FL_OVAL_BOX,                 
00632   _FL_OSHADOW_BOX,              
00633   _FL_OVAL_FRAME,               
00634   _FL_OFLAT_BOX,                
00635   _FL_PLASTIC_UP_BOX,           
00636   _FL_PLASTIC_DOWN_BOX,         
00637   _FL_PLASTIC_UP_FRAME,         
00638   _FL_PLASTIC_DOWN_FRAME,       
00639   _FL_PLASTIC_THIN_UP_BOX,      
00640   _FL_PLASTIC_THIN_DOWN_BOX,    
00641   _FL_PLASTIC_ROUND_UP_BOX,     
00642   _FL_PLASTIC_ROUND_DOWN_BOX,   
00643   _FL_GTK_UP_BOX,               
00644   _FL_GTK_DOWN_BOX,             
00645   _FL_GTK_UP_FRAME,             
00646   _FL_GTK_DOWN_FRAME,           
00647   _FL_GTK_THIN_UP_BOX,          
00648   _FL_GTK_THIN_DOWN_BOX,        
00649   _FL_GTK_THIN_UP_FRAME,        
00650   _FL_GTK_THIN_DOWN_FRAME,      
00651   _FL_GTK_ROUND_UP_BOX,         
00652   _FL_GTK_ROUND_DOWN_BOX,       
00653   _FL_GLEAM_UP_BOX,             
00654   _FL_GLEAM_DOWN_BOX,           
00655   _FL_GLEAM_UP_FRAME,           
00656   _FL_GLEAM_DOWN_FRAME,         
00657   _FL_GLEAM_THIN_UP_BOX,        
00658   _FL_GLEAM_THIN_DOWN_BOX,      
00659   _FL_GLEAM_ROUND_UP_BOX,       
00660   _FL_GLEAM_ROUND_DOWN_BOX,     
00661   FL_FREE_BOXTYPE               
00662 };
00663 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX();
00664 #define FL_ROUND_UP_BOX fl_define_FL_ROUND_UP_BOX()
00665 #define FL_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_ROUND_UP_BOX()+1)
00666 extern FL_EXPORT Fl_Boxtype fl_define_FL_SHADOW_BOX();
00667 #define FL_SHADOW_BOX fl_define_FL_SHADOW_BOX()
00668 #define FL_SHADOW_FRAME (Fl_Boxtype)(fl_define_FL_SHADOW_BOX()+2)
00669 extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUNDED_BOX();
00670 #define FL_ROUNDED_BOX fl_define_FL_ROUNDED_BOX()
00671 #define FL_ROUNDED_FRAME (Fl_Boxtype)(fl_define_FL_ROUNDED_BOX()+2)
00672 extern FL_EXPORT Fl_Boxtype fl_define_FL_RFLAT_BOX();
00673 #define FL_RFLAT_BOX fl_define_FL_RFLAT_BOX()
00674 extern FL_EXPORT Fl_Boxtype fl_define_FL_RSHADOW_BOX();
00675 #define FL_RSHADOW_BOX fl_define_FL_RSHADOW_BOX()
00676 extern FL_EXPORT Fl_Boxtype fl_define_FL_DIAMOND_BOX();
00677 #define FL_DIAMOND_UP_BOX fl_define_FL_DIAMOND_BOX()
00678 #define FL_DIAMOND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_DIAMOND_BOX()+1)
00679 extern FL_EXPORT Fl_Boxtype fl_define_FL_OVAL_BOX();
00680 #define FL_OVAL_BOX fl_define_FL_OVAL_BOX()
00681 #define FL_OSHADOW_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+1)
00682 #define FL_OVAL_FRAME (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+2)
00683 #define FL_OFLAT_BOX (Fl_Boxtype)(fl_define_FL_OVAL_BOX()+3)
00684 
00685 extern FL_EXPORT Fl_Boxtype fl_define_FL_PLASTIC_UP_BOX();
00686 #define FL_PLASTIC_UP_BOX fl_define_FL_PLASTIC_UP_BOX()
00687 #define FL_PLASTIC_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+1)
00688 #define FL_PLASTIC_UP_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+2)
00689 #define FL_PLASTIC_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+3)
00690 #define FL_PLASTIC_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+4)
00691 #define FL_PLASTIC_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+5)
00692 #define FL_PLASTIC_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+6)
00693 #define FL_PLASTIC_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_PLASTIC_UP_BOX()+7)
00694 
00695 extern FL_EXPORT Fl_Boxtype fl_define_FL_GTK_UP_BOX();
00696 #define FL_GTK_UP_BOX fl_define_FL_GTK_UP_BOX()
00697 #define FL_GTK_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+1)
00698 #define FL_GTK_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+2)
00699 #define FL_GTK_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+3)
00700 #define FL_GTK_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+4)
00701 #define FL_GTK_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+5)
00702 #define FL_GTK_THIN_UP_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+6)
00703 #define FL_GTK_THIN_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+7)
00704 #define FL_GTK_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+8)
00705 #define FL_GTK_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GTK_UP_BOX()+9)
00706 
00707 extern FL_EXPORT Fl_Boxtype fl_define_FL_GLEAM_UP_BOX();
00708 #define FL_GLEAM_UP_BOX fl_define_FL_GLEAM_UP_BOX()
00709 #define FL_GLEAM_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+1)
00710 #define FL_GLEAM_UP_FRAME (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+2)
00711 #define FL_GLEAM_DOWN_FRAME (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+3)
00712 #define FL_GLEAM_THIN_UP_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+4)
00713 #define FL_GLEAM_THIN_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+5)
00714 #define FL_GLEAM_ROUND_UP_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+6)
00715 #define FL_GLEAM_ROUND_DOWN_BOX (Fl_Boxtype)(fl_define_FL_GLEAM_UP_BOX()+7)
00716 
00717 // conversions of box types to other boxtypes:
00723 inline Fl_Boxtype fl_box(Fl_Boxtype b) {
00724   return (Fl_Boxtype)((b<FL_UP_BOX||b%4>1)?b:(b-2));
00725 }
00731 inline Fl_Boxtype fl_down(Fl_Boxtype b) {
00732   return (Fl_Boxtype)((b<FL_UP_BOX)?b:(b|1));
00733 }
00739 inline Fl_Boxtype fl_frame(Fl_Boxtype b) {
00740   return (Fl_Boxtype)((b%4<2)?b:(b+2));
00741 }
00742 
00743 // back-compatibility box types:
00744 #define FL_FRAME FL_ENGRAVED_FRAME
00745 #define FL_FRAME_BOX FL_ENGRAVED_BOX
00746 #define FL_CIRCLE_BOX FL_ROUND_DOWN_BOX
00747 #define FL_DIAMOND_BOX FL_DIAMOND_DOWN_BOX
00748         // group: Box Types
00750 
00763 enum Fl_Labeltype {     // labeltypes:
00764   FL_NORMAL_LABEL       = 0, 
00765   FL_NO_LABEL,         
00766   _FL_SHADOW_LABEL,    
00767   _FL_ENGRAVED_LABEL,    
00768   _FL_EMBOSSED_LABEL,  
00769   _FL_MULTI_LABEL,     
00770   _FL_ICON_LABEL,      
00771   _FL_IMAGE_LABEL,     
00772 
00773   FL_FREE_LABELTYPE    
00774 };
00775 
00780 #define FL_SYMBOL_LABEL FL_NORMAL_LABEL
00781 extern Fl_Labeltype FL_EXPORT fl_define_FL_SHADOW_LABEL();
00782 #define FL_SHADOW_LABEL fl_define_FL_SHADOW_LABEL()
00783 extern Fl_Labeltype FL_EXPORT fl_define_FL_ENGRAVED_LABEL();
00784 #define FL_ENGRAVED_LABEL fl_define_FL_ENGRAVED_LABEL()
00785 extern Fl_Labeltype FL_EXPORT fl_define_FL_EMBOSSED_LABEL();
00786 #define FL_EMBOSSED_LABEL fl_define_FL_EMBOSSED_LABEL()
00787 
00828 typedef unsigned Fl_Align;
00830 const Fl_Align FL_ALIGN_CENTER          = (Fl_Align)0;
00833 const Fl_Align FL_ALIGN_TOP             = (Fl_Align)1;
00835 const Fl_Align FL_ALIGN_BOTTOM          = (Fl_Align)2;
00839 const Fl_Align FL_ALIGN_LEFT            = (Fl_Align)4;
00841 const Fl_Align FL_ALIGN_RIGHT           = (Fl_Align)8;
00843 const Fl_Align FL_ALIGN_INSIDE          = (Fl_Align)16;
00845 const Fl_Align FL_ALIGN_TEXT_OVER_IMAGE = (Fl_Align)0x0020;
00847 const Fl_Align FL_ALIGN_IMAGE_OVER_TEXT = (Fl_Align)0x0000;
00849 const Fl_Align FL_ALIGN_CLIP            = (Fl_Align)64;
00851 const Fl_Align FL_ALIGN_WRAP            = (Fl_Align)128;
00853 const Fl_Align FL_ALIGN_IMAGE_NEXT_TO_TEXT = (Fl_Align)0x0100;
00855 const Fl_Align FL_ALIGN_TEXT_NEXT_TO_IMAGE = (Fl_Align)0x0120;
00857 const Fl_Align FL_ALIGN_IMAGE_BACKDROP  = (Fl_Align)0x0200;
00858 const Fl_Align FL_ALIGN_TOP_LEFT        = FL_ALIGN_TOP | FL_ALIGN_LEFT;
00859 const Fl_Align FL_ALIGN_TOP_RIGHT       = FL_ALIGN_TOP | FL_ALIGN_RIGHT;
00860 const Fl_Align FL_ALIGN_BOTTOM_LEFT     = FL_ALIGN_BOTTOM | FL_ALIGN_LEFT;
00861 const Fl_Align FL_ALIGN_BOTTOM_RIGHT    = FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT;
00862 const Fl_Align FL_ALIGN_LEFT_TOP        = 0x0007; // magic value
00863 const Fl_Align FL_ALIGN_RIGHT_TOP       = 0x000b; // magic value
00864 const Fl_Align FL_ALIGN_LEFT_BOTTOM     = 0x000d; // magic value
00865 const Fl_Align FL_ALIGN_RIGHT_BOTTOM    = 0x000e; // magic value
00866 const Fl_Align FL_ALIGN_NOWRAP          = (Fl_Align)0; // for back compatibility
00867 const Fl_Align FL_ALIGN_POSITION_MASK   = 0x000f; // left, right, top, bottom
00868 const Fl_Align FL_ALIGN_IMAGE_MASK      = 0x0320; // l/r, t/b, backdrop
00877 typedef int Fl_Font;
00878 
00879 const Fl_Font FL_HELVETICA              = 0;    
00880 const Fl_Font FL_HELVETICA_BOLD         = 1;    
00881 const Fl_Font FL_HELVETICA_ITALIC       = 2;    
00882 const Fl_Font FL_HELVETICA_BOLD_ITALIC  = 3;    
00883 const Fl_Font FL_COURIER                = 4;    
00884 const Fl_Font FL_COURIER_BOLD           = 5;    
00885 const Fl_Font FL_COURIER_ITALIC         = 6;    
00886 const Fl_Font FL_COURIER_BOLD_ITALIC    = 7;    
00887 const Fl_Font FL_TIMES                  = 8;    
00888 const Fl_Font FL_TIMES_BOLD             = 9;    
00889 const Fl_Font FL_TIMES_ITALIC           = 10;   
00890 const Fl_Font FL_TIMES_BOLD_ITALIC      = 11;   
00891 const Fl_Font FL_SYMBOL                 = 12;   
00892 const Fl_Font FL_SCREEN                 = 13;   
00893 const Fl_Font FL_SCREEN_BOLD            = 14;   
00894 const Fl_Font FL_ZAPF_DINGBATS          = 15;   
00895 
00896 const Fl_Font FL_FREE_FONT              = 16;   
00897 const Fl_Font FL_BOLD                   = 1;    
00898 const Fl_Font FL_ITALIC                 = 2;    
00899 const Fl_Font FL_BOLD_ITALIC            = 3;    
00900 
00906 typedef int Fl_Fontsize;
00907 
00908 extern FL_EXPORT Fl_Fontsize FL_NORMAL_SIZE;    
00909 
00934 typedef unsigned int Fl_Color;
00935 
00936 // Standard colors. These are used as default colors in widgets and altered as necessary
00937 const Fl_Color FL_FOREGROUND_COLOR  = 0;        
00938 const Fl_Color FL_BACKGROUND2_COLOR = 7;        
00939 const Fl_Color FL_INACTIVE_COLOR    = 8;        
00940 const Fl_Color FL_SELECTION_COLOR   = 15;       
00941 
00942   // boxtypes generally limit themselves to these colors so
00943   // the whole ramp is not allocated:
00944 
00945 const Fl_Color FL_GRAY0   = 32;                 // 'A'
00946 const Fl_Color FL_DARK3   = 39;                 // 'H'
00947 const Fl_Color FL_DARK2   = 45;                 // 'N'
00948 const Fl_Color FL_DARK1   = 47;                 // 'P'
00949 const Fl_Color FL_BACKGROUND_COLOR  = 49;       // 'R' default background color
00950 const Fl_Color FL_LIGHT1  = 50;                 // 'S'
00951 const Fl_Color FL_LIGHT2  = 52;                 // 'U'
00952 const Fl_Color FL_LIGHT3  = 54;                 // 'W'
00953 
00954   // FLTK provides a 5x8x5 color cube that is used with colormap visuals
00955 
00956 const Fl_Color FL_BLACK   = 56;
00957 const Fl_Color FL_RED     = 88;
00958 const Fl_Color FL_GREEN   = 63;
00959 const Fl_Color FL_YELLOW  = 95;
00960 const Fl_Color FL_BLUE    = 216;
00961 const Fl_Color FL_MAGENTA = 248;
00962 const Fl_Color FL_CYAN    = 223;
00963 const Fl_Color FL_DARK_RED = 72;
00964 
00965 const Fl_Color FL_DARK_GREEN    = 60;
00966 const Fl_Color FL_DARK_YELLOW   = 76;
00967 const Fl_Color FL_DARK_BLUE     = 136;
00968 const Fl_Color FL_DARK_MAGENTA  = 152;
00969 const Fl_Color FL_DARK_CYAN     = 140;
00970 
00971 const Fl_Color FL_WHITE         = 255;
00972 
00973 
00974 #define FL_FREE_COLOR     (Fl_Color)16
00975 #define FL_NUM_FREE_COLOR 16
00976 #define FL_GRAY_RAMP      (Fl_Color)32
00977 #define FL_NUM_GRAY       24
00978 #define FL_GRAY           FL_BACKGROUND_COLOR
00979 #define FL_COLOR_CUBE     (Fl_Color)56
00980 #define FL_NUM_RED        5
00981 #define FL_NUM_GREEN      8
00982 #define FL_NUM_BLUE       5
00983 
00984 FL_EXPORT Fl_Color fl_inactive(Fl_Color c);
00985 
00986 FL_EXPORT Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg);
00987 
00988 FL_EXPORT Fl_Color fl_color_average(Fl_Color c1, Fl_Color c2, float weight);
00989 
00991 inline Fl_Color fl_lighter(Fl_Color c) { return fl_color_average(c, FL_WHITE, .67f); }
00992 
00994 inline Fl_Color fl_darker(Fl_Color c) { return fl_color_average(c, FL_BLACK, .67f); }
00995 
00997 inline Fl_Color fl_rgb_color(uchar r, uchar g, uchar b) {
00998   if (!r && !g && !b) return FL_BLACK;
00999   else return (Fl_Color)(((((r << 8) | g) << 8) | b) << 8);
01000 }
01001 
01003 inline Fl_Color fl_rgb_color(uchar g) {
01004   if (!g) return FL_BLACK;
01005   else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8);
01006 }
01007 
01016 inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);}
01017 
01032 inline Fl_Color fl_color_cube(int r, int g, int b) {
01033   return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);}
01034                 // group: Colors
01036 
01039 
01047 /* FIXME: We should renumber these, but that will break the ABI */
01048 enum Fl_Cursor {
01049   FL_CURSOR_DEFAULT    =  0, 
01050   FL_CURSOR_ARROW      = 35, 
01051   FL_CURSOR_CROSS      = 66, 
01052   FL_CURSOR_WAIT       = 76, 
01053   FL_CURSOR_INSERT     = 77, 
01054   FL_CURSOR_HAND       = 31, 
01055   FL_CURSOR_HELP       = 47, 
01056   FL_CURSOR_MOVE       = 27, 
01058   /* Resize indicators */
01059   FL_CURSOR_NS         = 78, 
01060   FL_CURSOR_WE         = 79, 
01061   FL_CURSOR_NWSE       = 80, 
01062   FL_CURSOR_NESW       = 81, 
01063   FL_CURSOR_N          = 70, 
01064   FL_CURSOR_NE         = 69, 
01065   FL_CURSOR_E          = 49, 
01066   FL_CURSOR_SE         =  8, 
01067   FL_CURSOR_S          =  9, 
01068   FL_CURSOR_SW         =  7, 
01069   FL_CURSOR_W          = 36, 
01070   FL_CURSOR_NW         = 68, 
01072   FL_CURSOR_NONE       =255  
01073 };              // group: Cursors  
01075 
01077 enum { // values for "when" passed to Fl::add_fd()
01078   FL_READ   = 1, 
01079   FL_WRITE  = 4, 
01080   FL_EXCEPT = 8  
01081 };
01082 
01084 enum Fl_Mode { 
01085   FL_RGB        = 0,
01086   FL_INDEX      = 1,
01087   FL_SINGLE     = 0,
01088   FL_DOUBLE     = 2,
01089   FL_ACCUM      = 4,
01090   FL_ALPHA      = 8,
01091   FL_DEPTH      = 16,
01092   FL_STENCIL    = 32,
01093   FL_RGB8       = 64,
01094   FL_MULTISAMPLE= 128,
01095   FL_STEREO     = 256,
01096   FL_FAKE_SINGLE = 512, // Fake single buffered windows using double-buffer
01097   FL_OPENGL3    = 1024
01098 };
01099 
01100 // image alpha blending
01101 
01102 #define FL_IMAGE_WITH_ALPHA 0x40000000
01103 
01105 enum Fl_Damage {
01106   FL_DAMAGE_CHILD    = 0x01, 
01107   FL_DAMAGE_EXPOSE   = 0x02, 
01108   FL_DAMAGE_SCROLL   = 0x04, 
01109   FL_DAMAGE_OVERLAY  = 0x08, 
01110   FL_DAMAGE_USER1    = 0x10, 
01111   FL_DAMAGE_USER2    = 0x20, 
01112   FL_DAMAGE_ALL      = 0x80  
01113 };
01114 
01115 // FLTK 1.0.x compatibility definitions...
01116 #  ifdef FLTK_1_0_COMPAT
01117 #    define contrast    fl_contrast
01118 #    define down        fl_down
01119 #    define frame       fl_frame
01120 #    define inactive    fl_inactive
01121 #  endif // FLTK_1_0_COMPAT
01122 
01123 #endif
01124 
01125 //
01126 // End of "$Id$".
01127 //
  • © 1998-2016 by Bill Spitzak and others.     FLTK

  • © 1998-2016 by Bill Spitzak and others.     FLTK

    Permission is granted to reproduce this manual or any portion for any purpose, provided this copyright and permission notice are preserved.