| 1 |
/******************************************************************************* |
|---|
| 2 |
* Copyright (c) 2000, 2004 IBM Corporation and others. |
|---|
| 3 |
* All rights reserved. This program and the accompanying materials |
|---|
| 4 |
* are made available under the terms of the Common Public License v1.0 |
|---|
| 5 |
* which accompanies this distribution, and is available at |
|---|
| 6 |
* http://www.eclipse.org/legal/cpl-v10.html |
|---|
| 7 |
* |
|---|
| 8 |
* Contributors: |
|---|
| 9 |
* IBM Corporation - initial API and implementation |
|---|
| 10 |
*******************************************************************************/ |
|---|
| 11 |
module swt.swt; |
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
public import std.math2; |
|---|
| 16 |
public import std.thread; |
|---|
| 17 |
public import std.string; |
|---|
| 18 |
public import std.conv; |
|---|
| 19 |
public import std.utf; |
|---|
| 20 |
public import std.math; |
|---|
| 21 |
public import std.file; |
|---|
| 22 |
public import std.stdio; |
|---|
| 23 |
public import std.stream; |
|---|
| 24 |
|
|---|
| 25 |
public alias char[] String; |
|---|
| 26 |
|
|---|
| 27 |
// for temp use, since D can't cast int to bool implicitly |
|---|
| 28 |
public alias int BOOL; |
|---|
| 29 |
|
|---|
| 30 |
public alias std.string.toString ITOA; |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
private import swt.util.util; |
|---|
| 34 |
private import swt.internal.library; |
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
/** |
|---|
| 38 |
* This class provides access to a small number of SWT system-wide |
|---|
| 39 |
* methods, and in addition defines the public constants provided |
|---|
| 40 |
* by SWT. |
|---|
| 41 |
* <p> |
|---|
| 42 |
* By defining constants like UP and DOWN in a single class, SWT |
|---|
| 43 |
* can share common names and concepts at the same time minimizing |
|---|
| 44 |
* the number of classes, names and constants for the application |
|---|
| 45 |
* programmer. |
|---|
| 46 |
* </p><p> |
|---|
| 47 |
* Note that some of the constants provided by this class represent |
|---|
| 48 |
* optional, appearance related aspects of widgets which are available |
|---|
| 49 |
* either only on some window systems, or for a differing set of |
|---|
| 50 |
* widgets on each window system. These constants are marked |
|---|
| 51 |
* as <em>HINT</em>s. The set of widgets which support a particular |
|---|
| 52 |
* <em>HINT</em> may change from release to release, although we typically |
|---|
| 53 |
* will not withdraw support for a <em>HINT</em> once it is made available. |
|---|
| 54 |
* </p> |
|---|
| 55 |
*/ |
|---|
| 56 |
|
|---|
| 57 |
/* NOTE: |
|---|
| 58 |
* Good javadoc coding style is to put the values of static final |
|---|
| 59 |
* constants in the comments. This reinforces the fact that |
|---|
| 60 |
* consumers are allowed to rely on the value (and they must |
|---|
| 61 |
* since the values are compiled inline in their code). We |
|---|
| 62 |
* can <em>not</em> change the values of these constants between |
|---|
| 63 |
* releases. |
|---|
| 64 |
*/ |
|---|
| 65 |
public class SWT { |
|---|
| 66 |
|
|---|
| 67 |
/* Initialize the class */ |
|---|
| 68 |
// static { |
|---|
| 69 |
// /* NOTE: the static initialization is at the end of file */ |
|---|
| 70 |
// } |
|---|
| 71 |
|
|---|
| 72 |
/* Widget Event Constants */ |
|---|
| 73 |
|
|---|
| 74 |
/** |
|---|
| 75 |
* The null event type (value is 0). |
|---|
| 76 |
* |
|---|
| 77 |
* @since 3.0 |
|---|
| 78 |
*/ |
|---|
| 79 |
public static const int None = 0; |
|---|
| 80 |
|
|---|
| 81 |
/** |
|---|
| 82 |
* The key down event type (value is 1). |
|---|
| 83 |
*/ |
|---|
| 84 |
public static const int KeyDown = 1; |
|---|
| 85 |
|
|---|
| 86 |
/** |
|---|
| 87 |
* The key up event type (value is 2). |
|---|
| 88 |
*/ |
|---|
| 89 |
public static const int KeyUp = 2; |
|---|
| 90 |
|
|---|
| 91 |
/** |
|---|
| 92 |
* mouse down event type (value is 3) |
|---|
| 93 |
*/ |
|---|
| 94 |
public static const int MouseDown = 3; |
|---|
| 95 |
|
|---|
| 96 |
/** |
|---|
| 97 |
* The mouse up event type (value is 4). |
|---|
| 98 |
*/ |
|---|
| 99 |
public static const int MouseUp = 4; |
|---|
| 100 |
|
|---|
| 101 |
/** |
|---|
| 102 |
* The mouse move event type (value is 5). |
|---|
| 103 |
*/ |
|---|
| 104 |
public static const int MouseMove = 5; |
|---|
| 105 |
|
|---|
| 106 |
/** |
|---|
| 107 |
* The mouse enter event type (value is 6). |
|---|
| 108 |
*/ |
|---|
| 109 |
public static const int MouseEnter = 6; |
|---|
| 110 |
|
|---|
| 111 |
/** |
|---|
| 112 |
* The mouse exit event type (value is 7). |
|---|
| 113 |
*/ |
|---|
| 114 |
public static const int MouseExit = 7; |
|---|
| 115 |
|
|---|
| 116 |
/** |
|---|
| 117 |
* The mouse double click event type (value is 8). |
|---|
| 118 |
*/ |
|---|
| 119 |
public static const int MouseDoubleClick = 8; |
|---|
| 120 |
|
|---|
| 121 |
/** |
|---|
| 122 |
* The paint event type (value is 9). |
|---|
| 123 |
*/ |
|---|
| 124 |
public static const int Paint = 9; |
|---|
| 125 |
|
|---|
| 126 |
/** |
|---|
| 127 |
* The move event type (value is 10). |
|---|
| 128 |
*/ |
|---|
| 129 |
public static const int Move = 10; |
|---|
| 130 |
|
|---|
| 131 |
/** |
|---|
| 132 |
* The resize event type (value is 11). |
|---|
| 133 |
*/ |
|---|
| 134 |
public static const int Resize = 11; |
|---|
| 135 |
|
|---|
| 136 |
/** |
|---|
| 137 |
* The dispose event type (value is 12). |
|---|
| 138 |
*/ |
|---|
| 139 |
public static const int Dispose = 12; |
|---|
| 140 |
|
|---|
| 141 |
/** |
|---|
| 142 |
* The selection event type (value is 13). |
|---|
| 143 |
*/ |
|---|
| 144 |
public static const int Selection = 13; |
|---|
| 145 |
|
|---|
| 146 |
/** |
|---|
| 147 |
* The default selection event type (value is 14). |
|---|
| 148 |
*/ |
|---|
| 149 |
public static const int DefaultSelection = 14; |
|---|
| 150 |
|
|---|
| 151 |
/** |
|---|
| 152 |
* The focus in event type (value is 15). |
|---|
| 153 |
*/ |
|---|
| 154 |
public static const int FocusIn = 15; |
|---|
| 155 |
|
|---|
| 156 |
/** |
|---|
| 157 |
* The focus out event type (value is 16). |
|---|
| 158 |
*/ |
|---|
| 159 |
public static const int FocusOut = 16; |
|---|
| 160 |
|
|---|
| 161 |
/** |
|---|
| 162 |
* The expand event type (value is 17). |
|---|
| 163 |
*/ |
|---|
| 164 |
public static const int Expand = 17; |
|---|
| 165 |
|
|---|
| 166 |
/** |
|---|
| 167 |
* The collapse event type (value is 18). |
|---|
| 168 |
*/ |
|---|
| 169 |
public static const int Collapse = 18; |
|---|
| 170 |
|
|---|
| 171 |
/** |
|---|
| 172 |
* The iconify event type (value is 19). |
|---|
| 173 |
*/ |
|---|
| 174 |
public static const int Iconify = 19; |
|---|
| 175 |
|
|---|
| 176 |
/** |
|---|
| 177 |
* The de-iconify event type (value is 20). |
|---|
| 178 |
*/ |
|---|
| 179 |
public static const int Deiconify = 20; |
|---|
| 180 |
|
|---|
| 181 |
/** |
|---|
| 182 |
* The close event type (value is 21). |
|---|
| 183 |
*/ |
|---|
| 184 |
public static const int Close = 21; |
|---|
| 185 |
|
|---|
| 186 |
/** |
|---|
| 187 |
* The show event type (value is 22). |
|---|
| 188 |
*/ |
|---|
| 189 |
public static const int Show = 22; |
|---|
| 190 |
|
|---|
| 191 |
/** |
|---|
| 192 |
* The hide event type (value is 23). |
|---|
| 193 |
*/ |
|---|
| 194 |
public static const int Hide = 23; |
|---|
| 195 |
|
|---|
| 196 |
/** |
|---|
| 197 |
* The modify event type (value is 24). |
|---|
| 198 |
*/ |
|---|
| 199 |
public static const int Modify = 24; |
|---|
| 200 |
|
|---|
| 201 |
/** |
|---|
| 202 |
* The verify event type (value is 25). |
|---|
| 203 |
*/ |
|---|
| 204 |
public static const int Verify = 25; |
|---|
| 205 |
|
|---|
| 206 |
/** |
|---|
| 207 |
* The activate event type (value is 26). |
|---|
| 208 |
*/ |
|---|
| 209 |
public static const int Activate = 26; |
|---|
| 210 |
|
|---|
| 211 |
/** |
|---|
| 212 |
* The deactivate event type (value is 27). |
|---|
| 213 |
*/ |
|---|
| 214 |
public static const int Deactivate = 27; |
|---|
| 215 |
|
|---|
| 216 |
/** |
|---|
| 217 |
* The help event type (value is 28). |
|---|
| 218 |
*/ |
|---|
| 219 |
public static const int Help = 28; |
|---|
| 220 |
|
|---|
| 221 |
/** |
|---|
| 222 |
* The drag detect event type (value is 29). |
|---|
| 223 |
*/ |
|---|
| 224 |
public static const int DragDetect = 29; |
|---|
| 225 |
|
|---|
| 226 |
/** |
|---|
| 227 |
* The arm event type (value is 30). |
|---|
| 228 |
*/ |
|---|
| 229 |
public static const int Arm = 30; |
|---|
| 230 |
|
|---|
| 231 |
/** |
|---|
| 232 |
* The traverse event type (value is 31). |
|---|
| 233 |
*/ |
|---|
| 234 |
public static const int Traverse = 31; |
|---|
| 235 |
|
|---|
| 236 |
/** |
|---|
| 237 |
* The mouse hover event type (value is 32). |
|---|
| 238 |
*/ |
|---|
| 239 |
public static const int MouseHover = 32; |
|---|
| 240 |
|
|---|
| 241 |
/** |
|---|
| 242 |
* The hardware key down event type (value is 33). |
|---|
| 243 |
*/ |
|---|
| 244 |
public static const int HardKeyDown = 33; |
|---|
| 245 |
|
|---|
| 246 |
/** |
|---|
| 247 |
* The hardware key up event type (value is 34). |
|---|
| 248 |
*/ |
|---|
| 249 |
public static const int HardKeyUp = 34; |
|---|
| 250 |
|
|---|
| 251 |
/** |
|---|
| 252 |
* The menu detect event type (value is 35). |
|---|
| 253 |
* |
|---|
| 254 |
* @since 3.0 |
|---|
| 255 |
*/ |
|---|
| 256 |
public static const int MenuDetect = 35; |
|---|
| 257 |
|
|---|
| 258 |
/** |
|---|
| 259 |
* The set data event type (value is 36). |
|---|
| 260 |
* |
|---|
| 261 |
* @since 3.0 |
|---|
| 262 |
*/ |
|---|
| 263 |
public static const int SetData = 36; |
|---|
| 264 |
|
|---|
| 265 |
/* Event Details */ |
|---|
| 266 |
|
|---|
| 267 |
/** |
|---|
| 268 |
* A constant known to be zero (0), used in operations which |
|---|
| 269 |
* take bit flags to indicate that "no bits are set". |
|---|
| 270 |
*/ |
|---|
| 271 |
public static const int NONE = 0; |
|---|
| 272 |
|
|---|
| 273 |
/** |
|---|
| 274 |
* Indicates that a user-interface component is being dragged, |
|---|
| 275 |
* for example dragging the thumb of a scroll bar (value is 1). |
|---|
| 276 |
*/ |
|---|
| 277 |
public static const int DRAG = 1; |
|---|
| 278 |
|
|---|
| 279 |
/** |
|---|
| 280 |
* A constant known to be zero (0), used in operations which |
|---|
| 281 |
* take pointers to indicate a null argument. |
|---|
| 282 |
*/ |
|---|
| 283 |
public static const int NULL = 0; |
|---|
| 284 |
|
|---|
| 285 |
/** |
|---|
| 286 |
* Indicates that a default should be used (value is -1). |
|---|
| 287 |
*/ |
|---|
| 288 |
public static const int DEFAULT = -1; |
|---|
| 289 |
|
|---|
| 290 |
/** |
|---|
| 291 |
* Style constant for menu bar behavior (value is 1<<1). |
|---|
| 292 |
* <p><b>Used By:</b><ul> |
|---|
| 293 |
* <li><code>Menu</code></li> |
|---|
| 294 |
* </ul></p> |
|---|
| 295 |
*/ |
|---|
| 296 |
public static const int BAR = 1 << 1; |
|---|
| 297 |
|
|---|
| 298 |
/** |
|---|
| 299 |
* Style constant for drop down menu/list behavior (value is 1<<2). |
|---|
| 300 |
* <p><b>Used By:</b><ul> |
|---|
| 301 |
* <li><code>Menu</code></li> |
|---|
| 302 |
* <li><code>ToolItem</code></li> |
|---|
| 303 |
* <li><code>CoolItem</code></li> |
|---|
| 304 |
* <li><code>Combo</code></li> |
|---|
| 305 |
* </ul></p> |
|---|
| 306 |
*/ |
|---|
| 307 |
public static const int DROP_DOWN = 1 << 2; |
|---|
| 308 |
|
|---|
| 309 |
/** |
|---|
| 310 |
* Style constant for pop up menu behavior (value is 1<<3). |
|---|
| 311 |
* <p><b>Used By:</b><ul> |
|---|
| 312 |
* <li><code>Menu</code></li> |
|---|
| 313 |
* </ul></p> |
|---|
| 314 |
*/ |
|---|
| 315 |
public static const int POP_UP = 1 << 3; |
|---|
| 316 |
|
|---|
| 317 |
/** |
|---|
| 318 |
* Style constant for line separator behavior (value is 1<<1). |
|---|
| 319 |
* <p><b>Used By:</b><ul> |
|---|
| 320 |
* <li><code>Label</code></li> |
|---|
| 321 |
* <li><code>MenuItem</code></li> |
|---|
| 322 |
* <li><code>ToolItem</code></li> |
|---|
| 323 |
* </ul></p> |
|---|
| 324 |
*/ |
|---|
| 325 |
public static const int SEPARATOR = 1 << 1; |
|---|
| 326 |
|
|---|
| 327 |
/** |
|---|
| 328 |
* Style constant for toggle button behavior (value is 1<<1). |
|---|
| 329 |
* <p><b>Used By:</b><ul> |
|---|
| 330 |
* <li><code>Button</code></li> |
|---|
| 331 |
* </ul></p> |
|---|
| 332 |
*/ |
|---|
| 333 |
public static const int TOGGLE = 1 << 1; |
|---|
| 334 |
|
|---|
| 335 |
/** |
|---|
| 336 |
* Style constant for arrow button behavior (value is 1<<2). |
|---|
| 337 |
* <p><b>Used By:</b><ul> |
|---|
| 338 |
* <li><code>Button</code></li> |
|---|
| 339 |
* </ul></p> |
|---|
| 340 |
*/ |
|---|
| 341 |
public static const int ARROW = 1 << 2; |
|---|
| 342 |
|
|---|
| 343 |
/** |
|---|
| 344 |
* Style constant for push button behavior (value is 1<<3). |
|---|
| 345 |
* <p><b>Used By:</b><ul> |
|---|
| 346 |
* <li><code>Button</code></li> |
|---|
| 347 |
* <li><code>MenuItem</code></li> |
|---|
| 348 |
* <li><code>ToolItem</code></li> |
|---|
| 349 |
* </ul></p> |
|---|
| 350 |
*/ |
|---|
| 351 |
public static const int PUSH = 1 << 3; |
|---|
| 352 |
|
|---|
| 353 |
/** |
|---|
| 354 |
* Style constant for radio button behavior (value is 1<<4). |
|---|
| 355 |
* <p><b>Used By:</b><ul> |
|---|
| 356 |
* <li><code>Button</code></li> |
|---|
| 357 |
* <li><code>MenuItem</code></li> |
|---|
| 358 |
* <li><code>ToolItem</code></li> |
|---|
| 359 |
* </ul></p> |
|---|
| 360 |
*/ |
|---|
| 361 |
public static const int RADIO = 1 << 4; |
|---|
| 362 |
|
|---|
| 363 |
/** |
|---|
| 364 |
* Style constant for check box behavior (value is 1<<5). |
|---|
| 365 |
* <p><b>Used By:</b><ul> |
|---|
| 366 |
* <li><code>Button</code></li> |
|---|
| 367 |
* <li><code>MenuItem</code></li> |
|---|
| 368 |
* <li><code>ToolItem</code></li> |
|---|
| 369 |
* <li><code>Table</code></li> |
|---|
| 370 |
* <li><code>Tree</code></li> |
|---|
| 371 |
* </ul></p> |
|---|
| 372 |
*/ |
|---|
| 373 |
public static const int CHECK = 1 << 5; |
|---|
| 374 |
|
|---|
| 375 |
/** |
|---|
| 376 |
* Style constant for cascade behavior (value is 1<<6). |
|---|
| 377 |
* <p><b>Used By:</b><ul> |
|---|
| 378 |
* <li><code>MenuItem</code></li> |
|---|
| 379 |
* </ul></p> |
|---|
| 380 |
*/ |
|---|
| 381 |
public static const int CASCADE = 1 << 6; |
|---|
| 382 |
|
|---|
| 383 |
/** |
|---|
| 384 |
* Style constant for multi-selection behavior in lists |
|---|
| 385 |
* and multiple line support on text fields (value is 1<<1). |
|---|
| 386 |
* <p><b>Used By:</b><ul> |
|---|
| 387 |
* <li><code>Text</code></li> |
|---|
| 388 |
* <li><code>List</code></li> |
|---|
| 389 |
* <li><code>FileDialog</code></li> |
|---|
| 390 |
* </ul></p> |
|---|
| 391 |
*/ |
|---|
| 392 |
public static const int MULTI = 1 << 1; |
|---|
| 393 |
|
|---|
| 394 |
/** |
|---|
| 395 |
* Style constant for single selection behavior in lists |
|---|
| 396 |
* and single line support on text fields (value is 1<<2). |
|---|
| 397 |
* <p><b>Used By:</b><ul> |
|---|
| 398 |
* <li><code>Text</code></li> |
|---|
| 399 |
* <li><code>List</code></li> |
|---|
| 400 |
* <li><code>Table</code></li> |
|---|
| 401 |
* <li><code>Tree</code></li> |
|---|
| 402 |
* </ul></p> |
|---|
| 403 |
*/ |
|---|
| 404 |
public static const int SINGLE = 1 << 2; |
|---|
| 405 |
|
|---|
| 406 |
/** |
|---|
| 407 |
* Style constant for read-only behavior (value is 1<<3). |
|---|
| 408 |
* <p><b>Used By:</b><ul> |
|---|
| 409 |
* <li><code>Combo</code></li> |
|---|
| 410 |
* <li><code>Text</code></li> |
|---|
| 411 |
* </ul></p> |
|---|
| 412 |
*/ |
|---|
| 413 |
public static const int READ_ONLY = 1 << 3; |
|---|
| 414 |
|
|---|
| 415 |
/** |
|---|
| 416 |
* Style constant for automatic line wrap behavior (value is 1<<6). |
|---|
| 417 |
* <p><b>Used By:</b><ul> |
|---|
| 418 |
* <li><code>Label</code></li> |
|---|
| 419 |
* <li><code>Text</code></li> |
|---|
| 420 |
* <li><code>ToolBar</code></li> |
|---|
| 421 |
* </ul></p> |
|---|
| 422 |
*/ |
|---|
| 423 |
public static const int WRAP = 1 << 6; |
|---|
| 424 |
|
|---|
| 425 |
/** |
|---|
| 426 |
* Style constant for simple (not drop down) behavior (value is 1<<6). |
|---|
| 427 |
* <p><b>Used By:</b><ul> |
|---|
| 428 |
* <li><code>Combo</code></li> |
|---|
| 429 |
* </ul></p> |
|---|
| 430 |
*/ |
|---|
| 431 |
public static const int SIMPLE = 1 << 6; |
|---|
| 432 |
|
|---|
| 433 |
/** |
|---|
| 434 |
* Style constant for password behavior (value is 1<<22). |
|---|
| 435 |
* <p><b>Used By:</b><ul> |
|---|
| 436 |
* <li><code>Text</code></li> |
|---|
| 437 |
* </ul></p> |
|---|
| 438 |
* |
|---|
| 439 |
* @since 3.0 |
|---|
| 440 |
*/ |
|---|
| 441 |
public static const int PASSWORD = 1 << 22; |
|---|
| 442 |
|
|---|
| 443 |
/** |
|---|
| 444 |
* Style constant for shadow in behavior (value is 1<<2). |
|---|
| 445 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 446 |
* <p><b>Used By:</b><ul> |
|---|
| 447 |
* <li><code>Label</code></li> |
|---|
| 448 |
* <li><code>Group</code></li> |
|---|
| 449 |
* </ul></p> |
|---|
| 450 |
*/ |
|---|
| 451 |
public static const int SHADOW_IN = 1 << 2; |
|---|
| 452 |
|
|---|
| 453 |
/** |
|---|
| 454 |
* Style constant for shadow out behavior (value is 1<<3). |
|---|
| 455 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 456 |
* <p><b>Used By:</b><ul> |
|---|
| 457 |
* <li><code>Label</code></li> |
|---|
| 458 |
* <li><code>Group</code></li> |
|---|
| 459 |
* <li><code>ToolBar</code></li> |
|---|
| 460 |
* </ul></p> |
|---|
| 461 |
*/ |
|---|
| 462 |
public static const int SHADOW_OUT = 1 << 3; |
|---|
| 463 |
|
|---|
| 464 |
/** |
|---|
| 465 |
* Style constant for shadow etched in behavior (value is 1<<4). |
|---|
| 466 |
* <br>Note that this is a <em>HINT</em>. It is ignored on all platforms except Motif. |
|---|
| 467 |
* <p><b>Used By:</b><ul> |
|---|
| 468 |
* <li><code>Group</code></li> |
|---|
| 469 |
* </ul></p> |
|---|
| 470 |
*/ |
|---|
| 471 |
public static const int SHADOW_ETCHED_IN = 1 << 4; |
|---|
| 472 |
|
|---|
| 473 |
/** |
|---|
| 474 |
* Style constant for shadow etched out behavior (value is 1<<6). |
|---|
| 475 |
* <br>Note that this is a <em>HINT</em>. It is ignored on all platforms except Motif. |
|---|
| 476 |
* <p><b>Used By:</b><ul> |
|---|
| 477 |
* <li><code>Group</code></li> |
|---|
| 478 |
* </ul></p> |
|---|
| 479 |
*/ |
|---|
| 480 |
public static const int SHADOW_ETCHED_OUT = 1 << 6; |
|---|
| 481 |
|
|---|
| 482 |
/** |
|---|
| 483 |
* Style constant for no shadow behavior (value is 1<<5). |
|---|
| 484 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 485 |
* <p><b>Used By:</b><ul> |
|---|
| 486 |
* <li><code>Label</code></li> |
|---|
| 487 |
* <li><code>Group</code></li> |
|---|
| 488 |
* </ul></p> |
|---|
| 489 |
*/ |
|---|
| 490 |
public static const int SHADOW_NONE = 1 << 5; |
|---|
| 491 |
|
|---|
| 492 |
/** |
|---|
| 493 |
* Style constant for progress bar behavior (value is 1<<1). |
|---|
| 494 |
* <p><b>Used By:</b><ul> |
|---|
| 495 |
* <li><code>ProgressBar</code></li> |
|---|
| 496 |
* </ul></p> |
|---|
| 497 |
*/ |
|---|
| 498 |
public static const int INDETERMINATE = 1 << 1; |
|---|
| 499 |
|
|---|
| 500 |
/** |
|---|
| 501 |
* Style constant for tool window behavior (value is 1<<2). |
|---|
| 502 |
* <p> |
|---|
| 503 |
* A tool window is a window intended to be used as a floating toolbar. |
|---|
| 504 |
* It typically has a title bar that is shorter than a normal title bar, |
|---|
| 505 |
* and the window title is typically drawn using a smaller font. |
|---|
| 506 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 507 |
* </p><p><b>Used By:</b><ul> |
|---|
| 508 |
* <li><code>Decorations</code> and subclasses</li> |
|---|
| 509 |
* </ul></p> |
|---|
| 510 |
*/ |
|---|
| 511 |
public static const int TOOL = 1 << 2; |
|---|
| 512 |
|
|---|
| 513 |
/** |
|---|
| 514 |
* Style constant to ensure no trimmings are used (value is 1<<3). |
|---|
| 515 |
* <br>Note that this overrides all other trim styles. |
|---|
| 516 |
* <p><b>Used By:</b><ul> |
|---|
| 517 |
* <li><code>Decorations</code> and subclasses</li> |
|---|
| 518 |
* </ul></p> |
|---|
| 519 |
*/ |
|---|
| 520 |
public static const int NO_TRIM = 1 << 3; |
|---|
| 521 |
|
|---|
| 522 |
/** |
|---|
| 523 |
* Style constant for resize box trim (value is 1<<4). |
|---|
| 524 |
* <p><b>Used By:</b><ul> |
|---|
| 525 |
* <li><code>Decorations</code> and subclasses</li> |
|---|
| 526 |
* <li><code>Tracker</code></li> |
|---|
| 527 |
* </ul></p> |
|---|
| 528 |
*/ |
|---|
| 529 |
public static const int RESIZE = 1 << 4; |
|---|
| 530 |
|
|---|
| 531 |
/** |
|---|
| 532 |
* Style constant for title area trim (value is 1<<5). |
|---|
| 533 |
* <p><b>Used By:</b><ul> |
|---|
| 534 |
* <li><code>Decorations</code> and subclasses</li> |
|---|
| 535 |
* </ul></p> |
|---|
| 536 |
*/ |
|---|
| 537 |
public static const int TITLE = 1 << 5; |
|---|
| 538 |
|
|---|
| 539 |
/** |
|---|
| 540 |
* Style constant for close box trim (value is 1<<6, |
|---|
| 541 |
* since we do not distinguish between CLOSE style and MENU style). |
|---|
| 542 |
* <p><b>Used By:</b><ul> |
|---|
| 543 |
* <li><code>Decorations</code> and subclasses</li> |
|---|
| 544 |
* </ul></p> |
|---|
| 545 |
*/ |
|---|
| 546 |
public static const int CLOSE = 1 << 6; |
|---|
| 547 |
|
|---|
| 548 |
/** |
|---|
| 549 |
* Style constant for shell menu trim (value is 1<<6, |
|---|
| 550 |
* since we do not distinguish between CLOSE style and MENU style). |
|---|
| 551 |
* <p><b>Used By:</b><ul> |
|---|
| 552 |
* <li><code>Decorations</code> and subclasses</li> |
|---|
| 553 |
* </ul></p> |
|---|
| 554 |
*/ |
|---|
| 555 |
public static const int MENU = CLOSE; |
|---|
| 556 |
|
|---|
| 557 |
/** |
|---|
| 558 |
* Style constant for minimize box trim (value is 1<<7). |
|---|
| 559 |
* <p><b>Used By:</b><ul> |
|---|
| 560 |
* <li><code>Decorations</code> and subclasses</li> |
|---|
| 561 |
* </ul></p> |
|---|
| 562 |
*/ |
|---|
| 563 |
public static const int MIN = 1 << 7; |
|---|
| 564 |
|
|---|
| 565 |
/** |
|---|
| 566 |
* Style constant for maximize box trim (value is 1<<10). |
|---|
| 567 |
* <p><b>Used By:</b><ul> |
|---|
| 568 |
* <li><code>Decorations</code> and subclasses</li> |
|---|
| 569 |
* </ul></p> |
|---|
| 570 |
*/ |
|---|
| 571 |
public static const int MAX = 1 << 10; |
|---|
| 572 |
|
|---|
| 573 |
/** |
|---|
| 574 |
* Style constant for horizontal scrollbar behavior (value is 1<<8). |
|---|
| 575 |
* <p><b>Used By:</b><ul> |
|---|
| 576 |
* <li><code>Scrollable</code> and subclasses</li> |
|---|
| 577 |
* </ul></p> |
|---|
| 578 |
*/ |
|---|
| 579 |
public static const int H_SCROLL = 1 << 8; |
|---|
| 580 |
|
|---|
| 581 |
/** |
|---|
| 582 |
* Style constant for vertical scrollbar behavior (value is 1<<9). |
|---|
| 583 |
* <p><b>Used By:</b><ul> |
|---|
| 584 |
* <li><code>Scrollable</code> and subclasses</li> |
|---|
| 585 |
* </ul></p> |
|---|
| 586 |
*/ |
|---|
| 587 |
public static const int V_SCROLL = 1 << 9; |
|---|
| 588 |
|
|---|
| 589 |
/** |
|---|
| 590 |
* Style constant for bordered behavior (value is 1<<11). |
|---|
| 591 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 592 |
* <p><b>Used By:</b><ul> |
|---|
| 593 |
* <li><code>Control</code> and subclasses</li> |
|---|
| 594 |
* </ul></p> |
|---|
| 595 |
*/ |
|---|
| 596 |
public static const int BORDER = 1 << 11; |
|---|
| 597 |
|
|---|
| 598 |
/** |
|---|
| 599 |
* Style constant indicating that the window manager should clip |
|---|
| 600 |
* a widget's children with respect to its viewable area. (value is 1<<12). |
|---|
| 601 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 602 |
* <p><b>Used By:</b><ul> |
|---|
| 603 |
* <li><code>Control</code> and subclasses</li> |
|---|
| 604 |
* </ul></p> |
|---|
| 605 |
*/ |
|---|
| 606 |
public static const int CLIP_CHILDREN = 1 << 12; |
|---|
| 607 |
|
|---|
| 608 |
/** |
|---|
| 609 |
* Style constant indicating that the window manager should clip |
|---|
| 610 |
* a widget's siblings with respect to its viewable area. (value is 1<<13). |
|---|
| 611 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 612 |
* <p><b>Used By:</b><ul> |
|---|
| 613 |
* <li><code>Control</code> and subclasses</li> |
|---|
| 614 |
* </ul></p> |
|---|
| 615 |
*/ |
|---|
| 616 |
public static const int CLIP_SIBLINGS = 1 << 13; |
|---|
| 617 |
|
|---|
| 618 |
/** |
|---|
| 619 |
* Style constant for always on top behavior (value is 1<<14). |
|---|
| 620 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 621 |
* <p><b>Used By:</b><ul> |
|---|
| 622 |
* <li><code>Shell</code> and subclasses</li> |
|---|
| 623 |
* </ul></p> |
|---|
| 624 |
*/ |
|---|
| 625 |
public static const int ON_TOP = 1 << 14; |
|---|
| 626 |
|
|---|
| 627 |
/** |
|---|
| 628 |
* Trim style convenience constant for the most common top level shell appearance |
|---|
| 629 |
* (value is CLOSE|TITLE|MIN|MAX|RESIZE). |
|---|
| 630 |
* <p><b>Used By:</b><ul> |
|---|
| 631 |
* <li><code>Shell</code></li> |
|---|
| 632 |
* </ul></p> |
|---|
| 633 |
*/ |
|---|
| 634 |
public static const int SHELL_TRIM = CLOSE | TITLE | MIN | MAX | RESIZE; |
|---|
| 635 |
|
|---|
| 636 |
/** |
|---|
| 637 |
* Trim style convenience constant for the most common dialog shell appearance |
|---|
| 638 |
* (value is CLOSE|TITLE|BORDER). |
|---|
| 639 |
* <p><b>Used By:</b><ul> |
|---|
| 640 |
* <li><code>Shell</code></li> |
|---|
| 641 |
* </ul></p> |
|---|
| 642 |
*/ |
|---|
| 643 |
public static const int DIALOG_TRIM = TITLE | CLOSE | BORDER; |
|---|
| 644 |
|
|---|
| 645 |
/** |
|---|
| 646 |
* Style constant for modeless behavior (value is 0). |
|---|
| 647 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 648 |
* <p><b>Used By:</b><ul> |
|---|
| 649 |
* <li><code>Dialog</code></li> |
|---|
| 650 |
* <li><code>Shell</code></li> |
|---|
| 651 |
* </ul></p> |
|---|
| 652 |
*/ |
|---|
| 653 |
public static const int MODELESS = 0; |
|---|
| 654 |
|
|---|
| 655 |
/** |
|---|
| 656 |
* Style constant for primary modal behavior (value is 1<<15). |
|---|
| 657 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 658 |
* <p><b>Used By:</b><ul> |
|---|
| 659 |
* <li><code>Dialog</code></li> |
|---|
| 660 |
* <li><code>Shell</code></li> |
|---|
| 661 |
* </ul></p> |
|---|
| 662 |
*/ |
|---|
| 663 |
public static const int PRIMARY_MODAL = 1 << 15; |
|---|
| 664 |
|
|---|
| 665 |
/** |
|---|
| 666 |
* Style constant for application modal behavior (value is 1<<16). |
|---|
| 667 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 668 |
* <p><b>Used By:</b><ul> |
|---|
| 669 |
* <li><code>Dialog</code></li> |
|---|
| 670 |
* <li><code>Shell</code></li> |
|---|
| 671 |
* </ul></p> |
|---|
| 672 |
*/ |
|---|
| 673 |
public static const int APPLICATION_MODAL = 1 << 16; |
|---|
| 674 |
|
|---|
| 675 |
/** |
|---|
| 676 |
* Style constant for system modal behavior (value is 1<<17). |
|---|
| 677 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 678 |
* <p><b>Used By:</b><ul> |
|---|
| 679 |
* <li><code>Dialog</code></li> |
|---|
| 680 |
* <li><code>Shell</code></li> |
|---|
| 681 |
* </ul></p> |
|---|
| 682 |
*/ |
|---|
| 683 |
public static const int SYSTEM_MODAL = 1 << 17; |
|---|
| 684 |
|
|---|
| 685 |
/** |
|---|
| 686 |
* Style constant for selection hiding behavior when the widget loses focus (value is 1<<15). |
|---|
| 687 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 688 |
* <p><b>Used By:</b><ul> |
|---|
| 689 |
* <li><code>Table</code></li> |
|---|
| 690 |
* </ul></p> |
|---|
| 691 |
*/ |
|---|
| 692 |
public static const int HIDE_SELECTION = 1 << 15; |
|---|
| 693 |
|
|---|
| 694 |
/** |
|---|
| 695 |
* Style constant for full row selection behavior. (value is 1<<16). |
|---|
| 696 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 697 |
* <p><b>Used By:</b><ul> |
|---|
| 698 |
* <li><code>StyledText</code></li> |
|---|
| 699 |
* <li><code>Table</code></li> |
|---|
| 700 |
* <li><code>TableTree</code></li> |
|---|
| 701 |
* </ul></p> |
|---|
| 702 |
*/ |
|---|
| 703 |
public static const int FULL_SELECTION = 1 << 16; |
|---|
| 704 |
|
|---|
| 705 |
/** |
|---|
| 706 |
* Style constant for flat appearance. (value is 1<<23). |
|---|
| 707 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 708 |
* <p><b>Used By:</b><ul> |
|---|
| 709 |
* <li><code>Button</code></li> |
|---|
| 710 |
* <li><code>ToolBar</code></li> |
|---|
| 711 |
* </ul></p> |
|---|
| 712 |
*/ |
|---|
| 713 |
public static const int FLAT = 1 << 23; |
|---|
| 714 |
|
|---|
| 715 |
/** |
|---|
| 716 |
* Style constant for flat appearance. (value is 1<<16). |
|---|
| 717 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 718 |
* <p><b>Used By:</b><ul> |
|---|
| 719 |
* <li><code>ProgressBar</code></li> |
|---|
| 720 |
* </ul></p> |
|---|
| 721 |
*/ |
|---|
| 722 |
public static const int SMOOTH = 1 << 16; |
|---|
| 723 |
|
|---|
| 724 |
/** |
|---|
| 725 |
* Style constant for no background behavior (value is 1<<18). |
|---|
| 726 |
* <p> |
|---|
| 727 |
* By default, before a widget paints, the client area is filled with the current background color. |
|---|
| 728 |
* When this style is specified, the background is not filled, and the application is responsible |
|---|
| 729 |
* for filling every pixel of the client area. |
|---|
| 730 |
* This style might be used as an alternative to "double-buffering" in order to reduce flicker. |
|---|
| 731 |
* This style does not mean "transparent" - widgets that are obscured will not draw through. |
|---|
| 732 |
* </p><p><b>Used By:</b><ul> |
|---|
| 733 |
* <li><code>Composite</code></li> |
|---|
| 734 |
* </ul></p> |
|---|
| 735 |
*/ |
|---|
| 736 |
public static const int NO_BACKGROUND = 1 << 18; |
|---|
| 737 |
|
|---|
| 738 |
/** |
|---|
| 739 |
* Style constant for does not take focus behavior (value is 1<<19). |
|---|
| 740 |
* <br>Note that this is a <em>HINT</em>. |
|---|
| 741 |
* <p><b>Used By:</b><ul> |
|---|
| 742 |
* <li><code>Composite</code></li> |
|---|
| 743 |
* </ul></p> |
|---|
| 744 |
*/ |
|---|
| 745 |
public static const int NO_FOCUS = 1 << 19; |
|---|
| 746 |
|
|---|
| 747 |
/** |
|---|
| 748 |
* Style constant for no redraw on resize behavior (value is 1<<20). |
|---|
| 749 |
* <p> |
|---|
| 750 |
* This style stops the entire client area from being invalidated when the size |
|---|
| 751 |
* of the Canvas changes. Specifically, when the size of the Canvas gets smaller, |
|---|
| 752 |
* the SWT.Paint event is not sent. When it gets bigger, an SWT.Paint event is |
|---|
| 753 |
* sent with a GC clipped to only the new areas to be painted. Without this |
|---|
| 754 |
* style, the entire client area will be repainted. |
|---|
| 755 |
* </p><p><b>Used By:</b><ul> |
|---|
| 756 |
* <li><code>Composite</code></li> |
|---|
| 757 |
* </ul></p> |
|---|
| 758 |
*/ |
|---|
| 759 |
public static const int NO_REDRAW_RESIZE = 1 << 20; |
|---|
| 760 |
|
|---|
| 761 |
/** |
|---|
| 762 |
* Style constant for no paint event merging behavior (value is 1<<21). |
|---|
| 763 |
* <p><b>Used By:</b><ul> |
|---|
| 764 |
* <li><code>Composite</code></li> |
|---|
| 765 |
* </ul></p> |
|---|
| 766 |
*/ |
|---|
| 767 |
public static const int NO_MERGE_PAINTS = 1 << 21; |
|---|
| 768 |
|
|---|
| 769 |
/** |
|---|
| 770 |
* Style constant for preventing child radio group behavior (value is 1<<22). |
|---|
| 771 |
* <p><b>Used By:</b><ul> |
|---|
| 772 |
* <li><code>Composite</code></li> |
|---|
| 773 |
* </ul></p> |
|---|
| 774 |
*/ |
|---|
| 775 |
public static const int NO_RADIO_GROUP = 1 << 22; |
|---|
| 776 |
|
|---|
| 777 |
/** |
|---|
| 778 |
* Style constant for left to right orientation (value is 1<<25). |
|---|
| 779 |
* <p> |
|---|
| 780 |
* When orientation is not explicitly specified, orientation is |
|---|
| 781 |
* inherited. This means that children will be assigned the |
|---|
| 782 |
* orientation of their parent. To override this behavior and |
|---|
| 783 |
* force an orientation for a child, explicitly set the orientation |
|---|
| 784 |
* of the child when that child is created. |
|---|
| 785 |
* </p> |
|---|
| 786 |
* <p><b>Used By:</b><ul> |
|---|
| 787 |
* <li><code>Control</code></li> |
|---|
| 788 |
* <li><code>Menu</code></li> |
|---|
| 789 |
* <li><code>GC</code></li> |
|---|
| 790 |
* </ul></p> |
|---|
| 791 |
* |
|---|
| 792 |
* @since 2.1.2 |
|---|
| 793 |
*/ |
|---|
| 794 |
public static const int LEFT_TO_RIGHT = 1 << 25; |
|---|
| 795 |
|
|---|
| 796 |
/** |
|---|
| 797 |
* Style constant for right to left orientation (value is 1<<26). |
|---|
| 798 |
* <p> |
|---|
| 799 |
* When orientation is not explicitly specified, orientation is |
|---|
| 800 |
* inherited. This means that children will be assigned the |
|---|
| 801 |
* orientation of their parent. To override this behavior and |
|---|
| 802 |
* force an orientation for a child, explicitly set the orientation |
|---|
| 803 |
* of the child when that child is created. |
|---|
| 804 |
* </p> |
|---|
| 805 |
* <p><b>Used By:</b><ul> |
|---|
| 806 |
* <li><code>Control</code></li> |
|---|
| 807 |
* <li><code>Menu</code></li> |
|---|
| 808 |
* <li><code>GC</code></li> |
|---|
| 809 |
* </ul></p> |
|---|
| 810 |
* |
|---|
| 811 |
* @since 2.1.2 |
|---|
| 812 |
*/ |
|---|
| 813 |
public static const int RIGHT_TO_LEFT = 1 << 26; |
|---|
| 814 |
|
|---|
| 815 |
/** |
|---|
| 816 |
* Style constant to indicate coordinate mirroring (value is 1<<27). |
|---|
| 817 |
* <p><b>Used By:</b><ul> |
|---|
| 818 |
* <li><code>Control</code></li> |
|---|
| 819 |
* <li><code>Menu</code></li> |
|---|
| 820 |
* & |
|---|