0
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2007 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 * Port to the D Programming language:
|
|
11 * Frank Benoit <benoit@tionex.de>
|
|
12 *******************************************************************************/
|
|
13 package dwt.DWT;
|
|
14
|
|
15
|
|
16 import dwt.internal.Compatibility;
|
|
17 import dwt.internal.Library;
|
|
18 import dwt.internal.Platform;
|
|
19 import dwt.DWTError;
|
|
20 import dwt.DWTException;
|
|
21
|
|
22 import tango.core.Exception;
|
|
23
|
|
24 /**
|
|
25 * This class provides access to a small number of DWT system-wide
|
|
26 * methods, and in addition defines the public constants provided
|
|
27 * by DWT.
|
|
28 * <p>
|
|
29 * By defining constants like UP and DOWN in a single class, DWT
|
|
30 * can share common names and concepts at the same time minimizing
|
|
31 * the number of classes, names and constants for the application
|
|
32 * programmer.
|
|
33 * </p><p>
|
|
34 * Note that some of the constants provided by this class represent
|
|
35 * optional, appearance related aspects of widgets which are available
|
|
36 * either only on some window systems, or for a differing set of
|
|
37 * widgets on each window system. These constants are marked
|
|
38 * as <em>HINT</em>s. The set of widgets which support a particular
|
|
39 * <em>HINT</em> may change from release to release, although we typically
|
|
40 * will not withdraw support for a <em>HINT</em> once it is made available.
|
|
41 * </p>
|
|
42 */
|
|
43
|
|
44 /* NOTE:
|
|
45 * Good javadoc coding style is to put the values of static const
|
|
46 * constants in the comments. This reinforces the fact that
|
|
47 * consumers are allowed to rely on the value (and they must
|
|
48 * since the values are compiled inline in their code). We
|
|
49 * can <em>not</em> change the values of these constants between
|
|
50 * releases.
|
|
51 */
|
|
52 public class DWT {
|
|
53
|
|
54 /* Widget Event Constants */
|
|
55
|
|
56 /**
|
|
57 * The null event type (value is 0).
|
|
58 *
|
|
59 * @since 3.0
|
|
60 */
|
|
61 public static const int None = 0;
|
|
62
|
|
63 /**
|
|
64 * The key down event type (value is 1).
|
|
65 *
|
|
66 * @see dwt.widgets.Widget#addListener
|
|
67 * @see dwt.widgets.Display#addFilter
|
|
68 * @see dwt.widgets.Event
|
|
69 *
|
|
70 * @see dwt.widgets.Control#addKeyListener
|
|
71 * @see dwt.widgets.Tracker#addKeyListener
|
|
72 * @see dwt.events.KeyListener#keyPressed
|
|
73 * @see dwt.events.KeyEvent
|
|
74 */
|
|
75 public static const int KeyDown = 1;
|
|
76
|
|
77 /**
|
|
78 * The key up event type (value is 2).
|
|
79 *
|
|
80 * @see dwt.widgets.Widget#addListener
|
|
81 * @see dwt.widgets.Display#addFilter
|
|
82 * @see dwt.widgets.Event
|
|
83 *
|
|
84 * @see dwt.widgets.Control#addKeyListener
|
|
85 * @see dwt.widgets.Tracker#addKeyListener
|
|
86 * @see dwt.events.KeyListener#keyReleased
|
|
87 * @see dwt.events.KeyEvent
|
|
88 */
|
|
89 public static const int KeyUp = 2;
|
|
90
|
|
91 /**
|
|
92 * The mouse down event type (value is 3).
|
|
93 *
|
|
94 * @see dwt.widgets.Widget#addListener
|
|
95 * @see dwt.widgets.Display#addFilter
|
|
96 * @see dwt.widgets.Event
|
|
97 *
|
|
98 * @see dwt.widgets.Control#addMouseListener
|
|
99 * @see dwt.events.MouseListener#mouseDown
|
|
100 * @see dwt.events.MouseEvent
|
|
101 */
|
|
102 public static const int MouseDown = 3;
|
|
103
|
|
104 /**
|
|
105 * The mouse up event type (value is 4).
|
|
106 *
|
|
107 * @see dwt.widgets.Widget#addListener
|
|
108 * @see dwt.widgets.Display#addFilter
|
|
109 * @see dwt.widgets.Event
|
|
110 *
|
|
111 * @see dwt.widgets.Control#addMouseListener
|
|
112 * @see dwt.events.MouseListener#mouseUp
|
|
113 * @see dwt.events.MouseEvent
|
|
114 */
|
|
115 public static const int MouseUp = 4;
|
|
116
|
|
117 /**
|
|
118 * The mouse move event type (value is 5).
|
|
119 *
|
|
120 * @see dwt.widgets.Widget#addListener
|
|
121 * @see dwt.widgets.Display#addFilter
|
|
122 * @see dwt.widgets.Event
|
|
123 *
|
|
124 * @see dwt.widgets.Control#addMouseMoveListener
|
|
125 * @see dwt.events.MouseMoveListener#mouseMove
|
|
126 * @see dwt.events.MouseEvent
|
|
127 */
|
|
128 public static const int MouseMove = 5;
|
|
129
|
|
130 /**
|
|
131 * The mouse enter event type (value is 6).
|
|
132 *
|
|
133 * @see dwt.widgets.Widget#addListener
|
|
134 * @see dwt.widgets.Display#addFilter
|
|
135 * @see dwt.widgets.Event
|
|
136 *
|
|
137 * @see dwt.widgets.Control#addMouseTrackListener
|
|
138 * @see dwt.events.MouseTrackListener#mouseEnter
|
|
139 * @see dwt.events.MouseEvent
|
|
140 */
|
|
141 public static const int MouseEnter = 6;
|
|
142
|
|
143 /**
|
|
144 * The mouse exit event type (value is 7).
|
|
145 *
|
|
146 * @see dwt.widgets.Widget#addListener
|
|
147 * @see dwt.widgets.Display#addFilter
|
|
148 * @see dwt.widgets.Event
|
|
149 *
|
|
150 * @see dwt.widgets.Control#addMouseTrackListener
|
|
151 * @see dwt.events.MouseTrackListener#mouseExit
|
|
152 * @see dwt.events.MouseEvent
|
|
153 */
|
|
154 public static const int MouseExit = 7;
|
|
155
|
|
156 /**
|
|
157 * The mouse double click event type (value is 8).
|
|
158 *
|
|
159 * @see dwt.widgets.Widget#addListener
|
|
160 * @see dwt.widgets.Display#addFilter
|
|
161 * @see dwt.widgets.Event
|
|
162 *
|
|
163 * @see dwt.widgets.Control#addMouseListener
|
|
164 * @see dwt.events.MouseListener#mouseDoubleClick
|
|
165 * @see dwt.events.MouseEvent
|
|
166 */
|
|
167 public static const int MouseDoubleClick = 8;
|
|
168
|
|
169 /**
|
|
170 * The paint event type (value is 9).
|
|
171 *
|
|
172 * @see dwt.widgets.Widget#addListener
|
|
173 * @see dwt.widgets.Display#addFilter
|
|
174 * @see dwt.widgets.Event
|
|
175 *
|
|
176 * @see dwt.widgets.Control#addPaintListener
|
|
177 * @see dwt.events.PaintListener#paintControl
|
|
178 * @see dwt.events.PaintEvent
|
|
179 */
|
|
180 public static const int Paint = 9;
|
|
181
|
|
182 /**
|
|
183 * The move event type (value is 10).
|
|
184 *
|
|
185 * @see dwt.widgets.Widget#addListener
|
|
186 * @see dwt.widgets.Display#addFilter
|
|
187 * @see dwt.widgets.Event
|
|
188 *
|
|
189 * @see dwt.widgets.Control#addControlListener
|
|
190 * @see dwt.widgets.TableColumn#addControlListener
|
|
191 * @see dwt.widgets.Tracker#addControlListener
|
|
192 * @see dwt.widgets.TreeColumn#addControlListener
|
|
193 * @see dwt.events.ControlListener#controlMoved
|
|
194 * @see dwt.events.ControlEvent
|
|
195 */
|
|
196 public static const int Move = 10;
|
|
197
|
|
198 /**
|
|
199 * The resize event type (value is 11).
|
|
200 *
|
|
201 * @see dwt.widgets.Widget#addListener
|
|
202 * @see dwt.widgets.Display#addFilter
|
|
203 * @see dwt.widgets.Event
|
|
204 *
|
|
205 * @see dwt.widgets.Control#addControlListener
|
|
206 * @see dwt.widgets.TableColumn#addControlListener
|
|
207 * @see dwt.widgets.Tracker#addControlListener
|
|
208 * @see dwt.widgets.TreeColumn#addControlListener
|
|
209 * @see dwt.events.ControlListener#controlResized
|
|
210 * @see dwt.events.ControlEvent
|
|
211 */
|
|
212 public static const int Resize = 11;
|
|
213
|
|
214 /**
|
|
215 * The dispose event type (value is 12).
|
|
216 *
|
|
217 * @see dwt.widgets.Widget#addListener
|
|
218 * @see dwt.widgets.Display#addListener
|
|
219 * @see dwt.widgets.Display#addFilter
|
|
220 * @see dwt.widgets.Event
|
|
221 *
|
|
222 * @see dwt.widgets.Widget#addDisposeListener
|
|
223 * @see dwt.events.DisposeListener#widgetDisposed
|
|
224 * @see dwt.events.DisposeEvent
|
|
225 */
|
|
226 public static const int Dispose = 12;
|
|
227
|
|
228 /**
|
|
229 * The selection event type (value is 13).
|
|
230 *
|
|
231 * @see dwt.widgets.Widget#addListener
|
|
232 * @see dwt.widgets.Display#addFilter
|
|
233 * @see dwt.widgets.Event
|
|
234 *
|
|
235 * @see dwt.widgets.Button#addSelectionListener
|
|
236 * @see dwt.widgets.Combo#addSelectionListener
|
|
237 * @see dwt.widgets.CoolItem#addSelectionListener
|
|
238 * @see dwt.widgets.Link#addSelectionListener
|
|
239 * @see dwt.widgets.List#addSelectionListener
|
|
240 * @see dwt.widgets.MenuItem#addSelectionListener
|
|
241 * @see dwt.widgets.Sash#addSelectionListener
|
|
242 * @see dwt.widgets.Scale#addSelectionListener
|
|
243 * @see dwt.widgets.ScrollBar#addSelectionListener
|
|
244 * @see dwt.widgets.Slider#addSelectionListener
|
|
245 * @see dwt.widgets.TabFolder#addSelectionListener
|
|
246 * @see dwt.widgets.Table#addSelectionListener
|
|
247 * @see dwt.widgets.TableColumn#addSelectionListener
|
|
248 * @see dwt.widgets.ToolItem#addSelectionListener
|
|
249 * @see dwt.widgets.TrayItem#addSelectionListener
|
|
250 * @see dwt.widgets.Tree#addSelectionListener
|
|
251 * @see dwt.widgets.TreeColumn#addSelectionListener
|
|
252 * @see dwt.events.SelectionListener#widgetSelected
|
|
253 * @see dwt.events.SelectionEvent
|
|
254 */
|
|
255 public static const int Selection = 13;
|
|
256
|
|
257 /**
|
|
258 * The default selection event type (value is 14).
|
|
259 *
|
|
260 * @see dwt.widgets.Widget#addListener
|
|
261 * @see dwt.widgets.Display#addFilter
|
|
262 * @see dwt.widgets.Event
|
|
263 *
|
|
264 * @see dwt.widgets.Combo#addSelectionListener
|
|
265 * @see dwt.widgets.List#addSelectionListener
|
|
266 * @see dwt.widgets.Spinner#addSelectionListener
|
|
267 * @see dwt.widgets.Table#addSelectionListener
|
|
268 * @see dwt.widgets.Text#addSelectionListener
|
|
269 * @see dwt.widgets.TrayItem#addSelectionListener
|
|
270 * @see dwt.widgets.Tree#addSelectionListener
|
|
271 * @see dwt.events.SelectionListener#widgetDefaultSelected
|
|
272 * @see dwt.events.SelectionEvent
|
|
273 */
|
|
274 public static const int DefaultSelection = 14;
|
|
275
|
|
276 /**
|
|
277 * The focus in event type (value is 15).
|
|
278 *
|
|
279 * @see dwt.widgets.Widget#addListener
|
|
280 * @see dwt.widgets.Display#addFilter
|
|
281 * @see dwt.widgets.Event
|
|
282 *
|
|
283 * @see dwt.widgets.Control#addFocusListener
|
|
284 * @see dwt.events.FocusListener#focusGained
|
|
285 * @see dwt.events.FocusEvent
|
|
286 */
|
|
287 public static const int FocusIn = 15;
|
|
288
|
|
289 /**
|
|
290 * The focus out event type (value is 16).
|
|
291 *
|
|
292 * @see dwt.widgets.Widget#addListener
|
|
293 * @see dwt.widgets.Display#addFilter
|
|
294 * @see dwt.widgets.Event
|
|
295 *
|
|
296 * @see dwt.widgets.Control#addFocusListener
|
|
297 * @see dwt.events.FocusListener#focusLost
|
|
298 * @see dwt.events.FocusEvent
|
|
299 */
|
|
300 public static const int FocusOut = 16;
|
|
301
|
|
302 /**
|
|
303 * The expand event type (value is 17).
|
|
304 *
|
|
305 * @see dwt.widgets.Widget#addListener
|
|
306 * @see dwt.widgets.Display#addFilter
|
|
307 * @see dwt.widgets.Event
|
|
308 *
|
|
309 * @see dwt.widgets.Tree#addTreeListener
|
|
310 * @see dwt.events.TreeListener#treeExpanded
|
|
311 * @see dwt.events.TreeEvent
|
|
312 */
|
|
313 public static const int Expand = 17;
|
|
314
|
|
315 /**
|
|
316 * The collapse event type (value is 18).
|
|
317 *
|
|
318 * @see dwt.widgets.Widget#addListener
|
|
319 * @see dwt.widgets.Display#addFilter
|
|
320 * @see dwt.widgets.Event
|
|
321 *
|
|
322 * @see dwt.widgets.Tree#addTreeListener
|
|
323 * @see dwt.events.TreeListener#treeCollapsed
|
|
324 * @see dwt.events.TreeEvent
|
|
325 */
|
|
326 public static const int Collapse = 18;
|
|
327
|
|
328 /**
|
|
329 * The iconify event type (value is 19).
|
|
330 *
|
|
331 * @see dwt.widgets.Widget#addListener
|
|
332 * @see dwt.widgets.Display#addFilter
|
|
333 * @see dwt.widgets.Event
|
|
334 *
|
|
335 * @see dwt.widgets.Shell#addShellListener
|
|
336 * @see dwt.events.ShellListener#shellIconified
|
|
337 * @see dwt.events.ShellEvent
|
|
338 */
|
|
339 public static const int Iconify = 19;
|
|
340
|
|
341 /**
|
|
342 * The de-iconify event type (value is 20).
|
|
343 *
|
|
344 * @see dwt.widgets.Widget#addListener
|
|
345 * @see dwt.widgets.Display#addFilter
|
|
346 * @see dwt.widgets.Event
|
|
347 *
|
|
348 * @see dwt.widgets.Shell#addShellListener
|
|
349 * @see dwt.events.ShellListener#shellDeiconified
|
|
350 * @see dwt.events.ShellEvent
|
|
351 */
|
|
352 public static const int Deiconify = 20;
|
|
353
|
|
354 /**
|
|
355 * The close event type (value is 21).
|
|
356 *
|
|
357 * @see dwt.widgets.Widget#addListener
|
|
358 * @see dwt.widgets.Display#addListener
|
|
359 * @see dwt.widgets.Display#addFilter
|
|
360 * @see dwt.widgets.Event
|
|
361 *
|
|
362 * @see dwt.widgets.Shell#addShellListener
|
|
363 * @see dwt.events.ShellListener#shellClosed
|
|
364 * @see dwt.events.ShellEvent
|
|
365 */
|
|
366 public static const int Close = 21;
|
|
367
|
|
368 /**
|
|
369 * The show event type (value is 22).
|
|
370 *
|
|
371 * @see dwt.widgets.Widget#addListener
|
|
372 * @see dwt.widgets.Display#addFilter
|
|
373 * @see dwt.widgets.Event
|
|
374 *
|
|
375 * @see dwt.widgets.Menu#addMenuListener
|
|
376 * @see dwt.events.MenuListener#menuShown
|
|
377 * @see dwt.events.MenuEvent
|
|
378 */
|
|
379 public static const int Show = 22;
|
|
380
|
|
381 /**
|
|
382 * The hide event type (value is 23).
|
|
383 *
|
|
384 * @see dwt.widgets.Widget#addListener
|
|
385 * @see dwt.widgets.Display#addFilter
|
|
386 * @see dwt.widgets.Event
|
|
387 *
|
|
388 * @see dwt.widgets.Menu#addMenuListener
|
|
389 * @see dwt.events.MenuListener#menuHidden
|
|
390 * @see dwt.events.MenuEvent
|
|
391 */
|
|
392 public static const int Hide = 23;
|
|
393
|
|
394 /**
|
|
395 * The modify event type (value is 24).
|
|
396 *
|
|
397 * @see dwt.widgets.Widget#addListener
|
|
398 * @see dwt.widgets.Display#addFilter
|
|
399 * @see dwt.widgets.Event
|
|
400 *
|
|
401 * @see dwt.widgets.Combo#addModifyListener
|
|
402 * @see dwt.widgets.Spinner#addModifyListener
|
|
403 * @see dwt.widgets.Text#addModifyListener
|
|
404 * @see dwt.events.ModifyListener#modifyText
|
|
405 * @see dwt.events.ModifyEvent
|
|
406 */
|
|
407 public static const int Modify = 24;
|
|
408
|
|
409 /**
|
|
410 * The verify event type (value is 25).
|
|
411 *
|
|
412 * @see dwt.widgets.Widget#addListener
|
|
413 * @see dwt.widgets.Display#addFilter
|
|
414 * @see dwt.widgets.Event
|
|
415 *
|
|
416 * @see dwt.widgets.Combo#addVerifyListener
|
|
417 * @see dwt.widgets.Text#addVerifyListener
|
|
418 * @see dwt.events.VerifyListener#verifyText
|
|
419 * @see dwt.events.VerifyEvent
|
|
420 */
|
|
421 public static const int Verify = 25;
|
|
422
|
|
423 /**
|
|
424 * The activate event type (value is 26).
|
|
425 *
|
|
426 * @see dwt.widgets.Widget#addListener
|
|
427 * @see dwt.widgets.Display#addFilter
|
|
428 * @see dwt.widgets.Event
|
|
429 *
|
|
430 * @see dwt.widgets.Shell#addShellListener
|
|
431 * @see dwt.events.ShellListener#shellActivated
|
|
432 * @see dwt.events.ShellEvent
|
|
433 */
|
|
434 public static const int Activate = 26;
|
|
435
|
|
436 /**
|
|
437 * The deactivate event type (value is 27).
|
|
438 *
|
|
439 * @see dwt.widgets.Widget#addListener
|
|
440 * @see dwt.widgets.Display#addFilter
|
|
441 * @see dwt.widgets.Event
|
|
442 *
|
|
443 * @see dwt.widgets.Shell#addShellListener
|
|
444 * @see dwt.events.ShellListener#shellDeactivated
|
|
445 * @see dwt.events.ShellEvent
|
|
446 */
|
|
447 public static const int Deactivate = 27;
|
|
448
|
|
449 /**
|
|
450 * The help event type (value is 28).
|
|
451 *
|
|
452 * @see dwt.widgets.Widget#addListener
|
|
453 * @see dwt.widgets.Display#addFilter
|
|
454 * @see dwt.widgets.Event
|
|
455 *
|
|
456 * @see dwt.widgets.Control#addHelpListener
|
|
457 * @see dwt.widgets.Menu#addHelpListener
|
|
458 * @see dwt.widgets.MenuItem#addHelpListener
|
|
459 * @see dwt.events.HelpListener#helpRequested
|
|
460 * @see dwt.events.HelpEvent
|
|
461 */
|
|
462 public static const int Help = 28;
|
|
463
|
|
464 /**
|
|
465 * The drag detect event type (value is 29).
|
|
466 *
|
|
467 * @see dwt.widgets.Widget#addListener
|
|
468 * @see dwt.widgets.Display#addFilter
|
|
469 * @see dwt.widgets.Event
|
|
470 *
|
|
471 * @see dwt.dnd.DragSource
|
|
472 */
|
|
473 public static const int DragDetect = 29;
|
|
474
|
|
475 /**
|
|
476 * The arm event type (value is 30).
|
|
477 *
|
|
478 * @see dwt.widgets.Widget#addListener
|
|
479 * @see dwt.widgets.Display#addFilter
|
|
480 * @see dwt.widgets.Event
|
|
481 *
|
|
482 * @see dwt.widgets.MenuItem#addArmListener
|
|
483 * @see dwt.events.ArmListener#widgetArmed
|
|
484 * @see dwt.events.ArmEvent
|
|
485 */
|
|
486 public static const int Arm = 30;
|
|
487
|
|
488 /**
|
|
489 * The traverse event type (value is 31).
|
|
490 *
|
|
491 * @see dwt.widgets.Widget#addListener
|
|
492 * @see dwt.widgets.Display#addFilter
|
|
493 * @see dwt.widgets.Event
|
|
494 *
|
|
495 * @see dwt.widgets.Control#addTraverseListener
|
|
496 * @see dwt.events.TraverseListener#keyTraversed
|
|
497 * @see dwt.events.TraverseEvent
|
|
498 */
|
|
499 public static const int Traverse = 31;
|
|
500
|
|
501 /**
|
|
502 * The mouse hover event type (value is 32).
|
|
503 *
|
|
504 * @see dwt.widgets.Widget#addListener
|
|
505 * @see dwt.widgets.Display#addFilter
|
|
506 * @see dwt.widgets.Event
|
|
507 *
|
|
508 * @see dwt.widgets.Control#addMouseTrackListener
|
|
509 * @see dwt.events.MouseTrackListener#mouseHover
|
|
510 * @see dwt.events.MouseEvent
|
|
511 */
|
|
512 public static const int MouseHover = 32;
|
|
513
|
|
514 /**
|
|
515 * The hardware key down event type (value is 33).
|
|
516 *
|
|
517 * @see dwt.widgets.Widget#addListener
|
|
518 * @see dwt.widgets.Display#addFilter
|
|
519 * @see dwt.widgets.Event
|
|
520 */
|
|
521 public static const int HardKeyDown = 33;
|
|
522
|
|
523 /**
|
|
524 * The hardware key up event type (value is 34).
|
|
525 *
|
|
526 * @see dwt.widgets.Widget#addListener
|
|
527 * @see dwt.widgets.Display#addFilter
|
|
528 * @see dwt.widgets.Event
|
|
529 */
|
|
530 public static const int HardKeyUp = 34;
|
|
531
|
|
532 /**
|
|
533 * The menu detect event type (value is 35).
|
|
534 *
|
|
535 * @see dwt.widgets.Widget#addListener
|
|
536 * @see dwt.widgets.Display#addFilter
|
|
537 * @see dwt.widgets.Event
|
|
538 *
|
|
539 * @since 3.0
|
|
540 */
|
|
541 public static const int MenuDetect = 35;
|
|
542
|
|
543 /**
|
|
544 * The set data event type (value is 36).
|
|
545 *
|
|
546 * @see dwt.widgets.Widget#addListener
|
|
547 * @see dwt.widgets.Display#addFilter
|
|
548 * @see dwt.widgets.Event
|
|
549 *
|
|
550 * @see dwt.widgets.Table
|
|
551 * @see dwt.widgets.Tree
|
|
552 *
|
|
553 * @since 3.0
|
|
554 */
|
|
555 public static const int SetData = 36;
|
|
556
|
|
557 /**
|
|
558 * The mouse wheel event type (value is 37).
|
|
559 *
|
|
560 * @see dwt.widgets.Widget#addListener
|
|
561 * @see dwt.widgets.Display#addFilter
|
|
562 * @see dwt.widgets.Event
|
|
563 *
|
|
564 * @since 3.1
|
|
565 */
|
|
566 public static const int MouseWheel = 37;
|
|
567
|
|
568 /**
|
|
569 * The settings changed event type (value is 39).
|
|
570 * <p>
|
|
571 * The settings changed event is sent when an operating system
|
|
572 * property, such as a system font or color, has been changed.
|
|
573 * The event occurs after the property has been changed, but
|
|
574 * before any widget is redrawn. Applications that cache operating
|
|
575 * system properties can use this event to update their caches.
|
|
576 * A specific property change can be detected by querying the
|
|
577 * new value of a property and comparing it with the equivalent
|
|
578 * cached value. The operating system automatically redraws and
|
|
579 * lays out all widgets after this event is sent.
|
|
580 * </p>
|
|
581 *
|
|
582 * @see dwt.widgets.Display#addListener
|
|
583 * @see dwt.widgets.Event
|
|
584 *
|
|
585 * @since 3.2
|
|
586 */
|
|
587 public static const int Settings = 39;
|
|
588
|
|
589 /**
|
|
590 * The erase item event type (value is 40).
|
|
591 *
|
|
592 * @see dwt.widgets.Widget#addListener
|
|
593 * @see dwt.widgets.Display#addFilter
|
|
594 * @see dwt.widgets.Event
|
|
595 *
|
|
596 * @since 3.2
|
|
597 */
|
|
598 public static const int EraseItem = 40;
|
|
599
|
|
600 /**
|
|
601 * The measure item event type (value is 41).
|
|
602 *
|
|
603 * @see dwt.widgets.Widget#addListener
|
|
604 * @see dwt.widgets.Display#addFilter
|
|
605 * @see dwt.widgets.Event
|
|
606 *
|
|
607 * @since 3.2
|
|
608 */
|
|
609 public static const int MeasureItem = 41;
|
|
610
|
|
611 /**
|
|
612 * The paint item event type (value is 42).
|
|
613 *
|
|
614 * @see dwt.widgets.Widget#addListener
|
|
615 * @see dwt.widgets.Display#addFilter
|
|
616 * @see dwt.widgets.Event
|
|
617 *
|
|
618 * @since 3.2
|
|
619 */
|
|
620 public static const int PaintItem = 42;
|
|
621
|
|
622 /* Event Details */
|
|
623
|
|
624 /**
|
|
625 * Indicates that a user-interface component is being dragged,
|
|
626 * for example dragging the thumb of a scroll bar (value is 1).
|
|
627 */
|
|
628 public static const int DRAG = 1;
|
|
629
|
|
630 /**
|
|
631 * Event detail field that indicates a user-interface component
|
|
632 * state is selected (value is 1<<1).
|
|
633 *
|
|
634 * @since 3.2
|
|
635 */
|
|
636 public static const int SELECTED = 1 << 1;
|
|
637
|
|
638 /**
|
|
639 * Event detail field that indicates a user-interface component
|
|
640 * state is focused (value is 1<<2).
|
|
641 *
|
|
642 * @since 3.2
|
|
643 */
|
|
644 public static const int FOCUSED = 1 << 2;
|
|
645
|
|
646 /**
|
|
647 * Event detail field that indicates a user-interface component
|
|
648 * draws the background (value is 1<<3).
|
|
649 *
|
|
650 * @since 3.2
|
|
651 */
|
|
652 public static const int BACKGROUND = 1 << 3;
|
|
653
|
|
654 /**
|
|
655 * Event detail field that indicates a user-interface component
|
|
656 * draws the foreground (value is 1<<4).
|
|
657 *
|
|
658 * @since 3.2
|
|
659 */
|
|
660 public static const int FOREGROUND = 1 << 4;
|
|
661
|
|
662 /**
|
|
663 * Event detail field that indicates a user-interface component
|
|
664 * state is hot (value is 1<<5).
|
|
665 *
|
|
666 * @since 3.3
|
|
667 */
|
|
668 public static const int HOT = 1 << 5;
|
|
669
|
|
670 /* This code is intentionally commented */
|
|
671 //public static const int PRESSED = 1 << 3;
|
|
672 //public static const int ACTIVE = 1 << 4;
|
|
673 //public static const int DISABLED = 1 << 5;
|
|
674 //public static const int HOT = 1 << 6;
|
|
675 //public static const int DEFAULTED = 1 << 7;
|
|
676
|
|
677 /**
|
|
678 * Traversal event detail field value indicating that no
|
|
679 * traversal action should be taken
|
|
680 * (value is 0).
|
|
681 */
|
|
682 public static const int TRAVERSE_NONE = 0;
|
|
683
|
|
684 /**
|
|
685 * Traversal event detail field value indicating that the
|
|
686 * key which designates that a dialog should be cancelled was
|
|
687 * pressed; typically, this is the ESC key
|
|
688 * (value is 1<<1).
|
|
689 */
|
|
690 public static const int TRAVERSE_ESCAPE = 1 << 1;
|
|
691
|
|
692 /**
|
|
693 * Traversal event detail field value indicating that the
|
|
694 * key which activates the default button in a dialog was
|
|
695 * pressed; typically, this is the ENTER key
|
|
696 * (value is 1<<2).
|
|
697 */
|
|
698 public static const int TRAVERSE_RETURN = 1 << 2;
|
|
699
|
|
700 /**
|
|
701 * Traversal event detail field value indicating that the
|
|
702 * key which designates that focus should be given to the
|
|
703 * previous tab group was pressed; typically, this is the
|
|
704 * SHIFT-TAB key sequence
|
|
705 * (value is 1<<3).
|
|
706 */
|
|
707 public static const int TRAVERSE_TAB_PREVIOUS = 1 << 3;
|
|
708
|
|
709 /**
|
|
710 * Traversal event detail field value indicating that the
|
|
711 * key which designates that focus should be given to the
|
|
712 * next tab group was pressed; typically, this is the
|
|
713 * TAB key
|
|
714 * (value is 1<<4).
|
|
715 */
|
|
716 public static const int TRAVERSE_TAB_NEXT = 1 << 4;
|
|
717
|
|
718 /**
|
|
719 * Traversal event detail field value indicating that the
|
|
720 * key which designates that focus should be given to the
|
|
721 * previous tab item was pressed; typically, this is either
|
|
722 * the LEFT-ARROW or UP-ARROW keys
|
|
723 * (value is 1<<5).
|
|
724 */
|
|
725 public static const int TRAVERSE_ARROW_PREVIOUS = 1 << 5;
|
|
726
|
|
727 /**
|
|
728 * Traversal event detail field value indicating that the
|
|
729 * key which designates that focus should be given to the
|
|
730 * previous tab item was pressed; typically, this is either
|
|
731 * the RIGHT-ARROW or DOWN-ARROW keys
|
|
732 * (value is 1<<6).
|
|
733 */
|
|
734 public static const int TRAVERSE_ARROW_NEXT = 1 << 6;
|
|
735
|
|
736 /**
|
|
737 * Traversal event detail field value indicating that a
|
|
738 * mnemonic key sequence was pressed
|
|
739 * (value is 1<<7).
|
|
740 */
|
|
741 public static const int TRAVERSE_MNEMONIC = 1 << 7;
|
|
742
|
|
743 /**
|
|
744 * Traversal event detail field value indicating that the
|
|
745 * key which designates that the previous page of a multi-page
|
|
746 * window should be shown was pressed; typically, this
|
|
747 * is the CTRL-PAGEUP key sequence
|
|
748 * (value is 1<<8).
|
|
749 */
|
|
750 public static const int TRAVERSE_PAGE_PREVIOUS = 1 << 8;
|
|
751
|
|
752 /**
|
|
753 * Traversal event detail field value indicating that the
|
|
754 * key which designates that the next page of a multi-page
|
|
755 * window should be shown was pressed; typically, this
|
|
756 * is the CTRL-PAGEDOWN key sequence
|
|
757 * (value is 1<<9).
|
|
758 */
|
|
759 public static const int TRAVERSE_PAGE_NEXT = 1 << 9;
|
|
760
|
|
761 /**
|
|
762 * A constant known to be zero (0), typically used in operations
|
|
763 * which take bit flags to indicate that "no bits are set".
|
|
764 */
|
|
765 public static const int NONE = 0;
|
|
766
|
|
767 /**
|
|
768 * A constant known to be zero (0), used in operations which
|
|
769 * take pointers to indicate a null argument.
|
|
770 */
|
|
771 public static const int NULL = 0;
|
|
772
|
|
773 /**
|
|
774 * Indicates that a default should be used (value is -1).
|
|
775 */
|
|
776 public static const int DEFAULT = -1;
|
|
777
|
|
778 /**
|
|
779 * Indicates that a property is off (value is 0).
|
|
780 *
|
|
781 * @since 3.1
|
|
782 */
|
|
783 public static const int OFF = 0;
|
|
784
|
|
785 /**
|
|
786 * Indicates that a property is on (value is 1).
|
|
787 *
|
|
788 * @since 3.1
|
|
789 */
|
|
790 public static const int ON = 1;
|
|
791
|
|
792 /**
|
|
793 * Indicates low quality (value is 1).
|
|
794 *
|
|
795 * @since 3.1
|
|
796 */
|
|
797 public static const int LOW = 1;
|
|
798
|
|
799 /**
|
|
800 * Indicates high quality (value is 2).
|
|
801 *
|
|
802 * @since 3.1
|
|
803 */
|
|
804 public static const int HIGH = 2;
|
|
805
|
|
806 /**
|
|
807 * Style constant for menu bar behavior (value is 1<<1).
|
|
808 * <p><b>Used By:</b><ul>
|
|
809 * <li><code>Menu</code></li>
|
|
810 * </ul></p>
|
|
811 */
|
|
812 public static const int BAR = 1 << 1;
|
|
813
|
|
814 /**
|
|
815 * Style constant for drop down menu/list behavior (value is 1<<2).
|
|
816 * <p><b>Used By:</b><ul>
|
|
817 * <li><code>Menu</code></li>
|
|
818 * <li><code>ToolItem</code></li>
|
|
819 * <li><code>CoolItem</code></li>
|
|
820 * <li><code>Combo</code></li>
|
|
821 * </ul></p>
|
|
822 */
|
|
823 public static const int DROP_DOWN = 1 << 2;
|
|
824
|
|
825 /**
|
|
826 * Style constant for pop up menu behavior (value is 1<<3).
|
|
827 * <p><b>Used By:</b><ul>
|
|
828 * <li><code>Menu</code></li>
|
|
829 * </ul></p>
|
|
830 */
|
|
831 public static const int POP_UP = 1 << 3;
|
|
832
|
|
833 /**
|
|
834 * Style constant for line separator behavior (value is 1<<1).
|
|
835 * <p><b>Used By:</b><ul>
|
|
836 * <li><code>Label</code></li>
|
|
837 * <li><code>MenuItem</code></li>
|
|
838 * <li><code>ToolItem</code></li>
|
|
839 * </ul></p>
|
|
840 */
|
|
841 public static const int SEPARATOR = 1 << 1;
|
|
842
|
|
843 /**
|
|
844 * Style constant for toggle button behavior (value is 1<<1).
|
|
845 * <p><b>Used By:</b><ul>
|
|
846 * <li><code>Button</code></li>
|
|
847 * </ul></p>
|
|
848 */
|
|
849 public static const int TOGGLE = 1 << 1;
|
|
850
|
|
851 /**
|
|
852 * Style constant for arrow button behavior (value is 1<<2).
|
|
853 * <p><b>Used By:</b><ul>
|
|
854 * <li><code>Button</code></li>
|
|
855 * </ul></p>
|
|
856 */
|
|
857 public static const int ARROW = 1 << 2;
|
|
858
|
|
859 /**
|
|
860 * Style constant for push button behavior (value is 1<<3).
|
|
861 * <p><b>Used By:</b><ul>
|
|
862 * <li><code>Button</code></li>
|
|
863 * <li><code>MenuItem</code></li>
|
|
864 * <li><code>ToolItem</code></li>
|
|
865 * </ul></p>
|
|
866 */
|
|
867 public static const int PUSH = 1 << 3;
|
|
868
|
|
869 /**
|
|
870 * Style constant for radio button behavior (value is 1<<4).
|
|
871 * <p><b>Used By:</b><ul>
|
|
872 * <li><code>Button</code></li>
|
|
873 * <li><code>MenuItem</code></li>
|
|
874 * <li><code>ToolItem</code></li>
|
|
875 * </ul></p>
|
|
876 */
|
|
877 public static const int RADIO = 1 << 4;
|
|
878
|
|
879 /**
|
|
880 * Style constant for check box behavior (value is 1<<5).
|
|
881 * <p><b>Used By:</b><ul>
|
|
882 * <li><code>Button</code></li>
|
|
883 * <li><code>MenuItem</code></li>
|
|
884 * <li><code>ToolItem</code></li>
|
|
885 * <li><code>Table</code></li>
|
|
886 * <li><code>Tree</code></li>
|
|
887 * </ul></p>
|
|
888 */
|
|
889 public static const int CHECK = 1 << 5;
|
|
890
|
|
891 /**
|
|
892 * Style constant for cascade behavior (value is 1<<6).
|
|
893 * <p><b>Used By:</b><ul>
|
|
894 * <li><code>MenuItem</code></li>
|
|
895 * </ul></p>
|
|
896 */
|
|
897 public static const int CASCADE = 1 << 6;
|
|
898
|
|
899 /**
|
|
900 * Style constant for multi-selection behavior in lists
|
|
901 * and multiple line support on text fields (value is 1<<1).
|
|
902 * <p><b>Used By:</b><ul>
|
|
903 * <li><code>Text</code></li>
|
|
904 * <li><code>List</code></li>
|
|
905 * <li><code>FileDialog</code></li>
|
|
906 * </ul></p>
|
|
907 */
|
|
908 public static const int MULTI = 1 << 1;
|
|
909
|
|
910 /**
|
|
911 * Style constant for single selection behavior in lists
|
|
912 * and single line support on text fields (value is 1<<2).
|
|
913 * <p><b>Used By:</b><ul>
|
|
914 * <li><code>Text</code></li>
|
|
915 * <li><code>List</code></li>
|
|
916 * <li><code>Table</code></li>
|
|
917 * <li><code>Tree</code></li>
|
|
918 * </ul></p>
|
|
919 */
|
|
920 public static const int SINGLE = 1 << 2;
|
|
921
|
|
922 /**
|
|
923 * Style constant for read-only behavior (value is 1<<3).
|
|
924 * <p><b>Used By:</b><ul>
|
|
925 * <li><code>Combo</code></li>
|
|
926 * <li><code>Text</code></li>
|
|
927 * </ul></p>
|
|
928 */
|
|
929 public static const int READ_ONLY = 1 << 3;
|
|
930
|
|
931 /**
|
|
932 * Style constant for automatic line wrap behavior (value is 1<<6).
|
|
933 * <p><b>Used By:</b><ul>
|
|
934 * <li><code>Label</code></li>
|
|
935 * <li><code>Text</code></li>
|
|
936 * <li><code>ToolBar</code></li>
|
|
937 * <li><code>Spinner</code></li>
|
|
938 * </ul></p>
|
|
939 */
|
|
940 public static const int WRAP = 1 << 6;
|
|
941
|
|
942 /**
|
|
943 * Style constant for search behavior (value is 1<<7).
|
|
944 * <p><b>Used By:</b><ul>
|
|
945 * <li><code>Text</code></li>
|
|
946 * </ul></p>
|
|
947 *
|
|
948 * @since 3.3
|
|
949 */
|
|
950 public static const int SEARCH = 1 << 7;
|
|
951
|
|
952 /**
|
|
953 * Style constant for simple (not drop down) behavior (value is 1<<6).
|
|
954 * <p><b>Used By:</b><ul>
|
|
955 * <li><code>Combo</code></li>
|
|
956 * </ul></p>
|
|
957 */
|
|
958 public static const int SIMPLE = 1 << 6;
|
|
959
|
|
960 /**
|
|
961 * Style constant for password behavior (value is 1<<22).
|
|
962 * <p><b>Used By:</b><ul>
|
|
963 * <li><code>Text</code></li>
|
|
964 * </ul></p>
|
|
965 *
|
|
966 * @since 3.0
|
|
967 */
|
|
968 public static const int PASSWORD = 1 << 22;
|
|
969
|
|
970 /**
|
|
971 * Style constant for shadow in behavior (value is 1<<2).
|
|
972 * <br>Note that this is a <em>HINT</em>.
|
|
973 * <p><b>Used By:</b><ul>
|
|
974 * <li><code>Label</code></li>
|
|
975 * <li><code>Group</code></li>
|
|
976 * </ul></p>
|
|
977 */
|
|
978 public static const int SHADOW_IN = 1 << 2;
|
|
979
|
|
980 /**
|
|
981 * Style constant for shadow out behavior (value is 1<<3).
|
|
982 * <br>Note that this is a <em>HINT</em>.
|
|
983 * <p><b>Used By:</b><ul>
|
|
984 * <li><code>Label</code></li>
|
|
985 * <li><code>Group</code></li>
|
|
986 * <li><code>ToolBar</code></li>
|
|
987 * </ul></p>
|
|
988 */
|
|
989 public static const int SHADOW_OUT = 1 << 3;
|
|
990
|
|
991 /**
|
|
992 * Style constant for shadow etched in behavior (value is 1<<4).
|
|
993 * <br>Note that this is a <em>HINT</em>. It is ignored on all platforms except Motif.
|
|
994 * <p><b>Used By:</b><ul>
|
|
995 * <li><code>Group</code></li>
|
|
996 * </ul></p>
|
|
997 */
|
|
998 public static const int SHADOW_ETCHED_IN = 1 << 4;
|
|
999
|
|
1000 /**
|
|
1001 * Style constant for shadow etched out behavior (value is 1<<6).
|
|
1002 * <br>Note that this is a <em>HINT</em>. It is ignored on all platforms except Motif.
|
|
1003 * <p><b>Used By:</b><ul>
|
|
1004 * <li><code>Group</code></li>
|
|
1005 * </ul></p>
|
|
1006 */
|
|
1007 public static const int SHADOW_ETCHED_OUT = 1 << 6;
|
|
1008
|
|
1009 /**
|
|
1010 * Style constant for no shadow behavior (value is 1<<5).
|
|
1011 * <br>Note that this is a <em>HINT</em>.
|
|
1012 * <p><b>Used By:</b><ul>
|
|
1013 * <li><code>Label</code></li>
|
|
1014 * <li><code>Group</code></li>
|
|
1015 * </ul></p>
|
|
1016 */
|
|
1017 public static const int SHADOW_NONE = 1 << 5;
|
|
1018
|
|
1019 /**
|
|
1020 * Style constant for progress bar behavior (value is 1<<1).
|
|
1021 * <p><b>Used By:</b><ul>
|
|
1022 * <li><code>ProgressBar</code></li>
|
|
1023 * </ul></p>
|
|
1024 */
|
|
1025 public static const int INDETERMINATE = 1 << 1;
|
|
1026
|
|
1027 /**
|
|
1028 * Style constant for tool window behavior (value is 1<<2).
|
|
1029 * <p>
|
|
1030 * A tool window is a window intended to be used as a floating toolbar.
|
|
1031 * It typically has a title bar that is shorter than a normal title bar,
|
|
1032 * and the window title is typically drawn using a smaller font.
|
|
1033 * <br>Note that this is a <em>HINT</em>.
|
|
1034 * </p><p><b>Used By:</b><ul>
|
|
1035 * <li><code>Decorations</code> and subclasses</li>
|
|
1036 * </ul></p>
|
|
1037 */
|
|
1038 public static const int TOOL = 1 << 2;
|
|
1039
|
|
1040 /**
|
|
1041 * Style constant to ensure no trimmings are used (value is 1<<3).
|
|
1042 * <br>Note that this overrides all other trim styles.
|
|
1043 * <p><b>Used By:</b><ul>
|
|
1044 * <li><code>Decorations</code> and subclasses</li>
|
|
1045 * </ul></p>
|
|
1046 */
|
|
1047 public static const int NO_TRIM = 1 << 3;
|
|
1048
|
|
1049 /**
|
|
1050 * Style constant for resize box trim (value is 1<<4).
|
|
1051 * <p><b>Used By:</b><ul>
|
|
1052 * <li><code>Decorations</code> and subclasses</li>
|
|
1053 * <li><code>Tracker</code></li>
|
|
1054 * </ul></p>
|
|
1055 */
|
|
1056 public static const int RESIZE = 1 << 4;
|
|
1057
|
|
1058 /**
|
|
1059 * Style constant for title area trim (value is 1<<5).
|
|
1060 * <p><b>Used By:</b><ul>
|
|
1061 * <li><code>Decorations</code> and subclasses</li>
|
|
1062 * </ul></p>
|
|
1063 */
|
|
1064 public static const int TITLE = 1 << 5;
|
|
1065
|
|
1066 /**
|
|
1067 * Style constant for close box trim (value is 1<<6,
|
|
1068 * since we do not distinguish between CLOSE style and MENU style).
|
|
1069 * <p><b>Used By:</b><ul>
|
|
1070 * <li><code>Decorations</code> and subclasses</li>
|
|
1071 * </ul></p>
|
|
1072 */
|
|
1073 public static const int CLOSE = 1 << 6;
|
|
1074
|
|
1075 /**
|
|
1076 * Style constant for shell menu trim (value is 1<<6,
|
|
1077 * since we do not distinguish between CLOSE style and MENU style).
|
|
1078 * <p><b>Used By:</b><ul>
|
|
1079 * <li><code>Decorations</code> and subclasses</li>
|
|
1080 * </ul></p>
|
|
1081 */
|
|
1082 public static const int MENU = CLOSE;
|
|
1083
|
|
1084 /**
|
|
1085 * Style constant for minimize box trim (value is 1<<7).
|
|
1086 * <p><b>Used By:</b><ul>
|
|
1087 * <li><code>Decorations</code> and subclasses</li>
|
|
1088 * </ul></p>
|
|
1089 */
|
|
1090 public static const int MIN = 1 << 7;
|
|
1091
|
|
1092 /**
|
|
1093 * Style constant for maximize box trim (value is 1<<10).
|
|
1094 * <p><b>Used By:</b><ul>
|
|
1095 * <li><code>Decorations</code> and subclasses</li>
|
|
1096 * </ul></p>
|
|
1097 */
|
|
1098 public static const int MAX = 1 << 10;
|
|
1099
|
|
1100 /**
|
|
1101 * Style constant for horizontal scrollbar behavior (value is 1<<8).
|
|
1102 * <p><b>Used By:</b><ul>
|
|
1103 * <li><code>Scrollable</code> and subclasses</li>
|
|
1104 * </ul></p>
|
|
1105 */
|
|
1106 public static const int H_SCROLL = 1 << 8;
|
|
1107
|
|
1108 /**
|
|
1109 * Style constant for vertical scrollbar behavior (value is 1<<9).
|
|
1110 * <p><b>Used By:</b><ul>
|
|
1111 * <li><code>Scrollable</code> and subclasses</li>
|
|
1112 * </ul></p>
|
|
1113 */
|
|
1114 public static const int V_SCROLL = 1 << 9;
|
|
1115
|
|
1116 /**
|
|
1117 * Style constant for bordered behavior (value is 1<<11).
|
|
1118 * <br>Note that this is a <em>HINT</em>.
|
|
1119 * <p><b>Used By:</b><ul>
|
|
1120 * <li><code>Control</code> and subclasses</li>
|
|
1121 * </ul></p>
|
|
1122 */
|
|
1123 public static const int BORDER = 1 << 11;
|
|
1124
|
|
1125 /**
|
|
1126 * Style constant indicating that the window manager should clip
|
|
1127 * a widget's children with respect to its viewable area. (value is 1<<12).
|
|
1128 * <br>Note that this is a <em>HINT</em>.
|
|
1129 * <p><b>Used By:</b><ul>
|
|
1130 * <li><code>Control</code> and subclasses</li>
|
|
1131 * </ul></p>
|
|
1132 */
|
|
1133 public static const int CLIP_CHILDREN = 1 << 12;
|
|
1134
|
|
1135 /**
|
|
1136 * Style constant indicating that the window manager should clip
|
|
1137 * a widget's siblings with respect to its viewable area. (value is 1<<13).
|
|
1138 * <br>Note that this is a <em>HINT</em>.
|
|
1139 * <p><b>Used By:</b><ul>
|
|
1140 * <li><code>Control</code> and subclasses</li>
|
|
1141 * </ul></p>
|
|
1142 */
|
|
1143 public static const int CLIP_SIBLINGS = 1 << 13;
|
|
1144
|
|
1145 /**
|
|
1146 * Style constant for always on top behavior (value is 1<<14).
|
|
1147 * <br>Note that this is a <em>HINT</em>.
|
|
1148 * <p><b>Used By:</b><ul>
|
|
1149 * <li><code>Shell</code> and subclasses</li>
|
|
1150 * </ul></p>
|
|
1151 */
|
|
1152 public static const int ON_TOP = 1 << 14;
|
|
1153
|
|
1154 /**
|
|
1155 * Trim style convenience constant for the most common top level shell appearance
|
|
1156 * (value is CLOSE|TITLE|MIN|MAX|RESIZE).
|
|
1157 * <p><b>Used By:</b><ul>
|
|
1158 * <li><code>Shell</code></li>
|
|
1159 * </ul></p>
|
|
1160 */
|
|
1161 public static const int SHELL_TRIM = CLOSE | TITLE | MIN | MAX | RESIZE;
|
|
1162
|
|
1163 /**
|
|
1164 * Trim style convenience constant for the most common dialog shell appearance
|
|
1165 * (value is CLOSE|TITLE|BORDER).
|
|
1166 * <p><b>Used By:</b><ul>
|
|
1167 * <li><code>Shell</code></li>
|
|
1168 * </ul></p>
|
|
1169 */
|
|
1170 public static const int DIALOG_TRIM = TITLE | CLOSE | BORDER;
|
|
1171
|
|
1172 /**
|
|
1173 * Style constant for modeless behavior (value is 0).
|
|
1174 * <br>Note that this is a <em>HINT</em>.
|
|
1175 * <p><b>Used By:</b><ul>
|
|
1176 * <li><code>Dialog</code></li>
|
|
1177 * <li><code>Shell</code></li>
|
|
1178 * </ul></p>
|
|
1179 */
|
|
1180 public static const int MODELESS = 0;
|
|
1181
|
|
1182 /**
|
|
1183 * Style constant for primary modal behavior (value is 1<<15).
|
|
1184 * <br>Note that this is a <em>HINT</em>.
|
|
1185 * <p><b>Used By:</b><ul>
|
|
1186 * <li><code>Dialog</code></li>
|
|
1187 * <li><code>Shell</code></li>
|
|
1188 * </ul></p>
|
|
1189 */
|
|
1190 public static const int PRIMARY_MODAL = 1 << 15;
|
|
1191
|
|
1192 /**
|
|
1193 * Style constant for application modal behavior (value is 1<<16).
|
|
1194 * <br>Note that this is a <em>HINT</em>.
|
|
1195 * <p><b>Used By:</b><ul>
|
|
1196 * <li><code>Dialog</code></li>
|
|
1197 * <li><code>Shell</code></li>
|
|
1198 * </ul></p>
|
|
1199 */
|
|
1200 public static const int APPLICATION_MODAL = 1 << 16;
|
|
1201
|
|
1202 /**
|
|
1203 * Style constant for system modal behavior (value is 1<<17).
|
|
1204 * <br>Note that this is a <em>HINT</em>.
|
|
1205 * <p><b>Used By:</b><ul>
|
|
1206 * <li><code>Dialog</code></li>
|
|
1207 * <li><code>Shell</code></li>
|
|
1208 * </ul></p>
|
|
1209 */
|
|
1210 public static const int SYSTEM_MODAL = 1 << 17;
|
|
1211
|
|
1212 /**
|
|
1213 * Style constant for selection hiding behavior when the widget loses focus (value is 1<<15).
|
|
1214 * <br>Note that this is a <em>HINT</em>.
|
|
1215 * <p><b>Used By:</b><ul>
|
|
1216 * <li><code>Table</code></li>
|
|
1217 * </ul></p>
|
|
1218 */
|
|
1219 public static const int HIDE_SELECTION = 1 << 15;
|
|
1220
|
|
1221 /**
|
|
1222 * Style constant for full row selection behavior and
|
|
1223 * selection constant indicating that a full line should be
|
|
1224 * drawn. (value is 1<<16).
|
|
1225 * <br>Note that for some widgets this is a <em>HINT</em>.
|
|
1226 * <p><b>Used By:</b><ul>
|
|
1227 * <li><code>Table</code></li>
|
|
1228 * <li><code>Tree</code></li>
|
|
1229 * <li><code>StyledText</code></li>
|
|
1230 * <li><code>TextLayout</code></li>
|
|
1231 * </ul></p>
|
|
1232 */
|
|
1233 public static const int FULL_SELECTION = 1 << 16;
|
|
1234
|
|
1235 /**
|
|
1236 * Style constant for flat appearance. (value is 1<<23).
|
|
1237 * <br>Note that this is a <em>HINT</em>.
|
|
1238 * <p><b>Used By:</b><ul>
|
|
1239 * <li><code>Button</code></li>
|
|
1240 * <li><code>ToolBar</code></li>
|
|
1241 * </ul></p>
|
|
1242 */
|
|
1243 public static const int FLAT = 1 << 23;
|
|
1244
|
|
1245 /**
|
|
1246 * Style constant for smooth appearance. (value is 1<<16).
|
|
1247 * <br>Note that this is a <em>HINT</em>.
|
|
1248 * <p><b>Used By:</b><ul>
|
|
1249 * <li><code>ProgressBar</code></li>
|
|
1250 * <li><code>Sash</code></li>
|
|
1251 * </ul></p>
|
|
1252 */
|
|
1253 public static const int SMOOTH = 1 << 16;
|
|
1254
|
|
1255 /**
|
|
1256 * Style constant for no background behavior (value is 1<<18).
|
|
1257 * <p>
|
|
1258 * By default, before a widget paints, the client area is filled with the current background.
|
|
1259 * When this style is specified, the background is not filled, and the application is responsible
|
|
1260 * for filling every pixel of the client area.
|
|
1261 * This style might be used as an alternative to "double-buffering" in order to reduce flicker.
|
|
1262 * This style does not mean "transparent" - widgets that are obscured will not draw through.
|
|
1263 * </p><p><b>Used By:</b><ul>
|
|
1264 * <li><code>Composite</code></li>
|
|
1265 * </ul></p>
|
|
1266 */
|
|
1267 public static const int NO_BACKGROUND = 1 << 18;
|
|
1268
|
|
1269 /**
|
|
1270 * Style constant for no focus from the mouse behavior (value is 1<<19).
|
|
1271 * <br>Note that this is a <em>HINT</em>.
|
|
1272 * <p><b>Used By:</b><ul>
|
|
1273 * <li><code>Composite</code></li>
|
|
1274 * </ul></p>
|
|
1275 */
|
|
1276 public static const int NO_FOCUS = 1 << 19;
|
|
1277
|
|
1278 /**
|
|
1279 * Style constant for no redraw on resize behavior (value is 1<<20).
|
|
1280 * <p>
|
|
1281 * This style stops the entire client area from being invalidated when the size
|
|
1282 * of the Canvas changes. Specifically, when the size of the Canvas gets smaller,
|
|
1283 * the DWT.Paint event is not sent. When it gets bigger, an DWT.Paint event is
|
|
1284 * sent with a GC clipped to only the new areas to be painted. Without this
|
|
1285 * style, the entire client area will be repainted.
|
|
1286 * </p><p><b>Used By:</b><ul>
|
|
1287 * <li><code>Composite</code></li>
|
|
1288 * </ul></p>
|
|
1289 */
|
|
1290 public static const int NO_REDRAW_RESIZE = 1 << 20;
|
|
1291
|
|
1292 /**
|
|
1293 * Style constant for no paint event merging behavior (value is 1<<21).
|
|
1294 * <p><b>Used By:</b><ul>
|
|
1295 * <li><code>Composite</code></li>
|
|
1296 * </ul></p>
|
|
1297 */
|
|
1298 public static const int NO_MERGE_PAINTS = 1 << 21;
|
|
1299
|
|
1300 /**
|
|
1301 * Style constant for preventing child radio group behavior (value is 1<<22).
|
|
1302 * <p><b>Used By:</b><ul>
|
|
1303 * <li><code>Composite</code></li>
|
|
1304 * </ul></p>
|
|
1305 */
|
|
1306 public static const int NO_RADIO_GROUP = 1 << 22;
|
|
1307
|
|
1308 /**
|
|
1309 * Style constant for left to right orientation (value is 1<<25).
|
|
1310 * <p>
|
|
1311 * When orientation is not explicitly specified, orientation is
|
|
1312 * inherited. This means that children will be assigned the
|
|
1313 * orientation of their parent. To override this behavior and
|
|
1314 * force an orientation for a child, explicitly set the orientation
|
|
1315 * of the child when that child is created.
|
|
1316 * <br>Note that this is a <em>HINT</em>.
|
|
1317 * </p>
|
|
1318 * <p><b>Used By:</b><ul>
|
|
1319 * <li><code>Control</code></li>
|
|
1320 * <li><code>Menu</code></li>
|
|
1321 * <li><code>GC</code></li>
|
|
1322 * </ul></p>
|
|
1323 *
|
|
1324 * @since 2.1.2
|
|
1325 */
|
|
1326 public static const int LEFT_TO_RIGHT = 1 << 25;
|
|
1327
|
|
1328 /**
|
|
1329 * Style constant for right to left orientation (value is 1<<26).
|
|
1330 * <p>
|
|
1331 * When orientation is not explicitly specified, orientation is
|
|
1332 * inherited. This means that children will be assigned the
|
|
1333 * orientation of their parent. To override this behavior and
|
|
1334 * force an orientation for a child, explicitly set the orientation
|
|
1335 * of the child when that child is created.
|
|
1336 * <br>Note that this is a <em>HINT</em>.
|
|
1337 * </p>
|
|
1338 * <p><b>Used By:</b><ul>
|
|
1339 * <li><code>Control</code></li>
|
|
1340 * <li><code>Menu</code></li>
|
|
1341 * <li><code>GC</code></li>
|
|
1342 * </ul></p>
|
|
1343 *
|
|
1344 * @since 2.1.2
|
|
1345 */
|
|
1346 public static const int RIGHT_TO_LEFT = 1 << 26;
|
|
1347
|
|
1348 /**
|
|
1349 * Style constant to indicate coordinate mirroring (value is 1<<27).
|
|
1350 * <p><b>Used By:</b><ul>
|
|
1351 * <li><code>Control</code></li>
|
|
1352 * <li><code>Menu</code></li>
|
|
1353 * </ul></p>
|
|
1354 *
|
|
1355 * @since 2.1.2
|
|
1356 */
|
|
1357 public static const int MIRRORED = 1 << 27;
|
|
1358
|
|
1359 /**
|
|
1360 * Style constant to allow embedding (value is 1<<24).
|
|
1361 * <p><b>Used By:</b><ul>
|
|
1362 * <li><code>Composite</code></li>
|
|
1363 * </ul></p>
|
|
1364 *
|
|
1365 * @since 3.0
|
|
1366 */
|
|
1367 public static const int EMBEDDED = 1 << 24;
|
|
1368
|
|
1369 /**
|
|
1370 * Style constant to allow virtual data (value is 1<<28).
|
|
1371 * <p><b>Used By:</b><ul>
|
|
1372 * <li><code>Table</code></li>
|
|
1373 * <li><code>Tree</code></li>
|
|
1374 * </ul></p>
|
|
1375 *
|
|
1376 * @since 3.0
|
|
1377 */
|
|
1378 public static const int VIRTUAL = 1 << 28;
|
|
1379
|
|
1380 /**
|
|
1381 * Style constant to indicate double buffering (value is 1<<29).
|
|
1382 * <p><b>Used By:</b><ul>
|
|
1383 * <li><code>Control</code></li>
|
|
1384 * </ul></p>
|
|
1385 *
|
|
1386 * @since 3.1
|
|
1387 */
|
|
1388 public static const int DOUBLE_BUFFERED = 1 << 29;
|
|
1389
|
|
1390 /**
|
|
1391 * Style constant for align up behavior (value is 1<<7,
|
|
1392 * since align UP and align TOP are considered the same).
|
|
1393 * <p><b>Used By:</b><ul>
|
|
1394 * <li><code>Button</code> with <code>ARROW</code> style</li>
|
|
1395 * <li><code>Tracker</code></li>
|
|
1396 * </ul></p>
|
|
1397 */
|
|
1398 public static const int UP = 1 << 7;
|
|
1399
|
|
1400 /**
|
|
1401 * Style constant for align top behavior (value is 1<<7,
|
|
1402 * since align UP and align TOP are considered the same).
|
|
1403 * <p><b>Used By:</b><ul>
|
|
1404 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
|
|
1405 * </ul></p>
|
|
1406 */
|
|
1407 public static const int TOP = UP;
|
|
1408
|
|
1409 /**
|
|
1410 * Style constant for align down behavior (value is 1<<10,
|
|
1411 * since align DOWN and align BOTTOM are considered the same).
|
|
1412 * <p><b>Used By:</b><ul>
|
|
1413 * <li><code>Button</code> with <code>ARROW</code> style</li>
|
|
1414 * <li><code>Tracker</code></li>
|
|
1415 * </ul></p>
|
|
1416 */
|
|
1417 public static const int DOWN = 1 << 10;
|
|
1418
|
|
1419 /**
|
|
1420 * Style constant for align bottom behavior (value is 1<<10,
|
|
1421 * since align DOWN and align BOTTOM are considered the same).
|
|
1422 * <p><b>Used By:</b><ul>
|
|
1423 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
|
|
1424 * </ul></p>
|
|
1425 */
|
|
1426 public static const int BOTTOM = DOWN;
|
|
1427
|
|
1428 /**
|
|
1429 * Style constant for leading alignment (value is 1<<14).
|
|
1430 * <p><b>Used By:</b><ul>
|
|
1431 * <li><code>Button</code></li>
|
|
1432 * <li><code>Label</code></li>
|
|
1433 * <li><code>TableColumn</code></li>
|
|
1434 * <li><code>Tracker</code></li>
|
|
1435 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
|
|
1436 * </ul></p>
|
|
1437 *
|
|
1438 * @since 2.1.2
|
|
1439 */
|
|
1440 public static const int LEAD = 1 << 14;
|
|
1441
|
|
1442 /**
|
|
1443 * Style constant for align left behavior (value is 1<<14).
|
|
1444 * This is a synonym for LEAD (value is 1<<14). Newer
|
|
1445 * applications should use LEAD instead of LEFT to make code more
|
|
1446 * understandable on right-to-left platforms.
|
|
1447 */
|
|
1448 public static const int LEFT = LEAD;
|
|
1449
|
|
1450 /**
|
|
1451 * Style constant for trailing alignment (value is 1<<17).
|
|
1452 * <p><b>Used By:</b><ul>
|
|
1453 * <li><code>Button</code></li>
|
|
1454 * <li><code>Label</code></li>
|
|
1455 * <li><code>TableColumn</code></li>
|
|
1456 * <li><code>Tracker</code></li>
|
|
1457 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
|
|
1458 * </ul></p>
|
|
1459 *
|
|
1460 * @since 2.1.2
|
|
1461 */
|
|
1462 public static const int TRAIL = 1 << 17;
|
|
1463
|
|
1464 /**
|
|
1465 * Style constant for align right behavior (value is 1<<17).
|
|
1466 * This is a synonym for TRAIL (value is 1<<17). Newer
|
|
1467 * applications should use TRAIL instead of RIGHT to make code more
|
|
1468 * understandable on right-to-left platforms.
|
|
1469 */
|
|
1470 public static const int RIGHT = TRAIL;
|
|
1471
|
|
1472 /**
|
|
1473 * Style constant for align center behavior (value is 1<<24).
|
|
1474 * <p><b>Used By:</b><ul>
|
|
1475 * <li><code>Button</code></li>
|
|
1476 * <li><code>Label</code></li>
|
|
1477 * <li><code>TableColumn</code></li>
|
|
1478 * <li><code>FormAttachment</code> in a <code>FormLayout</code></li>
|
|
1479 * </ul></p>
|
|
1480 */
|
|
1481 public static const int CENTER = 1 << 24;
|
|
1482
|
|
1483 /**
|
|
1484 * Style constant for horizontal alignment or orientation behavior (value is 1<<8).
|
|
1485 * <p><b>Used By:</b><ul>
|
|
1486 * <li><code>Label</code></li>
|
|
1487 * <li><code>ProgressBar</code></li>
|
|
1488 * <li><code>Sash</code></li>
|
|
1489 * <li><code>Scale</code></li>
|
|
1490 * <li><code>ScrollBar</code></li>
|
|
1491 * <li><code>Slider</code></li>
|
|
1492 * <li><code>ToolBar</code></li>
|
|
1493 * <li><code>FillLayout</code> type</li>
|
|
1494 * <li><code>RowLayout</code> type</li>
|
|
1495 * </ul></p>
|
|
1496 */
|
|
1497 public static const int HORIZONTAL = 1 << 8;
|
|
1498
|
|
1499 /**
|
|
1500 * Style constant for vertical alignment or orientation behavior (value is 1<<9).
|
|
1501 * <p><b>Used By:</b><ul>
|
|
1502 * <li><code>Label</code></li>
|
|
1503 * <li><code>ProgressBar</code></li>
|
|
1504 * <li><code>Sash</code></li>
|
|
1505 * <li><code>Scale</code></li>
|
|
1506 * <li><code>ScrollBar</code></li>
|
|
1507 * <li><code>Slider</code></li>
|
|
1508 * <li><code>ToolBar</code></li>
|
|
1509 * <li><code>CoolBar</code></li>
|
|
1510 * <li><code>FillLayout</code> type</li>
|
|
1511 * <li><code>RowLayout</code> type</li>
|
|
1512 * </ul></p>
|
|
1513 */
|
|
1514 public static const int VERTICAL = 1 << 9;
|
|
1515
|
|
1516 /**
|
|
1517 * Style constant for date display (value is 1<<5).
|
|
1518 * <p><b>Used By:</b><ul>
|
|
1519 * <li><code>DateTime</code></li>
|
|
1520 * </ul></p>
|
|
1521 *
|
|
1522 * @since 3.3
|
|
1523 */
|
|
1524 public static const int DATE = 1 << 5;
|
|
1525
|
|
1526 /**
|
|
1527 * Style constant for time display (value is 1<<7).
|
|
1528 * <p><b>Used By:</b><ul>
|
|
1529 * <li><code>DateTime</code></li>
|
|
1530 * </ul></p>
|
|
1531 *
|
|
1532 * @since 3.3
|
|
1533 */
|
|
1534 public static const int TIME = 1 << 7;
|
|
1535
|
|
1536 /**
|
|
1537 * Style constant for calendar display (value is 1<<10).
|
|
1538 * <p><b>Used By:</b><ul>
|
|
1539 * <li><code>DateTime</code></li>
|
|
1540 * </ul></p>
|
|
1541 *
|
|
1542 * @since 3.3
|
|
1543 */
|
|
1544 public static const int CALENDAR = 1 << 10;
|
|
1545
|
|
1546 /**
|
|
1547 * Style constant for short date/time format (value is 1<<15).
|
|
1548 * <p>
|
|
1549 * A short date displays the month and year.
|
|
1550 * A short time displays hours and minutes.
|
|
1551 * <br>Note that this is a <em>HINT</em>.
|
|
1552 * </p>
|
|
1553 * <p><b>Used By:</b><ul>
|
|
1554 * <li><code>DateTime</code></li>
|
|
1555 * </ul></p>
|
|
1556 *
|
|
1557 * @since 3.3
|
|
1558 */
|
|
1559 public static const int SHORT = 1 << 15;
|
|
1560
|
|
1561 /**
|
|
1562 * Style constant for medium date/time format (value is 1<<16).
|
|
1563 * <p>
|
|
1564 * A medium date displays the day, month and year.
|
|
1565 * A medium time displays hours, minutes, and seconds.
|
|
1566 * <br>Note that this is a <em>HINT</em>.
|
|
1567 * </p>
|
|
1568 * <p><b>Used By:</b><ul>
|
|
1569 * <li><code>DateTime</code></li>
|
|
1570 * </ul></p>
|
|
1571 *
|
|
1572 * @since 3.3
|
|
1573 */
|
|
1574 public static const int MEDIUM = 1 << 16;
|
|
1575
|
|
1576 /**
|
|
1577 * Style constant for long date/time format (value is 1<<28).
|
|
1578 * <p>
|
|
1579 * A long date displays the day, month and year.
|
|
1580 * A long time displays hours, minutes, and seconds.
|
|
1581 * The day and month names may be displayed.
|
|
1582 * <br>Note that this is a <em>HINT</em>.
|
|
1583 * </p>
|
|
1584 * <p><b>Used By:</b><ul>
|
|
1585 * <li><code>DateTime</code></li>
|
|
1586 * </ul></p>
|
|
1587 *
|
|
1588 * @since 3.3
|
|
1589 */
|
|
1590 public static const int LONG = 1 << 28;
|
|
1591
|
|
1592 /**
|
|
1593 * Style constant specifying that a Browser should use a Mozilla GRE
|
|
1594 * for rendering its content (value is 1<<15).
|
|
1595 * <p>
|
|
1596 * <p><b>Used By:</b><ul>
|
|
1597 * <li><code>Browser</code></li>
|
|
1598 * </ul></p>
|
|
1599 *
|
|
1600 * @since 3.3
|
|
1601 */
|
|
1602 public static const int MOZILLA = 1 << 15;
|
|
1603
|
|
1604 /**
|
|
1605 * Style constant for balloon behavior (value is 1<<12).
|
|
1606 * <p><b>Used By:</b><ul>
|
|
1607 * <li><code>ToolTip</code></li>
|
|
1608 * </ul></p>
|
|
1609 *
|
|
1610 * @since 3.2
|
|
1611 */
|
|
1612 public static const int BALLOON = 1 << 12;
|
|
1613
|
|
1614 /**
|
|
1615 * Style constant for vertical alignment or orientation behavior (value is 1).
|
|
1616 * <p><b>Used By:</b><ul>
|
|
1617 * <li><code>GridLayout</code> type</li>
|
|
1618 * </ul></p>
|
|
1619 */
|
|
1620 public static const int BEGINNING = 1;
|
|
1621
|
|
1622 /**
|
|
1623 * Style constant for vertical alignment or orientation behavior (value is 4).
|
|
1624 * <p><b>Used By:</b><ul>
|
|
1625 * <li><code>GridLayout</code> type</li>
|
|
1626 * </ul></p>
|
|
1627 */
|
|
1628 public static const int FILL = 4;
|
|
1629
|
|
1630 /**
|
|
1631 * Input Method Editor style constant for double byte
|
|
1632 * input behavior (value is 1<<1).
|
|
1633 */
|
|
1634 public static const int DBCS = 1 << 1;
|
|
1635
|
|
1636 /**
|
|
1637 * Input Method Editor style constant for alpha
|
|
1638 * input behavior (value is 1<<2).
|
|
1639 */
|
|
1640 public static const int ALPHA = 1 << 2;
|
|
1641
|
|
1642 /**
|
|
1643 * Input Method Editor style constant for native
|
|
1644 * input behavior (value is 1<<3).
|
|
1645 */
|
|
1646 public static const int NATIVE = 1 << 3;
|
|
1647
|
|
1648 /**
|
|
1649 * Input Method Editor style constant for phonetic
|
|
1650 * input behavior (value is 1<<4).
|
|
1651 */
|
|
1652 public static const int PHONETIC = 1 << 4;
|
|
1653
|
|
1654 /**
|
|
1655 * Input Method Editor style constant for romanicized
|
|
1656 * input behavior (value is 1<<5).
|
|
1657 */
|
|
1658 public static const int ROMAN = 1 << 5;
|
|
1659
|
|
1660 /**
|
|
1661 * ASCII character convenience constant for the backspace character
|
|
1662 * (value is the <code>char</code> '\b').
|
|
1663 */
|
|
1664 public static const char BS = '\b';
|
|
1665
|
|
1666 /**
|
|
1667 * ASCII character convenience constant for the carriage return character
|
|
1668 * (value is the <code>char</code> '\r').
|
|
1669 */
|
|
1670 public static const char CR = '\r';
|
|
1671
|
|
1672 /**
|
|
1673 * ASCII character convenience constant for the delete character
|
|
1674 * (value is the <code>char</code> with value 127).
|
|
1675 */
|
|
1676 public static const char DEL = 0x7F;
|
|
1677
|
|
1678 /**
|
|
1679 * ASCII character convenience constant for the escape character
|
|
1680 * (value is the <code>char</code> with value 27).
|
|
1681 */
|
|
1682 public static const char ESC = 0x1B;
|
|
1683
|
|
1684 /**
|
|
1685 * ASCII character convenience constant for the line feed character
|
|
1686 * (value is the <code>char</code> '\n').
|
|
1687 */
|
|
1688 public static const char LF = '\n';
|
|
1689
|
|
1690 /**
|
|
1691 * ASCII character convenience constant for the tab character
|
|
1692 * (value is the <code>char</code> '\t').
|
|
1693 *
|
|
1694 * @since 2.1
|
|
1695 */
|
|
1696 public static const char TAB = '\t';
|
|
1697
|
|
1698 /**
|
|
1699 * keyboard and/or mouse event mask indicating that the ALT key
|
|
1700 * was pushed on the keyboard when the event was generated
|
|
1701 * (value is 1<<16).
|
|
1702 */
|
|
1703 public static const int ALT = 1 << 16;
|
|
1704
|
|
1705 /**
|
|
1706 * Keyboard and/or mouse event mask indicating that the SHIFT key
|
|
1707 * was pushed on the keyboard when the event was generated
|
|
1708 * (value is 1<<17).
|
|
1709 */
|
|
1710 public static const int SHIFT = 1 << 17;
|
|
1711
|
|
1712 /**
|
|
1713 * Keyboard and/or mouse event mask indicating that the CTRL key
|
|
1714 * was pushed on the keyboard when the event was generated
|
|
1715 * (value is 1<<18).
|
|
1716 */
|
|
1717 public static const int CTRL = 1 << 18;
|
|
1718
|
|
1719 /**
|
|
1720 * Keyboard and/or mouse event mask indicating that the CTRL key
|
|
1721 * was pushed on the keyboard when the event was generated. This
|
|
1722 * is a synonym for CTRL (value is 1<<18).
|
|
1723 */
|
|
1724 public static const int CONTROL = CTRL;
|
|
1725
|
|
1726 /**
|
|
1727 * Keyboard and/or mouse event mask indicating that the COMMAND key
|
|
1728 * was pushed on the keyboard when the event was generated
|
|
1729 * (value is 1<<22).
|
|
1730 *
|
|
1731 * @since 2.1
|
|
1732 */
|
|
1733 public static const int COMMAND = 1 << 22;
|
|
1734
|
|
1735 /**
|
|
1736 * Keyboard and/or mouse event mask indicating all possible
|
|
1737 * keyboard modifiers.
|
|
1738 *
|
|
1739 * To allow for the future, this mask is intended to be used in
|
|
1740 * place of code that references each individual keyboard mask.
|
|
1741 * For example, the following expression will determine whether
|
|
1742 * any modifier is pressed and will continue to work as new modifier
|
|
1743 * masks are added.
|
|
1744 *
|
|
1745 * <code>(stateMask & DWT.MODIFIER_MASK) !is 0</code>.
|
|
1746 *
|
|
1747 * @since 2.1
|
|
1748 */
|
|
1749 public static const int MODIFIER_MASK;
|
|
1750
|
|
1751 /**
|
|
1752 * Keyboard and/or mouse event mask indicating that mouse button one
|
|
1753 * was pushed when the event was generated. (value is 1<<19).
|
|
1754 */
|
|
1755 public static const int BUTTON1 = 1 << 19;
|
|
1756
|
|
1757 /**
|
|
1758 * Keyboard and/or mouse event mask indicating that mouse button two
|
|
1759 * was pushed when the event was generated. (value is 1<<20).
|
|
1760 */
|
|
1761 public static const int BUTTON2 = 1 << 20;
|
|
1762
|
|
1763 /**
|
|
1764 * Keyboard and/or mouse event mask indicating that mouse button three
|
|
1765 * was pushed when the event was generated. (value is 1<<21).
|
|
1766 */
|
|
1767 public static const int BUTTON3 = 1 << 21;
|
|
1768
|
|
1769 /**
|
|
1770 * Keyboard and/or mouse event mask indicating that mouse button four
|
|
1771 * was pushed when the event was generated. (value is 1<<23).
|
|
1772 *
|
|
1773 * @since 3.1
|
|
1774 */
|
|
1775 public static const int BUTTON4 = 1 << 23;
|
|
1776
|
|
1777 /**
|
|
1778 * Keyboard and/or mouse event mask indicating that mouse button five
|
|
1779 * was pushed when the event was generated. (value is 1<<25).
|
|
1780 *
|
|
1781 * @since 3.1
|
|
1782 */
|
|
1783 public static const int BUTTON5 = 1 << 25;
|
|
1784
|
|
1785 /**
|
|
1786 * Keyboard and/or mouse event mask indicating all possible
|
|
1787 * mouse buttons.
|
|
1788 *
|
|
1789 * To allow for the future, this mask is intended to be used
|
|
1790 * in place of code that references each individual button mask.
|
|
1791 * For example, the following expression will determine whether
|
|
1792 * any button is pressed and will continue to work as new button
|
|
1793 * masks are added.
|
|
1794 *
|
|
1795 * <code>(stateMask & DWT.BUTTON_MASK) !is 0</code>.
|
|
1796 *
|
|
1797 * @since 2.1
|
|
1798 */
|
|
1799 public static const int BUTTON_MASK;
|
|
1800
|
|
1801 /**
|
|
1802 * Keyboard and/or mouse event mask indicating that the MOD1 key
|
|
1803 * was pushed on the keyboard when the event was generated.
|
|
1804 *
|
|
1805 * This is the primary keyboard modifier for the platform.
|
|
1806 *
|
|
1807 * @since 2.1
|
|
1808 */
|
|
1809 public static const int MOD1;
|
|
1810
|
|
1811 /**
|
|
1812 * Keyboard and/or mouse event mask indicating that the MOD2 key
|
|
1813 * was pushed on the keyboard when the event was generated.
|
|
1814 *
|
|
1815 * This is the secondary keyboard modifier for the platform.
|
|
1816 *
|
|
1817 * @since 2.1
|
|
1818 */
|
|
1819 public static const int MOD2;
|
|
1820
|
|
1821 /**
|
|
1822 * Keyboard and/or mouse event mask indicating that the MOD3 key
|
|
1823 * was pushed on the keyboard when the event was generated.
|
|
1824 *
|
|
1825 * @since 2.1
|
|
1826 */
|
|
1827 public static const int MOD3;
|
|
1828
|
|
1829 /**
|
|
1830 * Keyboard and/or mouse event mask indicating that the MOD4 key
|
|
1831 * was pushed on the keyboard when the event was generated.
|
|
1832 *
|
|
1833 * @since 2.1
|
|
1834 */
|
|
1835 public static const int MOD4;
|
|
1836
|
|
1837 /**
|
|
1838 * Constants to indicate line scrolling (value is 1).
|
|
1839 * <p><b>Used By:</b><ul>
|
|
1840 * <li><code>Control</code></li>
|
|
1841 * </ul></p>
|
|
1842 *
|
|
1843 * @since 3.1
|
|
1844 */
|
|
1845 public static const int SCROLL_LINE = 1;
|
|
1846
|
|
1847 /**
|
|
1848 * Constants to indicate page scrolling (value is 2).
|
|
1849 * <p><b>Used By:</b><ul>
|
|
1850 * <li><code>Control</code></li>
|
|
1851 * </ul></p>
|
|
1852 *
|
|
1853 * @since 3.1
|
|
1854 */
|
|
1855 public static const int SCROLL_PAGE = 2;
|
|
1856
|
|
1857 /**
|
|
1858 * Accelerator constant used to differentiate a key code from a
|
|
1859 * unicode character.
|
|
1860 *
|
|
1861 * If this bit is set, then the key stroke
|
|
1862 * portion of an accelerator represents a key code. If this bit
|
|
1863 * is not set, then the key stroke portion of an accelerator is
|
|
1864 * a unicode character.
|
|
1865 *
|
|
1866 * The following expression is false:
|
|
1867 *
|
|
1868 * <code>((DWT.MOD1 | DWT.MOD2 | 'T') & DWT.KEYCODE_BIT) !is 0</code>.
|
|
1869 *
|
|
1870 * The following expression is true:
|
|
1871 *
|
|
1872 * <code>((DWT.MOD3 | DWT.F2) & DWT.KEYCODE_BIT) !is 0</code>.
|
|
1873 *
|
|
1874 * (value is (1<<24))
|
|
1875 *
|
|
1876 * @since 2.1
|
|
1877 */
|
|
1878 public static const int KEYCODE_BIT = (1 << 24);
|
|
1879
|
|
1880 /**
|
|
1881 * Accelerator constant used to extract the key stroke portion of
|
|
1882 * an accelerator.
|
|
1883 *
|
|
1884 * The key stroke may be a key code or a unicode
|
|
1885 * value. If the key stroke is a key code <code>KEYCODE_BIT</code>
|
|
1886 * will be set.
|
|
1887 *
|
|
1888 * @since 2.1
|
|
1889 */
|
|
1890 public static const int KEY_MASK = KEYCODE_BIT + 0xFFFF;
|
|
1891
|
|
1892 /**
|
|
1893 * Keyboard event constant representing the UP ARROW key
|
|
1894 * (value is (1<<24)+1).
|
|
1895 */
|
|
1896 public static const int ARROW_UP = KEYCODE_BIT + 1;
|
|
1897
|
|
1898 /**
|
|
1899 * Keyboard event constant representing the DOWN ARROW key
|
|
1900 * (value is (1<<24)+2).
|
|
1901 */
|
|
1902 public static const int ARROW_DOWN = KEYCODE_BIT + 2;
|
|
1903
|
|
1904 /**
|
|
1905 * Keyboard event constant representing the LEFT ARROW key
|
|
1906 * (value is (1<<24)+3).
|
|
1907 */
|
|
1908 public static const int ARROW_LEFT = KEYCODE_BIT + 3;
|
|
1909
|
|
1910 /**
|
|
1911 * Keyboard event constant representing the RIGHT ARROW key
|
|
1912 * (value is (1<<24)+4).
|
|
1913 */
|
|
1914 public static const int ARROW_RIGHT = KEYCODE_BIT + 4;
|
|
1915
|
|
1916 /**
|
|
1917 * Keyboard event constant representing the PAGE UP key
|
|
1918 * (value is (1<<24)+5).
|
|
1919 */
|
|
1920 public static const int PAGE_UP = KEYCODE_BIT + 5;
|
|
1921
|
|
1922 /**
|
|
1923 * Keyboard event constant representing the PAGE DOWN key
|
|
1924 * (value is (1<<24)+6).
|
|
1925 */
|
|
1926 public static const int PAGE_DOWN = KEYCODE_BIT + 6;
|
|
1927
|
|
1928 /**
|
|
1929 * Keyboard event constant representing the HOME key
|
|
1930 * (value is (1<<24)+7).
|
|
1931 */
|
|
1932 public static const int HOME = KEYCODE_BIT + 7;
|
|
1933
|
|
1934 /**
|
|
1935 * Keyboard event constant representing the END key
|
|
1936 * (value is (1<<24)+8).
|
|
1937 */
|
|
1938 public static const int END = KEYCODE_BIT + 8;
|
|
1939
|
|
1940 /**
|
|
1941 * Keyboard event constant representing the INSERT key
|
|
1942 * (value is (1<<24)+9).
|
|
1943 */
|
|
1944 public static const int INSERT = KEYCODE_BIT + 9;
|
|
1945
|
|
1946 /**
|
|
1947 * Keyboard event constant representing the F1 key
|
|
1948 * (value is (1<<24)+10).
|
|
1949 */
|
|
1950 public static const int F1 = KEYCODE_BIT + 10;
|
|
1951
|
|
1952 /**
|
|
1953 * Keyboard event constant representing the F2 key
|
|
1954 * (value is (1<<24)+11).
|
|
1955 */
|
|
1956 public static const int F2 = KEYCODE_BIT + 11;
|
|
1957
|
|
1958 /**
|
|
1959 * Keyboard event constant representing the F3 key
|
|
1960 * (value is (1<<24)+12).
|
|
1961 */
|
|
1962 public static const int F3 = KEYCODE_BIT + 12;
|
|
1963
|
|
1964 /**
|
|
1965 * Keyboard event constant representing the F4 key
|
|
1966 * (value is (1<<24)+13).
|
|
1967 */
|
|
1968 public static const int F4 = KEYCODE_BIT + 13;
|
|
1969
|
|
1970 /**
|
|
1971 * Keyboard event constant representing the F5 key
|
|
1972 * (value is (1<<24)+14).
|
|
1973 */
|
|
1974 public static const int F5 = KEYCODE_BIT + 14;
|
|
1975
|
|
1976 /**
|
|
1977 * Keyboard event constant representing the F6 key
|
|
1978 * (value is (1<<24)+15).
|
|
1979 */
|
|
1980 public static const int F6 = KEYCODE_BIT + 15;
|
|
1981
|
|
1982 /**
|
|
1983 * Keyboard event constant representing the F7 key
|
|
1984 * (value is (1<<24)+16).
|
|
1985 */
|
|
1986 public static const int F7 = KEYCODE_BIT + 16;
|
|
1987
|
|
1988 /**
|
|
1989 * Keyboard event constant representing the F8 key
|
|
1990 * (value is (1<<24)+17).
|
|
1991 */
|
|
1992 public static const int F8 = KEYCODE_BIT + 17;
|
|
1993
|
|
1994 /**
|
|
1995 * Keyboard event constant representing the F9 key
|
|
1996 * (value is (1<<24)+18).
|
|
1997 */
|
|
1998 public static const int F9 = KEYCODE_BIT + 18;
|
|
1999
|
|
2000 /**
|
|
2001 * Keyboard event constant representing the F10 key
|
|
2002 * (value is (1<<24)+19).
|
|
2003 */
|
|
2004 public static const int F10 = KEYCODE_BIT + 19;
|
|
2005
|
|
2006 /**
|
|
2007 * Keyboard event constant representing the F11 key
|
|
2008 * (value is (1<<24)+20).
|
|
2009 */
|
|
2010 public static const int F11 = KEYCODE_BIT + 20;
|
|
2011
|
|
2012 /**
|
|
2013 * Keyboard event constant representing the F12 key
|
|
2014 * (value is (1<<24)+21).
|
|
2015 */
|
|
2016 public static const int F12 = KEYCODE_BIT + 21;
|
|
2017
|
|
2018 /**
|
|
2019 * Keyboard event constant representing the F13 key
|
|
2020 * (value is (1<<24)+22).
|
|
2021 *
|
|
2022 * @since 3.0
|
|
2023 */
|
|
2024 public static const int F13 = KEYCODE_BIT + 22;
|
|
2025
|
|
2026 /**
|
|
2027 * Keyboard event constant representing the F14 key
|
|
2028 * (value is (1<<24)+23).
|
|
2029 *
|
|
2030 * @since 3.0
|
|
2031 */
|
|
2032 public static const int F14 = KEYCODE_BIT + 23;
|
|
2033
|
|
2034 /**
|
|
2035 * Keyboard event constant representing the F15 key
|
|
2036 * (value is (1<<24)+24).
|
|
2037 *
|
|
2038 * @since 3.0
|
|
2039 */
|
|
2040 public static const int F15 = KEYCODE_BIT + 24;
|
|
2041
|
|
2042 /**
|
|
2043 * Keyboard event constant representing the numeric key
|
|
2044 * pad multiply key (value is (1<<24)+42).
|
|
2045 *
|
|
2046 * @since 3.0
|
|
2047 */
|
|
2048 public static const int KEYPAD_MULTIPLY = KEYCODE_BIT + 42;
|
|
2049
|
|
2050 /**
|
|
2051 * Keyboard event constant representing the numeric key
|
|
2052 * pad add key (value is (1<<24)+43).
|
|
2053 *
|
|
2054 * @since 3.0
|
|
2055 */
|
|
2056 public static const int KEYPAD_ADD = KEYCODE_BIT + 43;
|
|
2057
|
|
2058 /**
|
|
2059 * Keyboard event constant representing the numeric key
|
|
2060 * pad subtract key (value is (1<<24)+45).
|
|
2061 *
|
|
2062 * @since 3.0
|
|
2063 */
|
|
2064 public static const int KEYPAD_SUBTRACT = KEYCODE_BIT + 45;
|
|
2065
|
|
2066 /**
|
|
2067 * Keyboard event constant representing the numeric key
|
|
2068 * pad decimal key (value is (1<<24)+46).
|
|
2069 *
|
|
2070 * @since 3.0
|
|
2071 */
|
|
2072 public static const int KEYPAD_DECIMAL = KEYCODE_BIT + 46;
|
|
2073
|
|
2074 /**
|
|
2075 * Keyboard event constant representing the numeric key
|
|
2076 * pad divide key (value is (1<<24)+47).
|
|
2077 *
|
|
2078 * @since 3.0
|
|
2079 */
|
|
2080 public static const int KEYPAD_DIVIDE = KEYCODE_BIT + 47;
|
|
2081
|
|
2082 /**
|
|
2083 * Keyboard event constant representing the numeric key
|
|
2084 * pad zero key (value is (1<<24)+48).
|
|
2085 *
|
|
2086 * @since 3.0
|
|
2087 */
|
|
2088 public static const int KEYPAD_0 = KEYCODE_BIT + 48;
|
|
2089
|
|
2090 /**
|
|
2091 * Keyboard event constant representing the numeric key
|
|
2092 * pad one key (value is (1<<24)+49).
|
|
2093 *
|
|
2094 * @since 3.0
|
|
2095 */
|
|
2096 public static const int KEYPAD_1 = KEYCODE_BIT + 49;
|
|
2097
|
|
2098 /**
|
|
2099 * Keyboard event constant representing the numeric key
|
|
2100 * pad two key (value is (1<<24)+50).
|
|
2101 *
|
|
2102 * @since 3.0
|
|
2103 */
|
|
2104 public static const int KEYPAD_2 = KEYCODE_BIT + 50;
|
|
2105
|
|
2106 /**
|
|
2107 * Keyboard event constant representing the numeric key
|
|
2108 * pad three key (value is (1<<24)+51).
|
|
2109 *
|
|
2110 * @since 3.0
|
|
2111 */
|
|
2112 public static const int KEYPAD_3 = KEYCODE_BIT + 51;
|
|
2113
|
|
2114 /**
|
|
2115 * Keyboard event constant representing the numeric key
|
|
2116 * pad four key (value is (1<<24)+52).
|
|
2117 *
|
|
2118 * @since 3.0
|
|
2119 */
|
|
2120 public static const int KEYPAD_4 = KEYCODE_BIT + 52;
|
|
2121
|
|
2122 /**
|
|
2123 * Keyboard event constant representing the numeric key
|
|
2124 * pad five key (value is (1<<24)+53).
|
|
2125 *
|
|
2126 * @since 3.0
|
|
2127 */
|
|
2128 public static const int KEYPAD_5 = KEYCODE_BIT + 53;
|
|
2129
|
|
2130 /**
|
|
2131 * Keyboard event constant representing the numeric key
|
|
2132 * pad six key (value is (1<<24)+54).
|
|
2133 *
|
|
2134 * @since 3.0
|
|
2135 */
|
|
2136 public static const int KEYPAD_6 = KEYCODE_BIT + 54;
|
|
2137
|
|
2138 /**
|
|
2139 * Keyboard event constant representing the numeric key
|
|
2140 * pad seven key (value is (1<<24)+55).
|
|
2141 *
|
|
2142 * @since 3.0
|
|
2143 */
|
|
2144 public static const int KEYPAD_7 = KEYCODE_BIT + 55;
|
|
2145
|
|
2146 /**
|
|
2147 * Keyboard event constant representing the numeric key
|
|
2148 * pad eight key (value is (1<<24)+56).
|
|
2149 *
|
|
2150 * @since 3.0
|
|
2151 */
|
|
2152 public static const int KEYPAD_8 = KEYCODE_BIT + 56;
|
|
2153
|
|
2154 /**
|
|
2155 * Keyboard event constant representing the numeric key
|
|
2156 * pad nine key (value is (1<<24)+57).
|
|
2157 *
|
|
2158 * @since 3.0
|
|
2159 */
|
|
2160 public static const int KEYPAD_9 = KEYCODE_BIT + 57;
|
|
2161
|
|
2162 /**
|
|
2163 * Keyboard event constant representing the numeric key
|
|
2164 * pad equal key (value is (1<<24)+61).
|
|
2165 *
|
|
2166 * @since 3.0
|
|
2167 */
|
|
2168 public static const int KEYPAD_EQUAL = KEYCODE_BIT + 61;
|
|
2169
|
|
2170 /**
|
|
2171 * Keyboard event constant representing the numeric key
|
|
2172 * pad enter key (value is (1<<24)+80).
|
|
2173 *
|
|
2174 * @since 3.0
|
|
2175 */
|
|
2176 public static const int KEYPAD_CR = KEYCODE_BIT + 80;
|
|
2177
|
|
2178 /**
|
|
2179 * Keyboard event constant representing the help
|
|
2180 * key (value is (1<<24)+81).
|
|
2181 *
|
|
2182 * NOTE: The HELP key maps to the key labeled "help",
|
|
2183 * not "F1". If your keyboard does not have a HELP key,
|
|
2184 * you will never see this key press. To listen for
|
|
2185 * help on a control, use DWT.Help.
|
|
2186 *
|
|
2187 * @since 3.0
|
|
2188 *
|
|
2189 * @see DWT#Help
|
|
2190 */
|
|
2191 public static const int HELP = KEYCODE_BIT + 81;
|
|
2192
|
|
2193 /**
|
|
2194 * Keyboard event constant representing the caps
|
|
2195 * lock key (value is (1<<24)+82).
|
|
2196 *
|
|
2197 * @since 3.0
|
|
2198 */
|
|
2199 public static const int CAPS_LOCK = KEYCODE_BIT + 82;
|
|
2200
|
|
2201 /**
|
|
2202 * Keyboard event constant representing the num
|
|
2203 * lock key (value is (1<<24)+83).
|
|
2204 *
|
|
2205 * @since 3.0
|
|
2206 */
|
|
2207 public static const int NUM_LOCK = KEYCODE_BIT + 83;
|
|
2208
|
|
2209 /**
|
|
2210 * Keyboard event constant representing the scroll
|
|
2211 * lock key (value is (1<<24)+84).
|
|
2212 *
|
|
2213 * @since 3.0
|
|
2214 */
|
|
2215 public static const int SCROLL_LOCK = KEYCODE_BIT + 84;
|
|
2216
|
|
2217 /**
|
|
2218 * Keyboard event constant representing the pause
|
|
2219 * key (value is (1<<24)+85).
|
|
2220 *
|
|
2221 * @since 3.0
|
|
2222 */
|
|
2223 public static const int PAUSE = KEYCODE_BIT + 85;
|
|
2224
|
|
2225 /**
|
|
2226 * Keyboard event constant representing the break
|
|
2227 * key (value is (1<<24)+86).
|
|
2228 *
|
|
2229 * @since 3.0
|
|
2230 */
|
|
2231 public static const int BREAK = KEYCODE_BIT + 86;
|
|
2232
|
|
2233 /**
|
|
2234 * Keyboard event constant representing the print screen
|
|
2235 * key (value is (1<<24)+87).
|
|
2236 *
|
|
2237 * @since 3.0
|
|
2238 */
|
|
2239 public static const int PRINT_SCREEN = KEYCODE_BIT + 87;
|
|
2240
|
|
2241 /**
|
|
2242 * The <code>MessageBox</code> style constant for error icon
|
|
2243 * behavior (value is 1).
|
|
2244 */
|
|
2245 public static const int ICON_ERROR = 1;
|
|
2246
|
|
2247 /**
|
|
2248 * The <code>MessageBox</code> style constant for information icon
|
|
2249 * behavior (value is 1<<1).
|
|
2250 */
|
|
2251 public static const int ICON_INFORMATION = 1 << 1;
|
|
2252
|
|
2253 /**
|
|
2254 * The <code>MessageBox</code> style constant for question icon
|
|
2255 * behavior (value is 1<<2).
|
|
2256 */
|
|
2257 public static const int ICON_QUESTION = 1 << 2;
|
|
2258
|
|
2259 /**
|
|
2260 * The <code>MessageBox</code> style constant for warning icon
|
|
2261 * behavior (value is 1<<3).
|
|
2262 */
|
|
2263 public static const int ICON_WARNING = 1 << 3;
|
|
2264
|
|
2265 /**
|
|
2266 * The <code>MessageBox</code> style constant for "working" icon
|
|
2267 * behavior (value is 1<<4).
|
|
2268 */
|
|
2269 public static const int ICON_WORKING = 1 << 4;
|
|
2270
|
|
2271 /**
|
|
2272 * The <code>MessageBox</code> style constant for an OK button;
|
|
2273 * valid combinations are OK, OK|CANCEL
|
|
2274 * (value is 1<<5).
|
|
2275 */
|
|
2276 public static const int OK = 1 << 5;
|
|
2277
|
|
2278 /**
|
|
2279 * The <code>MessageBox</code> style constant for YES button;
|
|
2280 * valid combinations are YES|NO, YES|NO|CANCEL
|
|
2281 * (value is 1<<6).
|
|
2282 */
|
|
2283 public static const int YES = 1 << 6;
|
|
2284
|
|
2285 /**
|
|
2286 * The <code>MessageBox</code> style constant for NO button;
|
|
2287 * valid combinations are YES|NO, YES|NO|CANCEL
|
|
2288 * (value is 1<<7).
|
|
2289 */
|
|
2290 public static const int NO = 1 << 7;
|
|
2291
|
|
2292 /**
|
|
2293 * The <code>MessageBox</code> style constant for a CANCEL button;
|
|
2294 * valid combinations are OK|CANCEL, YES|NO|CANCEL, RETRY|CANCEL
|
|
2295 * (value is 1<<8). This style constant is also used with
|
|
2296 * <code>Text</code> in combination with SEARCH.
|
|
2297 *
|
|
2298 * <p><b>Used By:</b><ul>
|
|
2299 * <li><code>MessageBox</code></li>
|
|
2300 * <li><code>Text</code></li>
|
|
2301 * </ul></p>
|
|
2302 */
|
|
2303 public static const int CANCEL = 1 << 8;
|
|
2304
|
|
2305 /**
|
|
2306 * The <code>MessageBox</code> style constant for an ABORT button;
|
|
2307 * the only valid combination is ABORT|RETRY|IGNORE
|
|
2308 * (value is 1<<9).
|
|
2309 */
|
|
2310 public static const int ABORT = 1 << 9;
|
|
2311
|
|
2312 /**
|
|
2313 * The <code>MessageBox</code> style constant for a RETRY button;
|
|
2314 * valid combinations are ABORT|RETRY|IGNORE, RETRY|CANCEL
|
|
2315 * (value is 1<<10).
|
|
2316 */
|
|
2317 public static const int RETRY = 1 << 10;
|
|
2318
|
|
2319 /**
|
|
2320 * The <code>MessageBox</code> style constant for an IGNORE button;
|
|
2321 * the only valid combination is ABORT|RETRY|IGNORE
|
|
2322 * (value is 1<<11).
|
|
2323 */
|
|
2324 public static const int IGNORE = 1 << 11;
|
|
2325
|
|
2326 /**
|
|
2327 * The <code>FileDialog</code> style constant for open file dialog behavior
|
|
2328 * (value is 1<<12).
|
|
2329 */
|
|
2330 public static const int OPEN = 1 << 12;
|
|
2331
|
|
2332 /**
|
|
2333 * The <code>FileDialog</code> style constant for save file dialog behavior
|
|
2334 * (value is 1<<13).
|
|
2335 */
|
|
2336 public static const int SAVE = 1 << 13;
|
|
2337
|
|
2338 /**
|
|
2339 * The <code>Composite</code> constant to indicate that
|
|
2340 * an attribute (such as background) is not inherited
|
|
2341 * by the children (value is 0).
|
|
2342 *
|
|
2343 * @since 3.2
|
|
2344 */
|
|
2345 public static const int INHERIT_NONE = 0;
|
|
2346
|
|
2347 /**
|
|
2348 * The <code>Composite</code> constant to indicate that
|
|
2349 * an attribute (such as background) is inherited by
|
|
2350 * children who choose this value as their "default"
|
|
2351 * (value is 1). For example, a label child will
|
|
2352 * typically choose to inherit the background color
|
|
2353 * of a composite while a list or table will not.
|
|
2354 *
|
|
2355 * @since 3.2
|
|
2356 */
|
|
2357 public static const int INHERIT_DEFAULT = 1;
|
|
2358
|
|
2359 /**
|
|
2360 * The <code>Composite</code> constant to indicate that
|
|
2361 * an attribute (such as background) is inherited by
|
|
2362 * all children.
|
|
2363 *
|
|
2364 * @since 3.2
|
|
2365 */
|
|
2366 public static const int INHERIT_FORCE = 2;
|
|
2367
|
|
2368 /**
|
|
2369 * Default color white (value is 1).
|
|
2370 */
|
|
2371 public static const int COLOR_WHITE = 1;
|
|
2372
|
|
2373 /**
|
|
2374 * Default color black (value is 2).
|
|
2375 */
|
|
2376 public static const int COLOR_BLACK = 2;
|
|
2377
|
|
2378 /**
|
|
2379 * Default color red (value is 3).
|
|
2380 */
|
|
2381 public static const int COLOR_RED = 3;
|
|
2382
|
|
2383 /**
|
|
2384 * Default color dark red (value is 4).
|
|
2385 */
|
|
2386 public static const int COLOR_DARK_RED = 4;
|
|
2387
|
|
2388 /**
|
|
2389 * Default color green (value is 5).
|
|
2390 */
|
|
2391 public static const int COLOR_GREEN = 5;
|
|
2392
|
|
2393 /**
|
|
2394 * Default color dark green (value is 6).
|
|
2395 */
|
|
2396 public static const int COLOR_DARK_GREEN = 6;
|
|
2397
|
|
2398 /**
|
|
2399 * Default color yellow (value is 7).
|
|
2400 */
|
|
2401 public static const int COLOR_YELLOW = 7;
|
|
2402
|
|
2403 /**
|
|
2404 * Default color dark yellow (value is 8).
|
|
2405 */
|
|
2406 public static const int COLOR_DARK_YELLOW = 8;
|
|
2407
|
|
2408 /**
|
|
2409 * Default color blue (value is 9).
|
|
2410 */
|
|
2411 public static const int COLOR_BLUE = 9;
|
|
2412
|
|
2413 /**
|
|
2414 * Default color dark blue (value is 10).
|
|
2415 */
|
|
2416 public static const int COLOR_DARK_BLUE = 10;
|
|
2417
|
|
2418 /**
|
|
2419 * Default color magenta (value is 11).
|
|
2420 */
|
|
2421 public static const int COLOR_MAGENTA = 11;
|
|
2422
|
|
2423 /**
|
|
2424 * Default color dark magenta (value is 12).
|
|
2425 */
|
|
2426 public static const int COLOR_DARK_MAGENTA = 12;
|
|
2427
|
|
2428 /**
|
|
2429 * Default color cyan (value is 13).
|
|
2430 */
|
|
2431 public static const int COLOR_CYAN = 13;
|
|
2432
|
|
2433 /**
|
|
2434 * Default color dark cyan (value is 14).
|
|
2435 */
|
|
2436 public static const int COLOR_DARK_CYAN = 14;
|
|
2437
|
|
2438 /**
|
|
2439 * Default color gray (value is 15).
|
|
2440 */
|
|
2441 public static const int COLOR_GRAY = 15;
|
|
2442
|
|
2443 /**
|
|
2444 * Default color dark gray (value is 16).
|
|
2445 */
|
|
2446 public static const int COLOR_DARK_GRAY = 16;
|
|
2447
|
|
2448 /*
|
|
2449 * System Colors
|
|
2450 *
|
|
2451 * Dealing with system colors is an area where there are
|
|
2452 * many platform differences. On some platforms, system
|
|
2453 * colors can change dynamically while the program is
|
|
2454 * running. On other platforms, system colors can be
|
|
2455 * changed for all instances of a particular widget.
|
|
2456 * Therefore, the only truly portable method to obtain
|
|
2457 * a widget color query is to query the color from an
|
|
2458 * instance of the widget.
|
|
2459 *
|
|
2460 * It is expected that the list of supported colors
|
|
2461 * will grow over time.
|
|
2462 */
|
|
2463
|
|
2464 /**
|
|
2465 * System color used to paint dark shadow areas (value is 17).
|
|
2466 */
|
|
2467 public static const int COLOR_WIDGET_DARK_SHADOW = 17;
|
|
2468
|
|
2469 /**
|
|
2470 * System color used to paint normal shadow areas (value is 18).
|
|
2471 */
|
|
2472 public static const int COLOR_WIDGET_NORMAL_SHADOW = 18;
|
|
2473
|
|
2474 /**
|
|
2475 * System color used to paint light shadow areas (value is 19).
|
|
2476 */
|
|
2477 public static const int COLOR_WIDGET_LIGHT_SHADOW = 19;
|
|
2478
|
|
2479 /**
|
|
2480 * System color used to paint highlight shadow areas (value is 20).
|
|
2481 */
|
|
2482 public static const int COLOR_WIDGET_HIGHLIGHT_SHADOW = 20;
|
|
2483
|
|
2484 /**
|
|
2485 * System color used to paint foreground areas (value is 21).
|
|
2486 */
|
|
2487 public static const int COLOR_WIDGET_FOREGROUND = 21;
|
|
2488
|
|
2489 /**
|
|
2490 * System color used to paint background areas (value is 22).
|
|
2491 */
|
|
2492 public static const int COLOR_WIDGET_BACKGROUND = 22;
|
|
2493
|
|
2494 /**
|
|
2495 * System color used to paint border areas (value is 23).
|
|
2496 */
|
|
2497 public static const int COLOR_WIDGET_BORDER = 23;
|
|
2498
|
|
2499 /**
|
|
2500 * System color used to paint list foreground areas (value is 24).
|
|
2501 */
|
|
2502 public static const int COLOR_LIST_FOREGROUND = 24;
|
|
2503
|
|
2504 /**
|
|
2505 * System color used to paint list background areas (value is 25).
|
|
2506 */
|
|
2507 public static const int COLOR_LIST_BACKGROUND = 25;
|
|
2508
|
|
2509 /**
|
|
2510 * System color used to paint list selection background areas (value is 26).
|
|
2511 */
|
|
2512 public static const int COLOR_LIST_SELECTION = 26;
|
|
2513
|
|
2514 /**
|
|
2515 * System color used to paint list selected text (value is 27).
|
|
2516 */
|
|
2517 public static const int COLOR_LIST_SELECTION_TEXT = 27;
|
|
2518
|
|
2519 /**
|
|
2520 * System color used to paint tooltip text (value is 28).
|
|
2521 */
|
|
2522 public static const int COLOR_INFO_FOREGROUND = 28;
|
|
2523
|
|
2524 /**
|
|
2525 * System color used to paint tooltip background areas (value is 29).
|
|
2526 */
|
|
2527 public static const int COLOR_INFO_BACKGROUND = 29;
|
|
2528
|
|
2529 /**
|
|
2530 * System color used to paint title text (value is 30).
|
|
2531 */
|
|
2532 public static const int COLOR_TITLE_FOREGROUND = 30;
|
|
2533
|
|
2534 /**
|
|
2535 * System color used to paint title background areas (value is 31).
|
|
2536 */
|
|
2537 public static const int COLOR_TITLE_BACKGROUND = 31;
|
|
2538
|
|
2539 /**
|
|
2540 * System color used to paint title background gradient (value is 32).
|
|
2541 */
|
|
2542 public static const int COLOR_TITLE_BACKGROUND_GRADIENT = 32;
|
|
2543
|
|
2544 /**
|
|
2545 * System color used to paint inactive title text (value is 33).
|
|
2546 */
|
|
2547 public static const int COLOR_TITLE_INACTIVE_FOREGROUND = 33;
|
|
2548
|
|
2549 /**
|
|
2550 * System color used to paint inactive title background areas (value is 34).
|
|
2551 */
|
|
2552 public static const int COLOR_TITLE_INACTIVE_BACKGROUND = 34;
|
|
2553
|
|
2554 /**
|
|
2555 * System color used to paint inactive title background gradient (value is 35).
|
|
2556 */
|
|
2557 public static const int COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT = 35;
|
|
2558
|
|
2559 /**
|
|
2560 * Draw constant indicating whether the drawing operation
|
|
2561 * should fill the background (value is 1<<0).
|
|
2562 */
|
|
2563 public static const int DRAW_TRANSPARENT = 1 << 0;
|
|
2564
|
|
2565 /**
|
|
2566 * Draw constant indicating whether the string drawing operation
|
|
2567 * should handle line-delimiters (value is 1<<1).
|
|
2568 */
|
|
2569 public static const int DRAW_DELIMITER = 1 << 1;
|
|
2570
|
|
2571 /**
|
|
2572 * Draw constant indicating whether the string drawing operation
|
|
2573 * should expand TAB characters (value is 1<<2).
|
|
2574 */
|
|
2575 public static const int DRAW_TAB = 1 << 2;
|
|
2576
|
|
2577 /**
|
|
2578 * Draw constant indicating whether the string drawing operation
|
|
2579 * should handle mnemonics (value is 1<<3).
|
|
2580 */
|
|
2581 public static const int DRAW_MNEMONIC = 1 << 3;
|
|
2582
|
|
2583
|
|
2584 /**
|
|
2585 * Selection constant indicating that a line delimiter should be
|
|
2586 * drawn (value is 1<<17).
|
|
2587 *
|
|
2588 * <p><b>Used By:</b><ul>
|
|
2589 * <li><code>TextLayout</code></li>
|
|
2590 * </ul></p>
|
|
2591 *
|
|
2592 * @see #FULL_SELECTION
|
|
2593 * @see #LAST_LINE_SELECTION
|
|
2594 *
|
|
2595 * @since 3.3
|
|
2596 */
|
|
2597 public static const int DELIMITER_SELECTION = 1 << 17;
|
|
2598
|
|
2599 /**
|
|
2600 * Selection constant indicating that the last line is selected
|
|
2601 * to the end and should be drawn using either a line delimiter
|
|
2602 * or full line selection (value is 1<<20).
|
|
2603 *
|
|
2604 * <p><b>Used By:</b><ul>
|
|
2605 * <li><code>TextLayout</code></li>
|
|
2606 * </ul></p>
|
|
2607 *
|
|
2608 * @see #DELIMITER_SELECTION
|
|
2609 * @see #FULL_SELECTION
|
|
2610 *
|
|
2611 * @since 3.3
|
|
2612 */
|
|
2613 public static const int LAST_LINE_SELECTION = 1 << 20;
|
|
2614
|
|
2615 /**
|
|
2616 * DWT error constant indicating that no error number was specified
|
|
2617 * (value is 1).
|
|
2618 */
|
|
2619 public static const int ERROR_UNSPECIFIED = 1;
|
|
2620
|
|
2621 /**
|
|
2622 * DWT error constant indicating that no more handles for an
|
|
2623 * operating system resource are available
|
|
2624 * (value is 2).
|
|
2625 */
|
|
2626 public static const int ERROR_NO_HANDLES = 2;
|
|
2627
|
|
2628 /**
|
|
2629 * DWT error constant indicating that no more callback resources are available
|
|
2630 * (value is 3).
|
|
2631 */
|
|
2632 public static const int ERROR_NO_MORE_CALLBACKS = 3;
|
|
2633
|
|
2634 /**
|
|
2635 * DWT error constant indicating that a null argument was passed in
|
|
2636 * (value is 4).
|
|
2637 */
|
|
2638 public static const int ERROR_NULL_ARGUMENT = 4;
|
|
2639
|
|
2640 /**
|
|
2641 * DWT error constant indicating that an invalid argument was passed in
|
|
2642 * (value is 5).
|
|
2643 */
|
|
2644 public static const int ERROR_INVALID_ARGUMENT = 5;
|
|
2645
|
|
2646 /**
|
|
2647 * DWT error constant indicating that a value was found to be
|
|
2648 * outside the allowable range
|
|
2649 * (value is 6).
|
|
2650 */
|
|
2651 public static const int ERROR_INVALID_RANGE = 6;
|
|
2652
|
|
2653 /**
|
|
2654 * DWT error constant indicating that a value which can not be
|
|
2655 * zero was found to be
|
|
2656 * (value is 7).
|
|
2657 */
|
|
2658 public static const int ERROR_CANNOT_BE_ZERO = 7;
|
|
2659
|
|
2660 /**
|
|
2661 * DWT error constant indicating that the underlying operating
|
|
2662 * system was unable to provide the value of an item
|
|
2663 * (value is 8).
|
|
2664 */
|
|
2665 public static const int ERROR_CANNOT_GET_ITEM = 8;
|
|
2666
|
|
2667 /**
|
|
2668 * DWT error constant indicating that the underlying operating
|
|
2669 * system was unable to provide the selection
|
|
2670 * (value is 9).
|
|
2671 */
|
|
2672 public static const int ERROR_CANNOT_GET_SELECTION = 9;
|
|
2673
|
|
2674 /**
|
|
2675 * DWT error constant indicating that the matrix is not invertible
|
|
2676 * (value is 10).
|
|
2677 *
|
|
2678 * @since 3.1
|
|
2679 */
|
|
2680 public static const int ERROR_CANNOT_INVERT_MATRIX = 10;
|
|
2681
|
|
2682 /**
|
|
2683 * DWT error constant indicating that the underlying operating
|
|
2684 * system was unable to provide the height of an item
|
|
2685 * (value is 11).
|
|
2686 */
|
|
2687 public static const int ERROR_CANNOT_GET_ITEM_HEIGHT = 11;
|
|
2688
|
|
2689 /**
|
|
2690 * DWT error constant indicating that the underlying operating
|
|
2691 * system was unable to provide the text of a widget
|
|
2692 * (value is 12).
|
|
2693 */
|
|
2694 public static const int ERROR_CANNOT_GET_TEXT = 12;
|
|
2695
|
|
2696 /**
|
|
2697 * DWT error constant indicating that the underlying operating
|
|
2698 * system was unable to set the text of a widget
|
|
2699 * (value is 13).
|
|
2700 */
|
|
2701 public static const int ERROR_CANNOT_SET_TEXT = 13;
|
|
2702
|
|
2703 /**
|
|
2704 * DWT error constant indicating that the underlying operating
|
|
2705 * system was unable to add an item
|
|
2706 * (value is 14).
|
|
2707 */
|
|
2708 public static const int ERROR_ITEM_NOT_ADDED = 14;
|
|
2709
|
|
2710 /**
|
|
2711 * DWT error constant indicating that the underlying operating
|
|
2712 * system was unable to remove an item
|
|
2713 * (value is 15).
|
|
2714 */
|
|
2715 public static const int ERROR_ITEM_NOT_REMOVED = 15;
|
|
2716
|
|
2717 /**
|
|
2718 * DWT error constant indicating that the graphics library
|
|
2719 * is not available
|
|
2720 * (value is 16).
|
|
2721 */
|
|
2722 public static const int ERROR_NO_GRAPHICS_LIBRARY = 16;
|
|
2723
|
|
2724 /**
|
|
2725 * DWT error constant indicating that a particular feature has
|
|
2726 * not been implemented on this platform
|
|
2727 * (value is 20).
|
|
2728 */
|
|
2729 public static const int ERROR_NOT_IMPLEMENTED = 20;
|
|
2730
|
|
2731 /**
|
|
2732 * DWT error constant indicating that a menu which needed
|
|
2733 * to have the drop down style had some other style instead
|
|
2734 * (value is 21).
|
|
2735 */
|
|
2736 public static const int ERROR_MENU_NOT_DROP_DOWN = 21;
|
|
2737
|
|
2738 /**
|
|
2739 * DWT error constant indicating that an attempt was made to
|
|
2740 * invoke an DWT operation which can only be executed by the
|
|
2741 * user-interface thread from some other thread
|
|
2742 * (value is 22).
|
|
2743 */
|
|
2744 public static const int ERROR_THREAD_INVALID_ACCESS = 22;
|
|
2745
|
|
2746 /**
|
|
2747 * DWT error constant indicating that an attempt was made to
|
|
2748 * invoke an DWT operation using a widget which had already
|
|
2749 * been disposed
|
|
2750 * (value is 24).
|
|
2751 */
|
|
2752 public static const int ERROR_WIDGET_DISPOSED = 24;
|
|
2753
|
|
2754 /**
|
|
2755 * DWT error constant indicating that a menu item which needed
|
|
2756 * to have the cascade style had some other style instead
|
|
2757 * (value is 27).
|
|
2758 */
|
|
2759 public static const int ERROR_MENUITEM_NOT_CASCADE = 27;
|
|
2760
|
|
2761 /**
|
|
2762 * DWT error constant indicating that the underlying operating
|
|
2763 * system was unable to set the selection of a widget
|
|
2764 * (value is 28).
|
|
2765 */
|
|
2766 public static const int ERROR_CANNOT_SET_SELECTION = 28;
|
|
2767
|
|
2768 /**
|
|
2769 * DWT error constant indicating that the underlying operating
|
|
2770 * system was unable to set the menu
|
|
2771 * (value is 29).
|
|
2772 */
|
|
2773 public static const int ERROR_CANNOT_SET_MENU = 29;
|
|
2774
|
|
2775 /**
|
|
2776 * DWT error constant indicating that the underlying operating
|
|
2777 * system was unable to set the enabled state
|
|
2778 * (value is 30).
|
|
2779 */
|
|
2780 public static const int ERROR_CANNOT_SET_ENABLED = 30;
|
|
2781
|
|
2782 /**
|
|
2783 * DWT error constant indicating that the underlying operating
|
|
2784 * system was unable to provide enabled/disabled state information
|
|
2785 * (value is 31).
|
|
2786 */
|
|
2787 public static const int ERROR_CANNOT_GET_ENABLED = 31;
|
|
2788
|
|
2789 /**
|
|
2790 * DWT error constant indicating that a provided widget can
|
|
2791 * not be used as a parent in the current operation
|
|
2792 * (value is 32).
|
|
2793 */
|
|
2794 public static const int ERROR_INVALID_PARENT = 32;
|
|
2795
|
|
2796 /**
|
|
2797 * DWT error constant indicating that a menu which needed
|
|
2798 * to have the menu bar style had some other style instead
|
|
2799 * (value is 33).
|
|
2800 */
|
|
2801 public static const int ERROR_MENU_NOT_BAR = 33;
|
|
2802
|
|
2803 /**
|
|
2804 * DWT error constant indicating that the underlying operating
|
|
2805 * system was unable to provide count information
|
|
2806 * (value is 36).
|
|
2807 */
|
|
2808 public static const int ERROR_CANNOT_GET_COUNT = 36;
|
|
2809
|
|
2810 /**
|
|
2811 * DWT error constant indicating that a menu which needed
|
|
2812 * to have the pop up menu style had some other style instead
|
|
2813 * (value is 37).
|
|
2814 */
|
|
2815 public static const int ERROR_MENU_NOT_POP_UP = 37;
|
|
2816
|
|
2817 /**
|
|
2818 * DWT error constant indicating that a graphics operation
|
|
2819 * was attempted with an image of an unsupported depth
|
|
2820 * (value is 38).
|
|
2821 */
|
|
2822 public static const int ERROR_UNSUPPORTED_DEPTH = 38;
|
|
2823
|
|
2824 /**
|
|
2825 * DWT error constant indicating that an input/output operation
|
|
2826 * failed during the execution of an DWT operation
|
|
2827 * (value is 39).
|
|
2828 */
|
|
2829 public static const int ERROR_IO = 39;
|
|
2830
|
|
2831 /**
|
|
2832 * DWT error constant indicating that a graphics operation
|
|
2833 * was attempted with an image having an invalid format
|
|
2834 * (value is 40).
|
|
2835 */
|
|
2836 public static const int ERROR_INVALID_IMAGE = 40;
|
|
2837
|
|
2838 /**
|
|
2839 * DWT error constant indicating that a graphics operation
|
|
2840 * was attempted with an image having a valid but unsupported
|
|
2841 * format
|
|
2842 * (value is 42).
|
|
2843 */
|
|
2844 public static const int ERROR_UNSUPPORTED_FORMAT = 42;
|
|
2845
|
|
2846 /**
|
|
2847 * DWT error constant indicating that an attempt was made
|
|
2848 * to subclass an DWT widget class without implementing the
|
|
2849 * <code>checkSubclass()</code> method
|
|
2850 * (value is 43).
|
|
2851 *
|
|
2852 * For additional information see the comment in
|
|
2853 * <code>Widget.checkSubclass()</code>.
|
|
2854 *
|
|
2855 * @see dwt.widgets.Widget#checkSubclass
|
|
2856 */
|
|
2857 public static const int ERROR_INVALID_SUBCLASS = 43;
|
|
2858
|
|
2859 /**
|
|
2860 * DWT error constant indicating that an attempt was made to
|
|
2861 * invoke an DWT operation using a graphics object which had
|
|
2862 * already been disposed
|
|
2863 * (value is 44).
|
|
2864 */
|
|
2865 public static const int ERROR_GRAPHIC_DISPOSED = 44;
|
|
2866
|
|
2867 /**
|
|
2868 * DWT error constant indicating that an attempt was made to
|
|
2869 * invoke an DWT operation using a device which had already
|
|
2870 * been disposed
|
|
2871 * (value is 45).
|
|
2872 */
|
|
2873 public static const int ERROR_DEVICE_DISPOSED = 45;
|
|
2874
|
|
2875 /**
|
|
2876 * DWT error constant indicating that an exception happened
|
|
2877 * when executing a runnable
|
|
2878 * (value is 46).
|
|
2879 */
|
|
2880 public static const int ERROR_FAILED_EXEC = 46;
|
|
2881
|
|
2882 /**
|
|
2883 * DWT error constant indicating that an unsatisfied link
|
|
2884 * error occurred while attempting to load a library
|
|
2885 * (value is 47).
|
|
2886 *
|
|
2887 * @since 3.1
|
|
2888 */
|
|
2889 public static const int ERROR_FAILED_LOAD_LIBRARY = 47;
|
|
2890
|
|
2891 /**
|
|
2892 * DWT error constant indicating that a font is not valid
|
|
2893 * (value is 48).
|
|
2894 *
|
|
2895 * @since 3.1
|
|
2896 */
|
|
2897 public static const int ERROR_INVALID_FONT = 48;
|
|
2898
|
|
2899 /**
|
|
2900 * Constant indicating that an image or operation is of type bitmap (value is 0).
|
|
2901 */
|
|
2902 public static const int BITMAP = 0;
|
|
2903
|
|
2904 /**
|
|
2905 * Constant indicating that an image or operation is of type icon (value is 1).
|
|
2906 */
|
|
2907 public static const int ICON = 1;
|
|
2908
|
|
2909 /**
|
|
2910 * The <code>Image</code> constructor argument indicating that
|
|
2911 * the new image should be a copy of the image provided as
|
|
2912 * an argument (value is 0).
|
|
2913 */
|
|
2914 public static const int IMAGE_COPY = 0;
|
|
2915
|
|
2916 /**
|
|
2917 * The <code>Image</code> constructor argument indicating that
|
|
2918 * the new image should have the appearance of a "disabled"
|
|
2919 * (using the platform's rules for how this should look)
|
|
2920 * copy of the image provided as an argument (value is 1).
|
|
2921 */
|
|
2922 public static const int IMAGE_DISABLE = 1;
|
|
2923
|
|
2924 /**
|
|
2925 * The <code>Image</code> constructor argument indicating that
|
|
2926 * the new image should have the appearance of a "gray scaled"
|
|
2927 * copy of the image provided as an argument (value is 2).
|
|
2928 */
|
|
2929 public static const int IMAGE_GRAY = 2;
|
|
2930
|
|
2931 /**
|
|
2932 * The font style constant indicating a normal weight, non-italic font
|
|
2933 * (value is 0).
|
|
2934 */
|
|
2935 public static const int NORMAL = 0;
|
|
2936
|
|
2937 /**
|
|
2938 * The font style constant indicating a bold weight font
|
|
2939 * (value is 1<<0).
|
|
2940 */
|
|
2941 public static const int BOLD = 1 << 0;
|
|
2942
|
|
2943 /**
|
|
2944 * The font style constant indicating an italic font
|
|
2945 * (value is 1<<1).
|
|
2946 */
|
|
2947 public static const int ITALIC = 1 << 1;
|
|
2948
|
|
2949 /**
|
|
2950 * System arrow cursor (value is 0).
|
|
2951 */
|
|
2952 public static const int CURSOR_ARROW = 0;
|
|
2953
|
|
2954 /**
|
|
2955 * System wait cursor (value is 1).
|
|
2956 */
|
|
2957 public static const int CURSOR_WAIT = 1;
|
|
2958
|
|
2959 /**
|
|
2960 * System cross hair cursor (value is 2).
|
|
2961 */
|
|
2962 public static const int CURSOR_CROSS = 2;
|
|
2963
|
|
2964 /**
|
|
2965 * System app startup cursor (value is 3).
|
|
2966 */
|
|
2967 public static const int CURSOR_APPSTARTING = 3;
|
|
2968
|
|
2969 /**
|
|
2970 * System help cursor (value is 4).
|
|
2971 */
|
|
2972 public static const int CURSOR_HELP = 4;
|
|
2973
|
|
2974 /**
|
|
2975 * System resize all directions cursor (value is 5).
|
|
2976 */
|
|
2977 public static const int CURSOR_SIZEALL = 5;
|
|
2978
|
|
2979 /**
|
|
2980 * System resize north-east-south-west cursor (value is 6).
|
|
2981 */
|
|
2982 public static const int CURSOR_SIZENESW = 6;
|
|
2983
|
|
2984 /**
|
|
2985 * System resize north-south cursor (value is 7).
|
|
2986 */
|
|
2987 public static const int CURSOR_SIZENS = 7;
|
|
2988
|
|
2989 /**
|
|
2990 * System resize north-west-south-east cursor (value is 8).
|
|
2991 */
|
|
2992 public static const int CURSOR_SIZENWSE = 8;
|
|
2993
|
|
2994 /**
|
|
2995 * System resize west-east cursor (value is 9).
|
|
2996 */
|
|
2997 public static const int CURSOR_SIZEWE = 9;
|
|
2998
|
|
2999 /**
|
|
3000 * System resize north cursor (value is 10).
|
|
3001 */
|
|
3002 public static const int CURSOR_SIZEN = 10;
|
|
3003
|
|
3004 /**
|
|
3005 * System resize south cursor (value is 11).
|
|
3006 */
|
|
3007 public static const int CURSOR_SIZES = 11;
|
|
3008
|
|
3009 /**
|
|
3010 * System resize east cursor (value is 12).
|
|
3011 */
|
|
3012 public static const int CURSOR_SIZEE = 12;
|
|
3013
|
|
3014 /**
|
|
3015 * System resize west cursor (value is 13).
|
|
3016 */
|
|
3017 public static const int CURSOR_SIZEW = 13;
|
|
3018
|
|
3019 /**
|
|
3020 * System resize north-east cursor (value is 14).
|
|
3021 */
|
|
3022 public static const int CURSOR_SIZENE = 14;
|
|
3023
|
|
3024 /**
|
|
3025 * System resize south-east cursor (value is 15).
|
|
3026 */
|
|
3027 public static const int CURSOR_SIZESE = 15;
|
|
3028
|
|
3029 /**
|
|
3030 * System resize south-west cursor (value is 16).
|
|
3031 */
|
|
3032 public static const int CURSOR_SIZESW = 16;
|
|
3033
|
|
3034 /**
|
|
3035 * System resize north-west cursor (value is 17).
|
|
3036 */
|
|
3037 public static const int CURSOR_SIZENW = 17;
|
|
3038
|
|
3039 /**
|
|
3040 * System up arrow cursor (value is 18).
|
|
3041 */
|
|
3042 public static const int CURSOR_UPARROW = 18;
|
|
3043
|
|
3044 /**
|
|
3045 * System i-beam cursor (value is 19).
|
|
3046 */
|
|
3047 public static const int CURSOR_IBEAM = 19;
|
|
3048
|
|
3049 /**
|
|
3050 * System "not allowed" cursor (value is 20).
|
|
3051 */
|
|
3052 public static const int CURSOR_NO = 20;
|
|
3053
|
|
3054 /**
|
|
3055 * System hand cursor (value is 21).
|
|
3056 */
|
|
3057 public static const int CURSOR_HAND = 21;
|
|
3058
|
|
3059 /**
|
|
3060 * Line drawing style for flat end caps (value is 1).
|
|
3061 *
|
|
3062 * @see dwt.graphics.GC#setLineCap(int)
|
|
3063 * @see dwt.graphics.GC#getLineCap()
|
|
3064 *
|
|
3065 * @since 3.1
|
|
3066 */
|
|
3067 public static const int CAP_FLAT = 1;
|
|
3068
|
|
3069 /**
|
|
3070 * Line drawing style for rounded end caps (value is 2).
|
|
3071 *
|
|
3072 * @see dwt.graphics.GC#setLineCap(int)
|
|
3073 * @see dwt.graphics.GC#getLineCap()
|
|
3074 *
|
|
3075 * @since 3.1
|
|
3076 */
|
|
3077 public static const int CAP_ROUND = 2;
|
|
3078
|
|
3079 /**
|
|
3080 * Line drawing style for square end caps (value is 3).
|
|
3081 *
|
|
3082 * @see dwt.graphics.GC#setLineCap(int)
|
|
3083 * @see dwt.graphics.GC#getLineCap()
|
|
3084 *
|
|
3085 * @since 3.1
|
|
3086 */
|
|
3087 public static const int CAP_SQUARE = 3;
|
|
3088
|
|
3089 /**
|
|
3090 * Line drawing style for miter joins (value is 1).
|
|
3091 *
|
|
3092 * @see dwt.graphics.GC#setLineJoin(int)
|
|
3093 * @see dwt.graphics.GC#getLineJoin()
|
|
3094 *
|
|
3095 * @since 3.1
|
|
3096 */
|
|
3097 public static const int JOIN_MITER = 1;
|
|
3098
|
|
3099 /**
|
|
3100 * Line drawing style for rounded joins (value is 2).
|
|
3101 *
|
|
3102 * @see dwt.graphics.GC#setLineJoin(int)
|
|
3103 * @see dwt.graphics.GC#getLineJoin()
|
|
3104 *
|
|
3105 * @since 3.1
|
|
3106 */
|
|
3107 public static const int JOIN_ROUND = 2;
|
|
3108
|
|
3109 /**
|
|
3110 * Line drawing style for bevel joins (value is 3).
|
|
3111 *
|
|
3112 * @see dwt.graphics.GC#setLineJoin(int)
|
|
3113 * @see dwt.graphics.GC#getLineJoin()
|
|
3114 *
|
|
3115 * @since 3.1
|
|
3116 */
|
|
3117 public static const int JOIN_BEVEL = 3;
|
|
3118
|
|
3119 /**
|
|
3120 * Line drawing style for solid lines (value is 1).
|
|
3121 */
|
|
3122 public static const int LINE_SOLID = 1;
|
|
3123
|
|
3124 /**
|
|
3125 * Line drawing style for dashed lines (value is 2).
|
|
3126 */
|
|
3127 public static const int LINE_DASH = 2;
|
|
3128
|
|
3129 /**
|
|
3130 * Line drawing style for dotted lines (value is 3).
|
|
3131 */
|
|
3132 public static const int LINE_DOT = 3;
|
|
3133
|
|
3134 /**
|
|
3135 * Line drawing style for alternating dash-dot lines (value is 4).
|
|
3136 */
|
|
3137 public static const int LINE_DASHDOT = 4;
|
|
3138
|
|
3139 /**
|
|
3140 * Line drawing style for dash-dot-dot lines (value is 5).
|
|
3141 */
|
|
3142 public static const int LINE_DASHDOTDOT = 5;
|
|
3143
|
|
3144 /**
|
|
3145 * Line drawing style for custom dashed lines (value is 6).
|
|
3146 *
|
|
3147 * @see dwt.graphics.GC#setLineDash(int[])
|
|
3148 * @see dwt.graphics.GC#getLineDash()
|
|
3149 *
|
|
3150 * @since 3.1
|
|
3151 */
|
|
3152 public static const int LINE_CUSTOM = 6;
|
|
3153
|
|
3154 /**
|
|
3155 * Path constant that represents a "move to" operation (value is 1).
|
|
3156 *
|
|
3157 * @since 3.1
|
|
3158 */
|
|
3159 public static const int PATH_MOVE_TO = 1;
|
|
3160
|
|
3161 /**
|
|
3162 * Path constant that represents a "line to" operation (value is 2).
|
|
3163 *
|
|
3164 * @since 3.1
|
|
3165 */
|
|
3166 public static const int PATH_LINE_TO = 2;
|
|
3167
|
|
3168 /**
|
|
3169 * Path constant that represents a "quadratic curve to" operation (value is 3).
|
|
3170 *
|
|
3171 * @since 3.1
|
|
3172 */
|
|
3173 public static const int PATH_QUAD_TO = 3;
|
|
3174
|
|
3175 /**
|
|
3176 * Path constant that represents a "cubic curve to" operation (value is 4).
|
|
3177 *
|
|
3178 * @since 3.1
|
|
3179 */
|
|
3180 public static const int PATH_CUBIC_TO = 4;
|
|
3181
|
|
3182 /**
|
|
3183 * Path constant that represents a "close" operation (value is 5).
|
|
3184 *
|
|
3185 * @since 3.1
|
|
3186 */
|
|
3187 public static const int PATH_CLOSE = 5;
|
|
3188
|
|
3189 /**
|
|
3190 * Even odd rule for filling operations (value is 1).
|
|
3191 *
|
|
3192 * @since 3.1
|
|
3193 */
|
|
3194 public static const int FILL_EVEN_ODD = 1;
|
|
3195
|
|
3196 /**
|
|
3197 * Winding rule for filling operations (value is 2).
|
|
3198 *
|
|
3199 * @since 3.1
|
|
3200 */
|
|
3201 public static const int FILL_WINDING = 2;
|
|
3202
|
|
3203 /**
|
|
3204 * Image format constant indicating an unknown image type (value is -1).
|
|
3205 */
|
|
3206 public static const int IMAGE_UNDEFINED = -1;
|
|
3207
|
|
3208 /**
|
|
3209 * Image format constant indicating a Windows BMP format image (value is 0).
|
|
3210 */
|
|
3211 public static const int IMAGE_BMP = 0;
|
|
3212
|
|
3213 /**
|
|
3214 * Image format constant indicating a run-length encoded
|
|
3215 * Windows BMP format image (value is 1).
|
|
3216 */
|
|
3217 public static const int IMAGE_BMP_RLE = 1;
|
|
3218
|
|
3219 /**
|
|
3220 * Image format constant indicating a GIF format image (value is 2).
|
|
3221 */
|
|
3222 public static const int IMAGE_GIF = 2;
|
|
3223
|
|
3224 /**
|
|
3225 * Image format constant indicating a ICO format image (value is 3).
|
|
3226 */
|
|
3227 public static const int IMAGE_ICO = 3;
|
|
3228
|
|
3229 /**
|
|
3230 * Image format constant indicating a JPEG format image (value is 4).
|
|
3231 */
|
|
3232 public static const int IMAGE_JPEG = 4;
|
|
3233
|
|
3234 /**
|
|
3235 * Image format constant indicating a PNG format image (value is 5).
|
|
3236 */
|
|
3237 public static const int IMAGE_PNG = 5;
|
|
3238
|
|
3239 /**
|
|
3240 * Image format constant indicating a TIFF format image (value is 6).
|
|
3241 */
|
|
3242 public static const int IMAGE_TIFF = 6;
|
|
3243
|
|
3244 /**
|
|
3245 * Image format constant indicating an OS/2 BMP format image (value is 7).
|
|
3246 */
|
|
3247 public static const int IMAGE_OS2_BMP = 7;
|
|
3248
|
|
3249 /**
|
|
3250 * GIF image disposal method constants indicating that the
|
|
3251 * disposal method is unspecified (value is 0).
|
|
3252 */
|
|
3253 public static const int DM_UNSPECIFIED = 0x0;
|
|
3254
|
|
3255 /**
|
|
3256 * GIF image disposal method constants indicating that the
|
|
3257 * disposal method is to do nothing; that is, to leave the
|
|
3258 * previous image in place (value is 1).
|
|
3259 */
|
|
3260 public static const int DM_FILL_NONE = 0x1;
|
|
3261
|
|
3262 /**
|
|
3263 * GIF image disposal method constants indicating that the
|
|
3264 * the previous images should be covered with the background
|
|
3265 * color before displaying the next image (value is 2).
|
|
3266 */
|
|
3267 public static const int DM_FILL_BACKGROUND = 0x2;
|
|
3268
|
|
3269 /**
|
|
3270 * GIF image disposal method constants indicating that the
|
|
3271 * disposal method is to restore the previous picture
|
|
3272 * (value is 3).
|
|
3273 */
|
|
3274 public static const int DM_FILL_PREVIOUS = 0x3;
|
|
3275
|
|
3276 /**
|
|
3277 * Image transparency constant indicating that the image
|
|
3278 * contains no transparency information (value is 0).
|
|
3279 */
|
|
3280 public static const int TRANSPARENCY_NONE = 0x0;
|
|
3281
|
|
3282 /**
|
|
3283 * Image transparency constant indicating that the image
|
|
3284 * contains alpha transparency information (value is 1<<0).
|
|
3285 */
|
|
3286 public static const int TRANSPARENCY_ALPHA = 1 << 0;
|
|
3287
|
|
3288 /**
|
|
3289 * Image transparency constant indicating that the image
|
|
3290 * contains a transparency mask (value is 1<<1).
|
|
3291 */
|
|
3292 public static const int TRANSPARENCY_MASK = 1 << 1;
|
|
3293
|
|
3294 /**
|
|
3295 * Image transparency constant indicating that the image
|
|
3296 * contains a transparent pixel (value is 1<<2).
|
|
3297 */
|
|
3298 public static const int TRANSPARENCY_PIXEL = 1 << 2;
|
|
3299
|
|
3300 /**
|
|
3301 * The character movement type (value is 1<<0).
|
|
3302 * This constant is used to move a text offset over a character.
|
|
3303 *
|
|
3304 * @see dwt.graphics.TextLayout#getNextOffset(int, int)
|
|
3305 * @see dwt.graphics.TextLayout#getPreviousOffset(int, int)
|
|
3306 *
|
|
3307 * @since 3.0
|
|
3308 */
|
|
3309 public static const int MOVEMENT_CHAR = 1 << 0;
|
|
3310
|
|
3311 /**
|
|
3312 * The cluster movement type (value is 1<<1).
|
|
3313 * This constant is used to move a text offset over a cluster.
|
|
3314 * A cluster groups one or more characters. A cluster is
|
|
3315 * undivisible, this means that a caret offset can not be placed in the
|
|
3316 * middle of a cluster.
|
|
3317 *
|
|
3318 * @see dwt.graphics.TextLayout#getNextOffset(int, int)
|
|
3319 * @see dwt.graphics.TextLayout#getPreviousOffset(int, int)
|
|
3320 *
|
|
3321 * @since 3.0
|
|
3322 */
|
|
3323 public static const int MOVEMENT_CLUSTER = 1 << 1;
|
|
3324
|
|
3325 /**
|
|
3326 * The word movement type (value is 1<<2).
|
|
3327 * This constant is used to move a text offset over a word.
|
|
3328 * The behavior of this constant depends on the platform and on the
|
|
3329 * direction of the movement. For example, on Windows the stop is
|
|
3330 * always at the start of the word. On GTK and Mac the stop is at the end
|
|
3331 * of the word if the direction is next and at the start of the word if the
|
|
3332 * direction is previous.
|
|
3333 *
|
|
3334 * @see dwt.graphics.TextLayout#getNextOffset(int, int)
|
|
3335 * @see dwt.graphics.TextLayout#getPreviousOffset(int, int)
|
|
3336 *
|
|
3337 * @since 3.0
|
|
3338 */
|
|
3339 public static const int MOVEMENT_WORD = 1 << 2;
|
|
3340
|
|
3341 /**
|
|
3342 * The word end movement type (value is 1<<3).
|
|
3343 * This constant is used to move a text offset to the next or previous
|
|
3344 * word end. The behavior of this constant does not depend on the platform.
|
|
3345 *
|
|
3346 *
|
|
3347 * @see dwt.graphics.TextLayout#getNextOffset(int, int)
|
|
3348 * @see dwt.graphics.TextLayout#getPreviousOffset(int, int)
|
|
3349 *
|
|
3350 * @since 3.3
|
|
3351 */
|
|
3352 public static const int MOVEMENT_WORD_END = 1 << 3;
|
|
3353
|
|
3354 /**
|
|
3355 * The word start movement type (value is 1<<4).
|
|
3356 * This constant is used to move a text offset to the next or previous
|
|
3357 * word start. The behavior of this constant does not depend on the platform.
|
|
3358 *
|
|
3359 * @see dwt.graphics.TextLayout#getNextOffset(int, int)
|
|
3360 * @see dwt.graphics.TextLayout#getPreviousOffset(int, int)
|
|
3361 *
|
|
3362 * @since 3.3
|
|
3363 */
|
|
3364 public static const int MOVEMENT_WORD_START = 1 << 4;
|
|
3365
|
|
3366
|
|
3367 /**
|
|
3368 * Answers a concise, human readable description of the error code.
|
|
3369 *
|
|
3370 * @param code the DWT error code.
|
|
3371 * @return a description of the error code.
|
|
3372 *
|
|
3373 * @see DWT
|
|
3374 */
|
|
3375 static char[] findErrorText (int code) {
|
|
3376 switch (code) {
|
|
3377 case ERROR_UNSPECIFIED: return "Unspecified error"; //$NON-NLS-1$
|
|
3378 case ERROR_NO_HANDLES: return "No more handles"; //$NON-NLS-1$
|
|
3379 case ERROR_NO_MORE_CALLBACKS: return "No more callbacks"; //$NON-NLS-1$
|
|
3380 case ERROR_NULL_ARGUMENT: return "Argument cannot be null"; //$NON-NLS-1$
|
|
3381 case ERROR_INVALID_ARGUMENT: return "Argument not valid"; //$NON-NLS-1$
|
|
3382 case ERROR_INVALID_RANGE: return "Index out of bounds"; //$NON-NLS-1$
|
|
3383 case ERROR_CANNOT_BE_ZERO: return "Argument cannot be zero"; //$NON-NLS-1$
|
|
3384 case ERROR_CANNOT_GET_ITEM: return "Cannot get item"; //$NON-NLS-1$
|
|
3385 case ERROR_CANNOT_GET_SELECTION: return "Cannot get selection"; //$NON-NLS-1$
|
|
3386 case ERROR_CANNOT_GET_ITEM_HEIGHT: return "Cannot get item height"; //$NON-NLS-1$
|
|
3387 case ERROR_CANNOT_GET_TEXT: return "Cannot get text"; //$NON-NLS-1$
|
|
3388 case ERROR_CANNOT_SET_TEXT: return "Cannot set text"; //$NON-NLS-1$
|
|
3389 case ERROR_ITEM_NOT_ADDED: return "Item not added"; //$NON-NLS-1$
|
|
3390 case ERROR_ITEM_NOT_REMOVED: return "Item not removed"; //$NON-NLS-1$
|
|
3391 case ERROR_NOT_IMPLEMENTED: return "Not implemented"; //$NON-NLS-1$
|
|
3392 case ERROR_MENU_NOT_DROP_DOWN: return "Menu must be a drop down"; //$NON-NLS-1$
|
|
3393 case ERROR_THREAD_INVALID_ACCESS: return "Invalid thread access"; //$NON-NLS-1$
|
|
3394 case ERROR_WIDGET_DISPOSED: return "Widget is disposed"; //$NON-NLS-1$
|
|
3395 case ERROR_MENUITEM_NOT_CASCADE: return "Menu item is not a CASCADE"; //$NON-NLS-1$
|
|
3396 case ERROR_CANNOT_SET_SELECTION: return "Cannot set selection"; //$NON-NLS-1$
|
|
3397 case ERROR_CANNOT_SET_MENU: return "Cannot set menu"; //$NON-NLS-1$
|
|
3398 case ERROR_CANNOT_SET_ENABLED: return "Cannot set the enabled state"; //$NON-NLS-1$
|
|
3399 case ERROR_CANNOT_GET_ENABLED: return "Cannot get the enabled state"; //$NON-NLS-1$
|
|
3400 case ERROR_INVALID_PARENT: return "Widget has the wrong parent"; //$NON-NLS-1$
|
|
3401 case ERROR_MENU_NOT_BAR: return "Menu is not a BAR"; //$NON-NLS-1$
|
|
3402 case ERROR_CANNOT_GET_COUNT: return "Cannot get count"; //$NON-NLS-1$
|
|
3403 case ERROR_MENU_NOT_POP_UP: return "Menu is not a POP_UP"; //$NON-NLS-1$
|
|
3404 case ERROR_UNSUPPORTED_DEPTH: return "Unsupported color depth"; //$NON-NLS-1$
|
|
3405 case ERROR_IO: return "i/o error"; //$NON-NLS-1$
|
|
3406 case ERROR_INVALID_IMAGE: return "Invalid image"; //$NON-NLS-1$
|
|
3407 case ERROR_UNSUPPORTED_FORMAT: return "Unsupported or unrecognized format"; //$NON-NLS-1$
|
|
3408 case ERROR_INVALID_SUBCLASS: return "Subclassing not allowed"; //$NON-NLS-1$
|
|
3409 case ERROR_GRAPHIC_DISPOSED: return "Graphic is disposed"; //$NON-NLS-1$
|
|
3410 case ERROR_DEVICE_DISPOSED: return "Device is disposed"; //$NON-NLS-1$
|
|
3411 case ERROR_FAILED_EXEC: return "Failed to execute runnable"; //$NON-NLS-1$
|
|
3412 case ERROR_FAILED_LOAD_LIBRARY: return "Unable to load library"; //$NON-NLS-1$
|
|
3413 case ERROR_CANNOT_INVERT_MATRIX: return "Cannot invert matrix"; //$NON-NLS-1$
|
|
3414 case ERROR_NO_GRAPHICS_LIBRARY: return "Unable to load graphics library"; //$NON-NLS-1$
|
|
3415 case ERROR_INVALID_FONT: return "Font not valid"; //$NON-NLS-1$
|
|
3416 default:
|
|
3417 }
|
|
3418 return "Unknown error"; //$NON-NLS-1$
|
|
3419 }
|
|
3420
|
|
3421 /**
|
|
3422 * Returns the NLS'ed message for the given argument.
|
|
3423 *
|
|
3424 * @param key the key to look up
|
|
3425 * @return the message for the given key
|
|
3426 *
|
|
3427 * @exception IllegalArgumentException <ul>
|
|
3428 * <li>ERROR_NULL_ARGUMENT - if the key is null</li>
|
|
3429 * </ul>
|
|
3430 */
|
|
3431 public static char[] getMessage(char[] key) {
|
|
3432 return Compatibility.getMessage(key);
|
|
3433 }
|
|
3434
|
|
3435 /**
|
|
3436 * Returns the DWT platform name.
|
|
3437 * Examples: "win32", "motif", "gtk", "photon", "carbon"
|
|
3438 *
|
|
3439 * @return the DWT platform name
|
|
3440 */
|
|
3441 public static char[] getPlatform () {
|
|
3442 return Platform.PLATFORM;
|
|
3443 }
|
|
3444
|
|
3445 /**
|
|
3446 * Returns the DWT version number as an integer.
|
|
3447 * Example: "SWT051" is 51
|
|
3448 *
|
|
3449 * @return the DWT version number
|
|
3450 */
|
|
3451 public static int getVersion () {
|
|
3452 return Library.SWT_VERSION;
|
|
3453 }
|
|
3454
|
|
3455 /**
|
|
3456 * Throws an appropriate exception based on the passed in error code.
|
|
3457 *
|
|
3458 * @param code the DWT error code
|
|
3459 */
|
|
3460 public static void error (int code) {
|
|
3461 error (code, null);
|
|
3462 }
|
|
3463
|
|
3464 /**
|
|
3465 * Throws an appropriate exception based on the passed in error code.
|
|
3466 * The <code>throwable</code> argument should be either null, or the
|
|
3467 * throwable which caused DWT to throw an exception.
|
|
3468 * <p>
|
|
3469 * In DWT, errors are reported by throwing one of three exceptions:
|
|
3470 * <dl>
|
|
3471 * <dd>java.lang.IllegalArgumentException</dd>
|
|
3472 * <dt>thrown whenever one of the API methods is invoked with an illegal argument</dt>
|
|
3473 * <dd>org.eclipse.swt.DWTException (extends java.lang.RuntimeException)</dd>
|
|
3474 * <dt>thrown whenever a recoverable error happens internally in DWT</dt>
|
|
3475 * <dd>org.eclipse.swt.DWTError (extends java.lang.Error)</dd>
|
|
3476 * <dt>thrown whenever a <b>non-recoverable</b> error happens internally in DWT</dt>
|
|
3477 * </dl>
|
|
3478 * This method provides the logic which maps between error codes
|
|
3479 * and one of the above exceptions.
|
|
3480 * </p>
|
|
3481 *
|
|
3482 * @param code the DWT error code.
|
|
3483 * @param throwable the exception which caused the error to occur.
|
|
3484 *
|
|
3485 * @see DWTError
|
|
3486 * @see DWTException
|
|
3487 * @see IllegalArgumentException
|
|
3488 */
|
|
3489 public static void error (int code, TracedException throwable) {
|
|
3490 error (code, throwable, null);
|
|
3491 }
|
|
3492
|
|
3493 /**
|
|
3494 * Throws an appropriate exception based on the passed in error code.
|
|
3495 * The <code>throwable</code> argument should be either null, or the
|
|
3496 * throwable which caused DWT to throw an exception.
|
|
3497 * <p>
|
|
3498 * In DWT, errors are reported by throwing one of three exceptions:
|
|
3499 * <dl>
|
|
3500 * <dd>java.lang.IllegalArgumentException</dd>
|
|
3501 * <dt>thrown whenever one of the API methods is invoked with an illegal argument</dt>
|
|
3502 * <dd>org.eclipse.swt.DWTException (extends java.lang.RuntimeException)</dd>
|
|
3503 * <dt>thrown whenever a recoverable error happens internally in DWT</dt>
|
|
3504 * <dd>org.eclipse.swt.DWTError (extends java.lang.Error)</dd>
|
|
3505 * <dt>thrown whenever a <b>non-recoverable</b> error happens internally in DWT</dt>
|
|
3506 * </dl>
|
|
3507 * This method provides the logic which maps between error codes
|
|
3508 * and one of the above exceptions.
|
|
3509 * </p>
|
|
3510 *
|
|
3511 * @param code the DWT error code.
|
|
3512 * @param throwable the exception which caused the error to occur.
|
|
3513 * @param detail more information about error.
|
|
3514 *
|
|
3515 * @see DWTError
|
|
3516 * @see DWTException
|
|
3517 * @see IllegalArgumentException
|
|
3518 *
|
|
3519 * @since 3.0
|
|
3520 */
|
|
3521 public static void error (int code, TracedException throwable, char[] detail) {
|
|
3522
|
|
3523 /*
|
|
3524 * This code prevents the creation of "chains" of SWTErrors and
|
|
3525 * SWTExceptions which in turn contain other SWTErrors and
|
|
3526 * SWTExceptions as their throwable. This can occur when low level
|
|
3527 * code throws an exception past a point where a higher layer is
|
|
3528 * being "safe" and catching all exceptions. (Note that, this is
|
|
3529 * _a_bad_thing_ which we always try to avoid.)
|
|
3530 *
|
|
3531 * On the theory that the low level code is closest to the
|
|
3532 * original problem, we simply re-throw the original exception here.
|
|
3533 *
|
|
3534 * NOTE: Exceptions thrown in syncExec and asyncExec must be
|
|
3535 * wrapped.
|
|
3536 */
|
|
3537 if (code !is DWT.ERROR_FAILED_EXEC) {
|
|
3538 if (auto t = cast(DWTError)throwable ) throw t;
|
|
3539 if (auto t = cast(DWTException)throwable ) throw t;
|
|
3540 }
|
|
3541
|
|
3542 char[] message = findErrorText (code);
|
|
3543 if (detail != null) message ~= detail;
|
|
3544 switch (code) {
|
|
3545
|
|
3546 /* Illegal Arguments (non-fatal) */
|
|
3547 case ERROR_NULL_ARGUMENT:
|
|
3548 case ERROR_CANNOT_BE_ZERO:
|
|
3549 case ERROR_INVALID_ARGUMENT:
|
|
3550 case ERROR_MENU_NOT_BAR:
|
|
3551 case ERROR_MENU_NOT_DROP_DOWN:
|
|
3552 case ERROR_MENU_NOT_POP_UP:
|
|
3553 case ERROR_MENUITEM_NOT_CASCADE:
|
|
3554 case ERROR_INVALID_PARENT:
|
|
3555 case ERROR_INVALID_RANGE: {
|
|
3556 throw new IllegalArgumentException (message);
|
|
3557 }
|
|
3558
|
|
3559 /* DWT Exceptions (non-fatal) */
|
|
3560 case ERROR_INVALID_SUBCLASS:
|
|
3561 case ERROR_THREAD_INVALID_ACCESS:
|
|
3562 case ERROR_WIDGET_DISPOSED:
|
|
3563 case ERROR_GRAPHIC_DISPOSED:
|
|
3564 case ERROR_DEVICE_DISPOSED:
|
|
3565 case ERROR_INVALID_IMAGE:
|
|
3566 case ERROR_UNSUPPORTED_DEPTH:
|
|
3567 case ERROR_UNSUPPORTED_FORMAT:
|
|
3568 case ERROR_FAILED_EXEC:
|
|
3569 case ERROR_CANNOT_INVERT_MATRIX:
|
|
3570 case ERROR_NO_GRAPHICS_LIBRARY:
|
|
3571 case ERROR_IO: {
|
|
3572 auto exception = new DWTException (code, message);
|
|
3573 exception.throwable = throwable;
|
|
3574 throw exception;
|
|
3575 }
|
|
3576
|
|
3577 /* Operation System Errors (fatal, may occur only on some platforms) */
|
|
3578 case ERROR_CANNOT_GET_COUNT:
|
|
3579 case ERROR_CANNOT_GET_ENABLED:
|
|
3580 case ERROR_CANNOT_GET_ITEM:
|
|
3581 case ERROR_CANNOT_GET_ITEM_HEIGHT:
|
|
3582 case ERROR_CANNOT_GET_SELECTION:
|
|
3583 case ERROR_CANNOT_GET_TEXT:
|
|
3584 case ERROR_CANNOT_SET_ENABLED:
|
|
3585 case ERROR_CANNOT_SET_MENU:
|
|
3586 case ERROR_CANNOT_SET_SELECTION:
|
|
3587 case ERROR_CANNOT_SET_TEXT:
|
|
3588 case ERROR_ITEM_NOT_ADDED:
|
|
3589 case ERROR_ITEM_NOT_REMOVED:
|
|
3590 case ERROR_NO_HANDLES:
|
|
3591 //FALL THROUGH
|
|
3592
|
|
3593 /* DWT Errors (fatal, may occur only on some platforms) */
|
|
3594 case ERROR_FAILED_LOAD_LIBRARY:
|
|
3595 case ERROR_NO_MORE_CALLBACKS:
|
|
3596 case ERROR_NOT_IMPLEMENTED:
|
|
3597 case ERROR_UNSPECIFIED: {
|
|
3598 auto error = new DWTError (code, message);
|
|
3599 error.throwable = throwable;
|
|
3600 throw error;
|
|
3601 }
|
|
3602 default:
|
|
3603 }
|
|
3604
|
|
3605 /* Unknown/Undefined Error */
|
|
3606 DWTError error = new DWTError (code, message);
|
|
3607 error.throwable = throwable;
|
|
3608 throw error;
|
|
3609 }
|
|
3610
|
|
3611 /+
|
|
3612 static {
|
|
3613 /*
|
|
3614 * These values represent bit masks that may need to
|
|
3615 * expand in the future. Therefore they are not initialized
|
|
3616 * in the declaration to stop the compiler from inlining.
|
|
3617 */
|
|
3618 BUTTON_MASK = BUTTON1 | BUTTON2 | BUTTON3 | BUTTON4 | BUTTON5;
|
|
3619 MODIFIER_MASK = ALT | SHIFT | CTRL | COMMAND;
|
|
3620
|
|
3621 /*
|
|
3622 * These values can be different on different platforms.
|
|
3623 * Therefore they are not initialized in the declaration
|
|
3624 * to stop the compiler from inlining.
|
|
3625 */
|
|
3626 char[] platform = getPlatform ();
|
|
3627 if ("carbon".equals (platform)) { //$NON-NLS-1$
|
|
3628 MOD1 = COMMAND;
|
|
3629 MOD2 = SHIFT;
|
|
3630 MOD3 = ALT;
|
|
3631 MOD4 = CONTROL;
|
|
3632 } else {
|
|
3633 MOD1 = CONTROL;
|
|
3634 MOD2 = SHIFT;
|
|
3635 MOD3 = ALT;
|
|
3636 MOD4 = 0;
|
|
3637 }
|
|
3638 }
|
|
3639 +/
|
|
3640
|
|
3641 }
|