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