summaryrefslogtreecommitdiff
path: root/documentation/enumerations.html
blob: 8d303bcc88a66b26094a132597c249d9e9793f51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<HTML>
<BODY>
<H1 ALIGN=RIGHT><A NAME="enumerations">C - FLTK Enumerations.H</A></H1>

This appendix lists the enumerations provided in the
<tt>&lt;FL/Enumerations.H></tt> header file, organized by section.

<H2>Version Numbers</H2>

The FLTK version number is stored in a number of compile-time constants:

<ul>

	<li><tt>FL_MAJOR_VERSION</tt> - The major release number, currently
	1.

	<li><tt>FL_MINOR_VERSION</tt> - The minor release number, currently
	0.

	<li><tt>FL_PATCH_VERSION</tt> - The patch release number, currently
	0.

	<li><tt>FL_VERSION</tt> - A combined floating-point version
	number for the major and minor release numbers, currently 1.0.

</ul>

<H2>Events</H2>

Events are identified by an <tt>Fl_Event</tt> enumeration value.  The
following events are currently defined:

<ul>

	<li><tt>FL_NO_EVENT</tt> - No event occurred.

	<li><tt>FL_PUSH</tt> - A mouse button was pushed.

	<li><tt>FL_RELEASE</tt> - A mouse button was released.

	<li><tt>FL_ENTER</tt> - The mouse pointer entered a widget.

	<li><tt>FL_LEAVE</tt> - The mouse pointer left a widget.

	<li><tt>FL_DRAG</tt> - The mouse pointer was moved with a button
	pressed.

	<li><tt>FL_FOCUS</tt> - A widget should receive keyboard focus.

	<li><tt>FL_UNFOCUS</tt> - A widget loses keyboard focus.

	<li><tt>FL_KEYBOARD</tt> - A key was pressed.

	<li><tt>FL_CLOSE</tt> - A window was closed.

	<li><tt>FL_MOVE</tt> - The mouse pointer was moved with no buttons
	pressed.

	<li><tt>FL_SHORTCUT</tt> - The user pressed a shortcut key.

	<li><tt>FL_DEACTIVATE</tt> - The widget has been deactivated.

	<li><tt>FL_ACTIVATE</tt> - The widget has been activated.

	<li><tt>FL_HIDE</tt> - The widget has been hidden.

	<li><tt>FL_SHOW</tt> - The widget has been shown.

	<li><tt>FL_PASTE</tt> - The widget should paste the contents of the
	clipboard.

	<li><tt>FL_SELECTIONCLEAR</tt> - The widget should clear any selections
	made for the clipboard.

</ul>

<H2>Callback "When" Conditions</H2>

The following constants determine when a callback is performed:

<ul>

	<li><tt>FL_WHEN_NEVER</tt> - Never call the callback.

	<li><tt>FL_WHEN_CHANGED</tt> - Do the callback only when the
	widget value changes.

	<li><tt>FL_WHEN_NOT_CHANGED</tt> - Do the callback whenever the
	user interacts with the widget.

	<li><tt>FL_WHEN_RELEASE</tt> - Do the callback when the button or
	key is released and the value changes.

	<li><tt>FL_WHEN_ENTER_KEY</tt> - Do the callback when the user presses
	the ENTER key and the value changes.

	<li><tt>FL_WHEN_RELEASE_ALWAYS</tt> - Do the callback when the button
	or key is released, even if the value doesn't change.

	<li><tt>FL_WHEN_ENTER_KEY_ALWAYS</tt> - Do the callback when the user
	presses the ENTER key, even if the value doesn't change.

</ul>

<H2>Fl::event_key() Values</H2>

The following constants define the non-ASCII keys on the keyboard for
<tt>FL_KEYBOARD</tt> and <tt>FL_SHORTCUT</tt> events:

