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