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