<ul>

	<li><tt>FL_Button</tt> - A mouse button; use <tt>Fl_Button +
	n</tt> for mouse button <tt>n</tt>.

	<li><tt>FL_BackSpace</tt> - The backspace key.

	<li><tt>FL_Tab</tt> - The tab key.

	<li><tt>FL_Enter</tt> - The enter key.

	<li><tt>FL_Pause</tt> - The pause key.

	<li><tt>FL_Scroll_Lock</tt> - The scroll lock key.

	<li><tt>FL_Escape</tt> - The escape key.

	<li><tt>FL_Home</tt> - The home key.

	<li><tt>FL_Left</tt> - The left arrow key.

	<li><tt>FL_Up</tt> - The up arrow key.

	<li><tt>FL_Right</tt> - The right arrow key.

	<li><tt>FL_Down</tt> - The down arrow key.

	<li><tt>FL_Page_Up</tt> - The page-up key.

	<li><tt>FL_Page_Down</tt> - The page-down key.

	<li><tt>FL_End</tt> - The end key.

	<li><tt>FL_Print</tt> - The print (or print-screen) key.

	<li><tt>FL_Insert</tt> - The insert key.

	<li><tt>FL_Menu</tt> - The menu key.

	<li><tt>FL_Num_Lock</tt> - The num lock key.

	<li><tt>FL_KP</tt> - One of the keypad numbers; use <tt>FL_KP +
	n</tt> for number <tt>n</tt>.

	<li><tt>FL_KP_Enter</tt> - The enter key on the keypad.

	<li><tt>FL_F</tt> - One of the function keys; use <tt>FL_F +
	n</tt> for function key <tt>n</tt>.

	<li><tt>FL_Shift_L</tt> - The lefthand shift key.

	<li><tt>FL_Shift_R</tt> - The righthand shift key.

	<li><tt>FL_Control_L</tt> - The lefthand control key.

	<li><tt>FL_Control_R</tt> - The righthand control key.

	<li><tt>FL_Caps_Lock</tt> - The caps lock key.

	<li><tt>FL_Meta_L</tt> - The left meta/Windows key.

	<li><tt>FL_Meta_R</tt> - The right meta/Windows key.

	<li><tt>FL_Alt_L</tt> - The left alt key.

	<li><tt>FL_Alt_R</tt> - The right alt key.

	<li><tt>FL_Delete</tt> - The delete key.

</ul>

<H2>Fl::event_state() Values</H2>

The following constants define bits in the <tt>Fl::event_state()</tt>
value:

<ul>

	<li><tt>FL_SHIFT</tt> - One of the shift keys is down.

	<li><tt>FL_CAPS_LOCK</tt> - The caps lock is on.

	<li><tt>FL_CTRL</tt> - One of the ctrl keys is down.

	<li><tt>FL_ALT</tt> - One of the alt keys is down.

	<li><tt>FL_NUM_LOCK</tt> - The num lock is on.

	<li><tt>FL_META</tt> - One of the meta/Windows keys is down.

	<li><tt>FL_SCROLL_LOCK</tt> - The scroll lock is on.

	<li><tt>FL_BUTTON1</tt> - Mouse button 1 is pushed.

	<li><tt>FL_BUTTON2</tt> - Mouse button 2 is pushed.

	<li><tt>FL_BUTTON3</tt> - Mouse button 3 is pushed.

</ul>

<H2>Alignment Values</H2>

The following constants define bits that can be used with <a
href="#Fl_Widget.align"><tt>Fl_Widget::align()</tt></a> to control the
positioning of the label:

<ul>

	<li><tt>FL_ALIGN_CENTER</tt> - The label is centered.

	<li><tt>FL_ALIGN_TOP</tt> - The label is top-aligned.

	<li><tt>FL_ALIGN_BOTTOM</tt> - The label is bottom-aligned.

	<li><tt>FL_ALIGN_LEFT</tt> - The label is left-aligned.

	<li><tt>FL_ALIGN_RIGHT</tt> - The label is right-aligned.

	<li><tt>FL_ALIGN_INSIDE</tt> - The label is put inside the widget.

	<li><tt>FL_ALIGN_CLIP</tt> - The label is clipped to the widget.

	<li><tt>FL_ALIGN_WRAP</tt> - The label text is wrapped as needed.

</ul>

<H2>Fonts</H2>

The following constants define the standard FLTK fonts:

