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