1/** 2 3 \page enumerations FLTK Enumerations 4 5 \note This file is not actively maintained any more, but is left 6 here as a reference, until the doxygen documentation is 7 completed. 8 9 \sa \ref FL/Enumerations.H. 10 11This appendix lists the enumerations provided in the 12<FL/Enumerations.H> header file, organized by section. 13Constants whose value are zero are marked with "(0)", 14this is often useful to know when programming. 15 16 17\section enumerations_versions Version Numbers 18 19The FLTK version number is stored in a number of compile-time constants: 20 21\li FL_MAJOR_VERSION - The major release number, currently 1. 22\li FL_MINOR_VERSION - The minor release number, currently 3. 23\li FL_PATCH_VERSION - The patch release number, currently 0. 24\li FL_VERSION - A combined floating-point version number for 25 the major, minor, and patch release numbers, currently 1.0300. 26 27 28\section enumerations_events Events 29 30Events are identified by an \p Fl_Event enumeration value. The 31following events are currently defined: 32 33\li FL_NO_EVENT - No event (or an event fltk does not 34 understand) occurred (0). 35\li FL_PUSH - A mouse button was pushed. 36\li FL_RELEASE - A mouse button was released. 37\li FL_ENTER - The mouse pointer entered a widget. 38\li FL_LEAVE - The mouse pointer left a widget. 39\li FL_DRAG - The mouse pointer was moved with a button pressed. 40\li FL_FOCUS - A widget should receive keyboard focus. 41\li FL_UNFOCUS - A widget loses keyboard focus. 42\li FL_KEYBOARD - A key was pressed. 43\li FL_CLOSE - A window was closed. 44\li FL_MOVE - The mouse pointer was moved with no buttons pressed. 45\li FL_SHORTCUT - The user pressed a shortcut key. 46\li FL_DEACTIVATE - The widget has been deactivated. 47\li FL_ACTIVATE - The widget has been activated. 48\li FL_HIDE - The widget has been hidden. 49\li FL_SHOW - The widget has been shown. 50\li FL_PASTE - The widget should paste the contents of the 51 clipboard. 52\li FL_SELECTIONCLEAR - The widget should clear any selections 53 made for the clipboard. 54\li FL_MOUSEWHEEL - The horizontal or vertical mousewheel was turned. 55\li FL_DND_ENTER - The mouse pointer entered a widget dragging data. 56\li FL_DND_DRAG - The mouse pointer was moved dragging data. 57\li FL_DND_LEAVE - The mouse pointer left a widget still dragging 58 data. 59\li FL_DND_RELEASE - Dragged data is about to be dropped. 60 61 62\section enumerations_when Callback "When" Conditions 63 64The following constants determine when a callback is performed: 65 66\li FL_WHEN_NEVER - Never call the callback (0). 67\li FL_WHEN_CHANGED - Do the callback only when the widget 68 value changes. 69\li FL_WHEN_NOT_CHANGED - Do the callback whenever the user 70 interacts with the widget. 71\li FL_WHEN_RELEASE - Do the callback when the button or key 72 is released and the value changes. 73\li FL_WHEN_ENTER_KEY - Do the callback when the user presses 74 the ENTER key and the value changes. 75\li FL_WHEN_RELEASE_ALWAYS - Do the callback when the button 76 or key is released, even if the value doesn't change. 77\li FL_WHEN_ENTER_KEY_ALWAYS - Do the callback when the user 78 presses the ENTER key, even if the value doesn't change. 79 80 81\section enumeration_button_values Fl::event_button() Values 82 83The following constants define the button numbers for FL_PUSH and 84FL_RELEASE events: 85 86\li FL_LEFT_MOUSE - the left mouse button 87\li FL_MIDDLE_MOUSE - the middle mouse button 88\li FL_RIGHT_MOUSE - the right mouse button 89 90 91\section enumerations_event_key Fl::event_key() Values 92 93The following constants define the non-ASCII keys on the keyboard for 94FL_KEYBOARD and FL_SHORTCUT events: 95 96\li FL_Button - A mouse button; use <tt>Fl_Button + n</tt> 97 for mouse button <tt>n</tt>. 98\li FL_BackSpace - The backspace key. 99\li FL_Tab - The tab key. 100\li FL_Enter - The enter key. 101\li FL_Pause - The pause key. 102\li FL_Scroll_Lock - The scroll lock key. 103\li FL_Escape - The escape key. 104\li FL_Home - The home key. 105\li FL_Left - The left arrow key. 106\li FL_Up - The up arrow key. 107\li FL_Right - The right arrow key. 108\li FL_Down - The down arrow key. 109\li FL_Page_Up - The page-up key. 110\li FL_Page_Down - The page-down key. 111\li FL_End - The end key. 112\li FL_Print - The print (or print-screen) key. 113\li FL_Insert - The insert key. 114\li FL_Menu - The menu key. 115\li FL_Num_Lock - The num lock key. 116\li FL_KP - One of the keypad numbers; use <tt>FL_KP + n</tt> 117 for number <tt>n</tt>. 118\li FL_KP_Enter - The enter key on the keypad. 119\li FL_F - One of the function keys; use <tt>FL_F + n</tt> 120 for function key <tt>n</tt>. 121\li FL_Shift_L - The lefthand shift key. 122\li FL_Shift_R - The righthand shift key. 123\li FL_Control_L - The lefthand control key. 124\li FL_Control_R - The righthand control key. 125\li FL_Caps_Lock - The caps lock key. 126\li FL_Meta_L - The left meta/Windows key. 127\li FL_Meta_R - The right meta/Windows key. 128\li FL_Alt_L - The left alt key. 129\li FL_Alt_R - The right alt key. 130\li FL_Delete - The delete key. 131 132 133\section enumerations_event_state Fl::event_state() Values 134 135The following constants define bits in the Fl::event_state() 136value: 137 138\li FL_SHIFT - One of the shift keys is down. 139\li FL_CAPS_LOCK - The caps lock is on. 140\li FL_CTRL - One of the ctrl keys is down. 141\li FL_ALT - One of the alt keys is down. 142\li FL_NUM_LOCK - The num lock is on. 143\li FL_META - One of the meta/Windows keys is down. 144\li FL_COMMAND - An alias for FL_CTRL on WIN32 and X11, 145 or FL_META on MacOS X. 146\li FL_SCROLL_LOCK - The scroll lock is on. 147\li FL_BUTTON1 - Mouse button 1 is pushed. 148\li FL_BUTTON2 - Mouse button 2 is pushed. 149\li FL_BUTTON3 - Mouse button 3 is pushed. 150\li FL_BUTTONS - Any mouse button is pushed. 151\li FL_BUTTON(n) - Mouse button \p n ( where <tt>n > 0</tt>) is pushed. 152 153<!-- NEED 4in --> 154 155 156\section enumerations_alignment Alignment Values 157 158The following constants define bits that can be used with 159Fl_Widget::alighn() 160to control the positioning of the label: 161 162\li FL_ALIGN_CENTER - The label is centered (0). 163\li FL_ALIGN_TOP - The label is top-aligned. 164\li FL_ALIGN_BOTTOM - The label is bottom-aligned. 165\li FL_ALIGN_LEFT - The label is left-aligned. 166\li FL_ALIGN_RIGHT - The label is right-aligned. 167\li FL_ALIGN_CLIP - The label is clipped to the widget. 168\li FL_ALIGN_WRAP - The label text is wrapped as needed. 169\li FL_ALIGN_TOP_LEFT - The label appears at the top of the widget, aligned to the left. 170\li FL_ALIGN_TOP_RIGHT - The label appears at the top of the widget, aligned to the right. 171\li FL_ALIGN_BOTTOM_LEFT - The label appears at the bottom of the widget, aligned to the left. 172\li FL_ALIGN_BOTTOM_RIGHT - The label appears at the bottom of the widget, aligned to the right. 173\li FL_ALIGN_LEFT_TOP - The label appears to the left of the widget, aligned at the top. Outside labels only. 174\li FL_ALIGN_RIGHT_TOP - The label appears to the right of the widget, aligned at the top. Outside labels only. 175\li FL_ALIGN_LEFT_BOTTOM - The label appears to the left of the widget, aligned at the bottom. Outside labels only. 176\li FL_ALIGN_RIGHT_BOTTOM - The label appears to the right of the widget, aligned at the bottom. Outside labels only. 177\li FL_ALIGN_INSIDE - 'or' this with other values to put label inside the widget. 178\li FL_ALIGN_TEXT_OVER_IMAGE - Label text will appear above the image. 179\li FL_ALIGN_IMAGE_OVER_TEXT - Label text will be below the image. 180\li FL_ALIGN_IMAGE_NEXT_TO_TEXT - The image will appear to the left of the text. 181\li FL_ALIGN_TEXT_NEXT_TO_IMAGE - The image will appear to the right of the text. 182\li FL_ALIGN_IMAGE_BACKDROP - The image will be used as a background for the widget. 183 184\section enumerations_fonts Fonts 185 186The following constants define the standard FLTK fonts: 187 188\li FL_HELVETICA - Helvetica (or Arial) normal (0). 189\li FL_HELVETICA_BOLD - Helvetica (or Arial) bold. 190\li FL_HELVETICA_ITALIC - Helvetica (or Arial) oblique. 191\li FL_HELVETICA_BOLD_ITALIC - Helvetica (or Arial) bold-oblique. 192\li FL_COURIER - Courier normal. 193\li FL_COURIER_BOLD - Courier bold. 194\li FL_COURIER_ITALIC - Courier italic. 195\li FL_COURIER_BOLD_ITALIC - Courier bold-italic. 196\li FL_TIMES - Times roman. 197\li FL_TIMES_BOLD - Times bold. 198\li FL_TIMES_ITALIC - Times italic. 199\li FL_TIMES_BOLD_ITALIC - Times bold-italic. 200\li FL_SYMBOL - Standard symbol font. 201\li FL_SCREEN - Default monospaced screen font. 202\li FL_SCREEN_BOLD - Default monospaced bold screen font. 203\li FL_ZAPF_DINGBATS - Zapf-dingbats font. 204 205 206\section enumerations_colors Colors 207 208The Fl_Color enumeration type holds a FLTK color value. 209Colors are either 8-bit indexes into a virtual colormap or 24-bit RGB 210color values. Color indices occupy the lower 8 bits of the value, while 211RGB colors occupy the upper 24 bits, for a byte organization of RGBI. 212 213\subsection enumerations_color_constants Color Constants 214 215Constants are defined for the user-defined foreground and background 216colors, as well as specific colors and the start of the grayscale ramp 217and color cube in the virtual colormap. Inline functions are provided to 218retrieve specific grayscale, color cube, or RGB color values. 219 220The following color constants can be used to access the user-defined 221colors: 222 223\li FL_BACKGROUND_COLOR - the default background color 224\li FL_BACKGROUND2_COLOR - the default 225 background color for text, list, and valuator widgets 226\li FL_FOREGROUND_COLOR - the default 227 foreground color (0) used for labels and text 228\li FL_INACTIVE_COLOR - the inactive foreground color 229\li FL_SELECTION_COLOR - the default selection/highlight color 230 231The following color constants can be used to access the colors from the 232FLTK standard color cube: 233 234\li FL_BLACK 235\li FL_BLUE 236\li FL_CYAN 237\li FL_DARK_BLUE 238\li FL_DARK_CYAN 239\li FL_DARK_GREEN 240\li FL_DARK_MAGENTA 241\li FL_DARK_RED 242\li FL_DARK_YELLOW 243\li FL_GREEN 244\li FL_MAGENTA 245\li FL_RED 246\li FL_WHITE 247\li FL_YELLOW 248 249The following are named values within the standard grayscale: 250 251\li FL_GRAY0 252\li FL_DARK3 253\li FL_DARK2 254\li FL_DARK1 255\li FL_LIGHT1 256\li FL_LIGHT2 257\li FL_LIGHT3 258 259The inline methods for getting a grayscale, color cube, or 260RGB color value are described in the 261\ref drawing_colors 262section of the 263\ref drawing 264chapter. 265 266 267\section enumerations_cursors Cursors 268 269The following constants define the mouse cursors that are available in 270FLTK. The double-headed arrows are bitmaps 271provided by FLTK on X, the others are provided by system-defined 272cursors. 273 274 275\li FL_CURSOR_DEFAULT - the default cursor, usually an arrow (0) 276\li FL_CURSOR_ARROW - an arrow pointer 277\li FL_CURSOR_CROSS - crosshair 278\li FL_CURSOR_WAIT - watch or hourglass 279\li FL_CURSOR_INSERT - I-beam 280\li FL_CURSOR_HAND - hand (uparrow on MSWindows) 281\li FL_CURSOR_HELP - question mark 282\li FL_CURSOR_MOVE - 4-pointed arrow 283\li FL_CURSOR_NS - up/down arrow 284\li FL_CURSOR_WE - left/right arrow 285\li FL_CURSOR_NWSE - diagonal arrow 286\li FL_CURSOR_NESW - diagonal arrow 287\li FL_CURSOR_NONE - invisible 288 289 290\section enumerations_file_when FD "When" Conditions 291 292\li FL_READ - Call the callback when there is data to be 293 read. 294\li FL_WRITE - Call the callback when data can be written 295 without blocking. 296\li FL_EXCEPT - Call the callback if an exception occurs on 297 the file. 298 299 300\section enumerations_damage Damage Masks 301 302The following damage mask bits are used by the standard FLTK widgets: 303 304\li FL_DAMAGE_CHILD - A child needs to be redrawn. 305\li FL_DAMAGE_EXPOSE - The window was exposed. 306\li FL_DAMAGE_SCROLL - The Fl_Scroll widget was scrolled. 307\li FL_DAMAGE_OVERLAY - The overlay planes need to be redrawn. 308\li FL_DAMAGE_USER1 - First user-defined damage bit. 309\li FL_DAMAGE_USER2 - Second user-defined damage bit. 310\li FL_DAMAGE_ALL - Everything needs to be redrawn. 311 312 313\htmlonly 314<hr> 315<table summary="navigation bar" width="100%" border="0"> 316<tr> 317 <td width="45%" align="LEFT"> 318 <a class="el" href="unicode.html"> 319 [Prev] 320 Unicode and UTF-8 Support 321 </a> 322 </td> 323 <td width="10%" align="CENTER"> 324 <a class="el" href="index.html">[Index]</a> 325 </td> 326 <td width="45%" align="RIGHT"> 327 <a class="el" href="glut.html"> 328 GLUT Compatibility 329 [Next] 330 </a> 331 </td> 332</tr> 333</table> 334\endhtmlonly 335 336*/ 337