</ul>

	<li><tt>FL_HELVETICA</tt> - Helvetica (or Arial) normal.

	<li><tt>FL_HELVETICA_BOLD</tt> - Helvetica (or Arial) bold.

	<li><tt>FL_HELVETICA_ITALIC</tt> - Helvetica (or Arial) oblique.

	<li><tt>FL_HELVETICA_BOLD_ITALIC</tt> - Helvetica (or Arial) bold-oblique.

	<li><tt>FL_COURIER</tt> - Courier normal.

	<li><tt>FL_COURIER_BOLD</tt> - Courier bold.

	<li><tt>FL_COURIER_ITALIC</tt> - Courier italic.

	<li><tt>FL_COURIER_BOLD_ITALIC</tt> - Courier bold-italic.

	<li><tt>FL_TIMES</tt> - Times roman.

	<li><tt>FL_TIMES_BOLD</tt> - Times bold.

	<li><tt>FL_TIMES_ITALIC</tt> - Times italic.

	<li><tt>FL_TIMES_BOLD_ITALIC</tt> - Times bold-italic.

	<li><tt>FL_SYMBOL</tt> - Standard symbol font.

	<li><tt>FL_SCREEN</tt> - Default monospaced screen font.

	<li><tt>FL_SCREEN_BOLD</tt> - Default monospaced bold screen font.

	<li><tt>FL_ZAPF_DINGBATS</tt> - Zapf-dingbats font.

</ul>

<H2>Colors</H2>

The following color constants can be used to access the colors in the FLTK
standard color palette:

<ul>

	<li><tt>FL_BLACK</tt>

	<li><tt>FL_RED</tt>

	<li><tt>FL_GREEN</tt>

	<li><tt>FL_YELLOW</tt>

	<li><tt>FL_BLUE</tt>

	<li><tt>FL_MAGENTA</tt>

	<li><tt>FL_CYAN</tt>

	<li><tt>FL_WHITE</tt>

	<li><tt>FL_GRAY0</tt>

	<li><tt>FL_DARK3</tt>

	<li><tt>FL_DARK2</tt>

	<li><tt>FL_DARK1</tt>

	<li><tt>FL_GRAY</tt>

	<li><tt>FL_LIGHT1</tt>

	<li><tt>FL_LIGHT2</tt>

	<li><tt>FL_LIGHT3</tt>

</ul>

<H2>Cursors</H2>

The following constants define the mouse cursors that are available in
FLTK:

<ul>
	<li><tt>FL_CURSOR_DEFAULT</tt> - the default cursor, usually an arrow
	<li><tt>FL_CURSOR_ARROW</tt> - an arrow pointer
	<li><tt>FL_CURSOR_CROSS</tt> - crosshair
	<li><tt>FL_CURSOR_WAIT</tt> - watch or hourglass
	<li><tt>FL_CURSOR_INSERT</tt> - I-beam
	<li><tt>FL_CURSOR_HAND</tt> - hand (uparrow on MSWindows)
	<li><tt>FL_CURSOR_HELP</tt> - question mark
	<li><tt>FL_CURSOR_MOVE</tt> - 4-pointed arrow
	<li><tt>FL_CURSOR_NS</tt> - up/down arrow
	<li><tt>FL_CURSOR_WE</tt> - left/right arrow
	<li><tt>FL_CURSOR_NWSE</tt> - diagonal arrow
	<li><tt>FL_CURSOR_NESW</tt> - diagonal arrow
	<li><tt>FL_CURSOR_NONE</tt> - invisible
</ul>

<H2>FD "When" Conditions</H2>

<ul>

	<li><tt>FL_READ</tt> - Call the callback when there is data to be
	read.

	<li><tt>FL_WRITE</tt> - Call the callback when data can be written
	without blocking.

	<li><tt>FL_EXCEPT</tt> - Call the callback if an exception occurs on
	the file.

</ul>

<H2>Damage Masks</H2>

The following damage mask bits are used by the standard FLTK widgets:

<ul>

	<li><tt>FL_DAMAGE_CHILD</tt> - A child needs to be redrawn.

	<li><tt>FL_DAMAGE_EXPOSE</tt> - The window was exposed.

	<li><tt>FL_DAMAGE_SCROLL</tt> - The <tt>Fl_Scroll</tt> widget was
	scrolled.

	<li><tt>FL_DAMAGE_OVERLAY</tt> - The overlay planes need to be redrawn.

	<li><tt>FL_DAMAGE_ALL</tt> - Everything needs to be redrawn.

</ul>

</BODY>
</HTML>