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