source: rtems-graphics-toolkit/fltk-1.1.10/documentation/enumerations.html @ 513eea1

Last change on this file since 513eea1 was 513eea1, checked in by Joel Sherrill <joel.sherrill@…>, on 01/09/10 at 22:43:24

2010-01-08 Joel Sherrill <joel.sherrill@…>

fltk 1.1.10. imported

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