You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

337 lines
12KB

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