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