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