| 1 |
/******************************************************************************* |
|---|
| 2 |
* Copyright (c) 2000, 2008 IBM Corporation and others. |
|---|
| 3 |
* All rights reserved. This program and the accompanying materials |
|---|
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
|---|
| 5 |
* which accompanies this distribution, and is available at |
|---|
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
|---|
| 7 |
* |
|---|
| 8 |
* Contributors: |
|---|
| 9 |
* IBM Corporation - initial API and implementation |
|---|
| 10 |
* Port to the D programming language: |
|---|
| 11 |
* Frank Benoit <benoit@tionex.de> |
|---|
| 12 |
*******************************************************************************/ |
|---|
| 13 |
module dwt.DWT; |
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
import dwt.internal.Compatibility; |
|---|
| 17 |
import dwt.internal.Library; |
|---|
| 18 |
import dwt.internal.Platform; |
|---|
| 19 |
import dwt.DWTError; |
|---|
| 20 |
import dwt.DWTException; |
|---|
| 21 |
|
|---|
| 22 |
import dwt.dwthelper.utils; |
|---|
| 23 |
|
|---|
| 24 |
import tango.core.Exception; |
|---|
| 25 |
version( build ){ |
|---|
| 26 |
pragma(link, "gtk-x11-2.0" ); |
|---|
| 27 |
pragma(link, "gdk-x11-2.0" ); |
|---|
| 28 |
pragma(link, "atk-1.0" ); |
|---|
| 29 |
pragma(link, "gdk_pixbuf-2.0" ); |
|---|
| 30 |
pragma(link, "gthread-2.0" ); |
|---|
| 31 |
pragma(link, "pangocairo-1.0" ); |
|---|
| 32 |
pragma(link, "fontconfig" ); |
|---|
| 33 |
pragma(link, "Xtst" ); |
|---|
| 34 |
pragma(link, "Xext" ); |
|---|
| 35 |
pragma(link, "Xrender" ); |
|---|
| 36 |
pragma(link, "Xinerama" ); |
|---|
| 37 |
pragma(link, "Xi" ); |
|---|
| 38 |
pragma(link, "Xrandr" ); |
|---|
| 39 |
pragma(link, "Xcursor" ); |
|---|
| 40 |
pragma(link, "Xcomposite" ); |
|---|
| 41 |
pragma(link, "Xdamage" ); |
|---|
| 42 |
pragma(link, "X11" ); |
|---|
| 43 |
pragma(link, "Xfixes" ); |
|---|
| 44 |
pragma(link, "pango-1.0" ); |
|---|
| 45 |
pragma(link, "gobject-2.0" ); |
|---|
| 46 |
pragma(link, "gmodule-2.0" ); |
|---|
| 47 |
pragma(link, "dl" ); |
|---|
| 48 |
pragma(link, "glib-2.0" ); |
|---|
| 49 |
pragma(link, "cairo" ); |
|---|
| 50 |
} |
|---|
| 51 |
//version=CARBON; |
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
/** |
|---|
| 55 |
* This class provides access to a small number of DWT system-wide |
|---|
| 56 |
* methods, and in addition defines the public constants provided |
|---|
| 57 |
* by DWT. |
|---|
| 58 |
* <p> |
|---|
| 59 |
* By defining constants like UP and DOWN in a single class, DWT |
|---|
| 60 |
* can share common names and concepts at the same time minimizing |
|---|
| 61 |
* the number of classes, names and constants for the application |
|---|
| 62 |
* programmer. |
|---|
| 63 |
* </p><p> |
|---|
| 64 |
* Note that some of the constants provided by this class represent |
|---|
| 65 |
* optional, appearance related aspects of widgets which are available |
|---|
| 66 |
* either only on some window systems, or for a differing set of |
|---|
| 67 |
* widgets on each window system. These constants are marked |
|---|
| 68 |
* as <em>HINT</em>s. The set of widgets which support a particular |
|---|
| 69 |
* <em>HINT</em> may change from release to release, although we typically |
|---|
| 70 |
* will not withdraw support for a <em>HINT</em> once it is made available. |
|---|
| 71 |
* </p> |
|---|
| 72 |
* |
|---|
| 73 |
* @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> |
|---|
| 74 |
*/ |
|---|
| 75 |
|
|---|
| 76 |
/* NOTE: |
|---|
| 77 |
* Good javadoc coding style is to put the values of static const |
|---|
| 78 |
* constants in the comments. This reinforces the fact that |
|---|
| 79 |
* consumers are allowed to rely on the value (and they must |
|---|
| 80 |
* since the values are compiled inline in their code). We |
|---|
| 81 |
* can <em>not</em> change the values of these constants between |
|---|
| 82 |
* releases. |
|---|
| 83 |
*/ |
|---|
| 84 |
public class DWT { |
|---|
| 85 |
|
|---|
| 86 |
/* Widget Event Constants */ |
|---|
| 87 |
|
|---|
| 88 |
/** |
|---|
| 89 |
* The null event type (value is 0). |
|---|
| 90 |
* |
|---|
| 91 |
* @since 3.0 |
|---|
| 92 |
*/ |
|---|
| 93 |
public static const int None = 0; |
|---|
| 94 |
|
|---|
| 95 |
/** |
|---|
| 96 |
* The key down event type (value is 1). |
|---|
| 97 |
* |
|---|
| 98 |
* @see dwt.widgets.Widget#addListener |
|---|
| 99 |
* @see dwt.widgets.Display#addFilter |
|---|
| 100 |
* @see dwt.widgets.Event |
|---|
| 101 |
* |
|---|
| 102 |
* @see dwt.widgets.Control#addKeyListener |
|---|
| 103 |
* @see dwt.widgets.Tracker#addKeyListener |
|---|
| 104 |
* @see dwt.events.KeyListener#keyPressed |
|---|
| 105 |
* @see dwt.events.KeyEvent |
|---|
| 106 |
*/ |
|---|
| 107 |
public static const int KeyDown = 1; |
|---|
| 108 |
|
|---|
| 109 |
/** |
|---|
| 110 |
* The key up event type (value is 2). |
|---|
| 111 |
* |
|---|
| 112 |
* @see dwt.widgets.Widget#addListener |
|---|
| 113 |
* @see dwt.widgets.Display#addFilter |
|---|
| 114 |
* @see dwt.widgets.Event |
|---|
| 115 |
* |
|---|
| 116 |
* @see dwt.widgets.Control#addKeyListener |
|---|
| 117 |
* @see dwt.widgets.Tracker#addKeyListener |
|---|
| 118 |
* @see dwt.events.KeyListener#keyReleased |
|---|
| 119 |
* @see dwt.events.KeyEvent |
|---|
| 120 |
*/ |
|---|
| 121 |
public static const int KeyUp = 2; |
|---|
| 122 |
|
|---|
| 123 |
/** |
|---|
| 124 |
* The mouse down event type (value is 3). |
|---|
| 125 |
* |
|---|
| 126 |
* @see dwt.widgets.Widget#addListener |
|---|
| 127 |
* @see dwt.widgets.Display#addFilter |
|---|
| 128 |
* @see dwt.widgets.Event |
|---|
| 129 |
* |
|---|
| 130 |
* @see dwt.widgets.Control#addMouseListener |
|---|
| 131 |
* @see dwt.events.MouseListener#mouseDown |
|---|
| 132 |
* @see dwt.events.MouseEvent |
|---|
| 133 |
*/ |
|---|
| 134 |
public static const int MouseDown = 3; |
|---|
| 135 |
|
|---|
| 136 |
/** |
|---|
| 137 |
* The mouse up event type (value is 4). |
|---|
| 138 |
* |
|---|
| 139 |
* @see dwt.widgets.Widget#addListener |
|---|
| 140 |
* @see dwt.widgets.Display#addFilter |
|---|
| 141 |
* @see dwt.widgets.Event |
|---|
| 142 |
* |
|---|
| 143 |
* @see dwt.widgets.Control#addMouseListener |
|---|
| 144 |
* @see dwt.events.MouseListener#mouseUp |
|---|
| 145 |
* @see dwt.events.MouseEvent |
|---|
| 146 |
*/ |
|---|
| 147 |
public static const int MouseUp = 4; |
|---|
| 148 |
|
|---|
| 149 |
/** |
|---|
| 150 |
* The mouse move event type (value is 5). |
|---|
| 151 |
* |
|---|
| 152 |
* @see dwt.widgets.Widget#addListener |
|---|
| 153 |
* @see dwt.widgets.Display#addFilter |
|---|
| 154 |
* @see dwt.widgets.Event |
|---|
| 155 |
* |
|---|
| 156 |
* @see dwt.widgets.Control#addMouseMoveListener |
|---|
| 157 |
* @see dwt.events.MouseMoveListener#mouseMove |
|---|
| 158 |
* @see dwt.events.MouseEvent |
|---|
| 159 |
*/ |
|---|
| 160 |
public static const int MouseMove = 5; |
|---|
| 161 |
|
|---|
| 162 |
/** |
|---|
| 163 |
* The mouse enter event type (value is 6). |
|---|
| 164 |
* |
|---|
| 165 |
* @see dwt.widgets.Widget#addListener |
|---|
| 166 |
* @see dwt.widgets.Display#addFilter |
|---|
| 167 |
* @see dwt.widgets.Event |
|---|
| 168 |
* |
|---|
| 169 |
* @see dwt.widgets.Control#addMouseTrackListener |
|---|
| 170 |
* @see dwt.events.MouseTrackListener#mouseEnter |
|---|
| 171 |
* @see dwt.events.MouseEvent |
|---|
| 172 |
*/ |
|---|
| 173 |
public static const int MouseEnter = 6; |
|---|
| 174 |
|
|---|
| 175 |
/** |
|---|
| 176 |
* The mouse exit event type (value is 7). |
|---|
| 177 |
* |
|---|
| 178 |
* @see dwt.widgets.Widget#addListener |
|---|
| 179 |
* @see dwt.widgets.Display#addFilter |
|---|
| 180 |
* @see dwt.widgets.Event |
|---|
| 181 |
* |
|---|
| 182 |
* @see dwt.widgets.Control#addMouseTrackListener |
|---|
| 183 |
* @see dwt.events.MouseTrackListener#mouseExit |
|---|
| 184 |
* @see dwt.events.MouseEvent |
|---|
| 185 |
*/ |
|---|
| 186 |
public static const int MouseExit = 7; |
|---|
| 187 |
|
|---|
| 188 |
/** |
|---|
| 189 |
* The mouse double click event type (value is 8). |
|---|
| 190 |
* |
|---|
| 191 |
* @see dwt.widgets.Widget#addListener |
|---|
| 192 |
* @see dwt.widgets.Display#addFilter |
|---|
| 193 |
* @see dwt.widgets.Event |
|---|
| 194 |
* |
|---|
| 195 |
* @see dwt.widgets.Control#addMouseListener |
|---|
| 196 |
* @see dwt.events.MouseListener#mouseDoubleClick |
|---|
| 197 |
* @see dwt.events.MouseEvent |
|---|
| 198 |
*/ |
|---|
| 199 |
public static const int MouseDoubleClick = 8; |
|---|
| 200 |
|
|---|
| 201 |
/** |
|---|
| 202 |
* The paint event type (value is 9). |
|---|
| 203 |
* |
|---|
| 204 |
* @see dwt.widgets.Widget#addListener |
|---|
| 205 |
* @see dwt.widgets.Display#addFilter |
|---|
| 206 |
* @see dwt.widgets.Event |
|---|
| 207 |
* |
|---|
| 208 |
* @see dwt.widgets.Control#addPaintListener |
|---|
| 209 |
* @see dwt.events.PaintListener#paintControl |
|---|
| 210 |
* @see dwt.events.PaintEvent |
|---|
| 211 |
*/ |
|---|
| 212 |
public static const int Paint = 9; |
|---|
| 213 |
|
|---|
| 214 |
/** |
|---|
| 215 |
* The move event type (value is 10). |
|---|
| 216 |
* |
|---|
| 217 |
* @see dwt.widgets.Widget#addListener |
|---|
| 218 |
* @see dwt.widgets.Display#addFilter |
|---|
| 219 |
* @see dwt.widgets.Event |
|---|
| 220 |
* |
|---|
| 221 |
* @see dwt.widgets.Control#addControlListener |
|---|
| 222 |
* @see dwt.widgets.TableColumn#addControlListener |
|---|
| 223 |
* @see dwt.widgets.Tracker#addControlListener |
|---|
| 224 |
* @see dwt.widgets.TreeColumn#addControlListener |
|---|
| 225 |
* @see dwt.events.ControlListener#controlMoved |
|---|
| 226 |
* @see dwt.events.ControlEvent |
|---|
| 227 |
*/ |
|---|
| 228 |
public static const int Move = 10; |
|---|
| 229 |
|
|---|
| 230 |
/** |
|---|
| 231 |
* The resize event type (value is 11). |
|---|
| 232 |
* |
|---|
| 233 |
* @see dwt.widgets.Widget#addListener |
|---|
| 234 |
* @see dwt.widgets.Display#addFilter |
|---|
| 235 |
* @see dwt.widgets.Event |
|---|
| 236 |
* |
|---|
| 237 |
* @see dwt.widgets.Control#addControlListener |
|---|
| 238 |
* @see dwt.widgets.TableColumn#addControlListener |
|---|
| 239 |
* @see dwt.widgets.Tracker#addControlListener |
|---|
| 240 |
* @see dwt.widgets.TreeColumn#addControlListener |
|---|
| 241 |
* @see dwt.events.ControlListener#controlResized |
|---|
| 242 |
* @see dwt.events.ControlEvent |
|---|
| 243 |
*/ |
|---|
| 244 |
public static const int Resize = 11; |
|---|
| 245 |
|
|---|
| 246 |
/** |
|---|
| 247 |
* The dispose event type (value is 12). |
|---|
| 248 |
* |
|---|
| 249 |
* @see dwt.widgets.Widget#addListener |
|---|
| 250 |
* @see dwt.widgets.Display#addListener |
|---|
| 251 |
* @see dwt.widgets.Display#addFilter |
|---|
| 252 |
* @see dwt.widgets.Event |
|---|
| 253 |
* |
|---|
| 254 |
* @see dwt.widgets.Widget#addDisposeListener |
|---|
| 255 |
* @see dwt.events.DisposeListener#widgetDisposed |
|---|
| 256 |
* @see dwt.events.DisposeEvent |
|---|
| 257 |
*/ |
|---|
| 258 |
public static const int Dispose = 12; |
|---|
| 259 |
|
|---|
| 260 |
/** |
|---|
| 261 |
* The selection event type (value is 13). |
|---|
| 262 |
* |
|---|
| 263 |
* @see dwt.widgets.Widget#addListener |
|---|
| 264 |
* @see dwt.widgets.Display#addFilter |
|---|
| 265 |
* @see dwt.widgets.Event |
|---|
| 266 |
* |
|---|
| 267 |
* @see dwt.widgets.Button#addSelectionListener |
|---|
| 268 |
* @see dwt.widgets.Combo#addSelectionListener |
|---|
| 269 |
* @see dwt.widgets.CoolItem#addSelectionListener |
|---|
| 270 |
* @see dwt.widgets.Link#addSelectionListener |
|---|
| 271 |
* @see dwt.widgets.List#addSelectionListener |
|---|
| 272 |
* @see dwt.widgets.MenuItem#addSelectionListener |
|---|
| 273 |
* @see dwt.widgets.Sash#addSelectionListener |
|---|
| 274 |
* @see dwt.widgets.Scale#addSelectionListener |
|---|
| 275 |
* @see dwt.widgets.ScrollBar#addSelectionListener |
|---|
| 276 |
* @see dwt.widgets.Slider#addSelectionListener |
|---|
| 277 |
* @see dwt.widgets.TabFolder#addSelectionListener |
|---|
| 278 |
* @see dwt.widgets.Table#addSelectionListener |
|---|
| 279 |
* @see dwt.widgets.TableColumn#addSelectionListener |
|---|
| 280 |
* @see dwt.widgets.ToolItem#addSelectionListener |
|---|
| 281 |
* @see dwt.widgets.TrayItem#addSelectionListener |
|---|
| 282 |
* @see dwt.widgets.Tree#addSelectionListener |
|---|
| 283 |
* @see dwt.widgets.TreeColumn#addSelectionListener |
|---|
| 284 |
* @see dwt.events.SelectionListener#widgetSelected |
|---|
| 285 |
* @see dwt.events.SelectionEvent |
|---|
| 286 |
*/ |
|---|
| 287 |
public static const int Selection = 13; |
|---|
| 288 |
|
|---|
| 289 |
/** |
|---|
| 290 |
* The default selection event type (value is 14). |
|---|
| 291 |
* |
|---|
| 292 |
* @see dwt.widgets.Widget#addListener |
|---|
| 293 |
* @see dwt.widgets.Display#addFilter |
|---|
| 294 |
* @see dwt.widgets.Event |
|---|
| 295 |
* |
|---|
| 296 |
* @see dwt.widgets.Combo#addSelectionListener |
|---|
| 297 |
* @see dwt.widgets.List#addSelectionListener |
|---|
| 298 |
* @see dwt.widgets.Spinner#addSelectionListener |
|---|
| 299 |
* @see dwt.widgets.Table#addSelectionListener |
|---|
| 300 |
* @see dwt.widgets.Text#addSelectionListener |
|---|
| 301 |
* @see dwt.widgets.TrayItem#addSelectionListener |
|---|
| 302 |
* @see dwt.widgets.Tree#addSelectionListener |
|---|
| 303 |
* @see dwt.events.SelectionListener#widgetDefaultSelected |
|---|
| 304 |
* @see dwt.events.SelectionEvent |
|---|
| 305 |
*/ |
|---|
| 306 |
public static const int DefaultSelection = 14; |
|---|
| 307 |
|
|---|
| 308 |
/** |
|---|
| 309 |
* The focus in event type (value is 15). |
|---|
| 310 |
* |
|---|
| 311 |
* @see dwt.widgets.Widget#addListener |
|---|
| 312 |
* @see dwt.widgets.Display#addFilter |
|---|
| 313 |
* @see dwt.widgets.Event |
|---|
| 314 |
* |
|---|
| 315 |
* @see dwt.widgets.Control#addFocusListener |
|---|
| 316 |
* @see dwt.events.FocusListener#focusGained |
|---|
| 317 |
* @see dwt.events.FocusEvent |
|---|
| 318 |
*/ |
|---|
| 319 |
public static const int FocusIn = 15; |
|---|
| 320 |
|
|---|
| 321 |
/** |
|---|
| 322 |
* The focus out event type (value is 16). |
|---|
| 323 |
* |
|---|
| 324 |
* @see dwt.widgets.Widget#addListener |
|---|
| 325 |
* @see dwt.widgets.Display#addFilter |
|---|
| 326 |
* @see dwt.widgets.Event |
|---|
| 327 |
* |
|---|
| 328 |
* @see dwt.widgets.Control#addFocusListener |
|---|
| 329 |
* @see dwt.events.FocusListener#focusLost |
|---|
| 330 |
* @see dwt.events.FocusEvent |
|---|
| 331 |
*/ |
|---|
| 332 |
public static const int FocusOut = 16; |
|---|
| 333 |
|
|---|
| 334 |
/** |
|---|
| 335 |
* The expand event type (value is 17). |
|---|
| 336 |
* |
|---|
| 337 |
* @see dwt.widgets.Widget#addListener |
|---|
| 338 |
* @see dwt.widgets.Display#addFilter |
|---|
| 339 |
* @see dwt.widgets.Event |
|---|
| 340 |
* |
|---|
| 341 |
* @see dwt.widgets.Tree#addTreeListener |
|---|
| 342 |
* @see dwt.events.TreeListener#treeExpanded |
|---|
| 343 |
* @see dwt.events.TreeEvent |
|---|
| 344 |
*/ |
|---|
| 345 |
public static const int Expand = 17; |
|---|
| 346 |
|
|---|
| 347 |
/** |
|---|
| 348 |
* The collapse event type (value is 18). |
|---|
| 349 |
* |
|---|
| 350 |
* @see dwt.widgets.Widget#addListener |
|---|
| 351 |
* @see dwt.widgets.Display#addFilter |
|---|
| 352 |
* @see dwt.widgets.Event |
|---|
| 353 |
* |
|---|
| 354 |
* @see dwt.widgets.Tree#addTreeListener |
|---|
| 355 |
* @see dwt.events.TreeListener#treeCollapsed |
|---|
| 356 |
* @see dwt.events.TreeEvent |
|---|
| 357 |
*/ |
|---|
| 358 |
public static const int Collapse = 18; |
|---|
| 359 |
|
|---|
| 360 |
/** |
|---|
| 361 |
* The iconify event type (value is 19). |
|---|
| 362 |
* |
|---|
| 363 |
* @see dwt.widgets.Widget#addListener |
|---|
| 364 |
* @see dwt.widgets.Display#addFilter |
|---|
| 365 |
* @see dwt.widgets.Event |
|---|
| 366 |
* |
|---|
| 367 |
* @see dwt.widgets.Shell#addShellListener |
|---|
| 368 |
* @see dwt.events.ShellListener#shellIconified |
|---|
| 369 |
* @see dwt.events.ShellEvent |
|---|
| 370 |
*/ |
|---|
| 371 |
public static const int Iconify = 19; |
|---|
| 372 |
|
|---|
| 373 |
/** |
|---|
| 374 |
* The de-iconify event type (value is 20). |
|---|
| 375 |
* |
|---|
| 376 |
* @see dwt.widgets.Widget#addListener |
|---|
| 377 |
* @see dwt.widgets.Display#addFilter |
|---|
| 378 |
* @see dwt.widgets.Event |
|---|
| 379 |
* |
|---|
| 380 |
* @see dwt.widgets.Shell#addShellListener |
|---|
| 381 |
* @see dwt.events.ShellListener#shellDeiconified |
|---|
| 382 |
* @see dwt.events.ShellEvent |
|---|
| 383 |
*/ |
|---|
| 384 |
public static const int Deiconify = 20; |
|---|
| 385 |
|
|---|
| 386 |
/** |
|---|
| 387 |
* The close event type (value is 21). |
|---|
| 388 |
* |
|---|
| 389 |
* @see dwt.widgets.Widget#addListener |
|---|
| 390 |
* @see dwt.widgets.Display#addListener |
|---|
| 391 |
* @see dwt.widgets.Display#addFilter |
|---|
| 392 |
* @see dwt.widgets.Event |
|---|
| 393 |
* |
|---|
| 394 |
* @see dwt.widgets.Shell#addShellListener |
|---|
| 395 |
* @see dwt.events.ShellListener#shellClosed |
|---|
| 396 |
* @see dwt.events.ShellEvent |
|---|
| 397 |
*/ |
|---|
| 398 |
public static const int Close = 21; |
|---|
| 399 |
|
|---|
| 400 |
/** |
|---|
| 401 |
* The show event type (value is 22). |
|---|
| 402 |
* |
|---|
| 403 |
* @see dwt.widgets.Widget#addListener |
|---|
| 404 |
* @see dwt.widgets.Display#addFilter |
|---|
| 405 |
* @see dwt.widgets.Event |
|---|
| 406 |
* |
|---|
| 407 |
* @see dwt.widgets.Menu#addMenuListener |
|---|
| 408 |
* @see dwt.events.MenuListener#menuShown |
|---|
| 409 |
* @see dwt.events.MenuEvent |
|---|
| 410 |
*/ |
|---|
| 411 |
public static const int Show = 22; |
|---|
| 412 |
|
|---|
| 413 |
/** |
|---|
| 414 |
* The hide event type (value is 23). |
|---|
| 415 |
* |
|---|
| 416 |
* @see dwt.widgets.Widget#addListener |
|---|
| 417 |
* @see dwt.widgets.Display#addFilter |
|---|
| 418 |
* @see dwt.widgets.Event |
|---|
| 419 |
* |
|---|
| 420 |
* @see dwt.widgets.Menu#addMenuListener |
|---|
| 421 |
* @see dwt.events.MenuListener#menuHidden |
|---|
| 422 |
* @see dwt.events.MenuEvent |
|---|
| 423 |
*/ |
|---|
| 424 |
public static const int Hide = 23; |
|---|
| 425 |
|
|---|
| 426 |
/** |
|---|
| 427 |
* The modify event type (value is 24). |
|---|
| 428 |
* |
|---|
| 429 |
* @see dwt.widgets.Widget#addListener |
|---|
| 430 |
* @see dwt.widgets.Display#addFilter |
|---|
| 431 |
* @see dwt.widgets.Event |
|---|
| 432 |
* |
|---|
| 433 |
* @see dwt.widgets.Combo#addModifyListener |
|---|
| 434 |
* @see dwt.widgets.Spinner#addModifyListener |
|---|
| 435 |
* @see dwt.widgets.Text#addModifyListener |
|---|
| 436 |
* @see dwt.events.ModifyListener#modifyText |
|---|
| 437 |
* @see dwt.events.ModifyEvent |
|---|
| 438 |
*/ |
|---|
| 439 |
public static const int Modify = 24; |
|---|
| 440 |
|
|---|
| 441 |
/** |
|---|
| 442 |
* The verify event type (value is 25). |
|---|
| 443 |
* |
|---|
| 444 |
* @see dwt.widgets.Widget#addListener |
|---|
| 445 |
* @see dwt.widgets.Display#addFilter |
|---|
| 446 |
* @see dwt.widgets.Event |
|---|
| 447 |
* |
|---|
| 448 |
* @see dwt.custom.CCombo#addVerifyListener |
|---|
| 449 |
* @see dwt.widgets.Combo#addVerifyListener |
|---|
| 450 |
* @see dwt.custom.StyledText#addVerifyListener |
|---|
| 451 |
* @see dwt.widgets.Text#addVerifyListener |
|---|
| 452 |
* @see dwt.events.VerifyListener#verifyText |
|---|
| 453 |
* @see dwt.events.VerifyEvent |
|---|
| 454 |
*/ |
|---|
| 455 |
public static const int Verify = 25; |
|---|
| 456 |
|
|---|
| 457 |
/** |
|---|
| 458 |
* The activate event type (value is 26). |
|---|
| 459 |
* |
|---|
| 460 |
* @see dwt.widgets.Widget#addListener |
|---|
| 461 |
* @see dwt.widgets.Display#addFilter |
|---|
| 462 |
* @see dwt.widgets.Event |
|---|
| 463 |
* |
|---|
| 464 |
* @see dwt.widgets.Shell#addShellListener |
|---|
| 465 |
* @see dwt.events.ShellListener#shellActivated |
|---|
| 466 |
* @see dwt.events.ShellEvent |
|---|
| 467 |
*/ |
|---|
| 468 |
public static const int Activate = 26; |
|---|
| 469 |
|
|---|
| 470 |
/** |
|---|
| 471 |
* The deactivate event type (value is 27). |
|---|
| 472 |
* |
|---|
| 473 |
* @see dwt.widgets.Widget#addListener |
|---|
| 474 |
* @see dwt.widgets.Display#addFilter |
|---|
| 475 |
* @see dwt.widgets.Event |
|---|
| 476 |
* |
|---|
| 477 |
* @see dwt.widgets.Shell#addShellListener |
|---|
| 478 |
* @see dwt.events.ShellListener#shellDeactivated |
|---|
| 479 |
* @see dwt.events.ShellEvent |
|---|
| 480 |
*/ |
|---|
| 481 |
public static const int Deactivate = 27; |
|---|
| 482 |
|
|---|
| 483 |
/** |
|---|
| 484 |
* The help event type (value is 28). |
|---|
| 485 |
* |
|---|
| 486 |
* @see dwt.widgets.Widget#addListener |
|---|
| 487 |
* @see dwt.widgets.Display#addFilter |
|---|
| 488 |
* @see dwt.widgets.Event |
|---|
| 489 |
* |
|---|
| 490 |
* @see dwt.widgets.Control#addHelpListener |
|---|
| 491 |
* @see dwt.widgets.Menu#addHelpListener |
|---|
| 492 |
* @see dwt.widgets.MenuItem#addHelpListener |
|---|
| 493 |
* @see dwt.events.HelpListener#helpRequested |
|---|
| 494 |
* @see dwt.events.HelpEvent |
|---|
| 495 |
*/ |
|---|
| 496 |
public static const int Help = 28; |
|---|
| 497 |
|
|---|
| 498 |
/** |
|---|
| 499 |
* The drag detect event type (value is 29). |
|---|
| 500 |
* |
|---|
| 501 |
* @see dwt.widgets.Widget#addListener |
|---|
| 502 |
* @see dwt.widgets.Display#addFilter |
|---|
| 503 |
* @see dwt.widgets.Event |
|---|
| 504 |
* |
|---|
| 505 |
* @see dwt.dnd.DragSource |
|---|
| 506 |
*/ |
|---|
| 507 |
public static const int DragDetect = 29; |
|---|
| 508 |
|
|---|
| 509 |
/** |
|---|
| 510 |
* The arm event type (value is 30). |
|---|
| 511 |
* |
|---|
| 512 |
* @see dwt.widgets.Widget#addListener |
|---|
| 513 |
* @see dwt.widgets.Display#addFilter |
|---|
| 514 |
* @see dwt.widgets.Event |
|---|
| 515 |
* |
|---|
| 516 |
* @see dwt.widgets.MenuItem#addArmListener |
|---|
| 517 |
* @see dwt.events.ArmListener#widgetArmed |
|---|
| 518 |
* @see dwt.events.ArmEvent |
|---|
| 519 |
*/ |
|---|
| 520 |
public static const int Arm = 30; |
|---|
| 521 |
|
|---|
| 522 |
/** |
|---|
| 523 |
* The traverse event type (value is 31). |
|---|
| 524 |
* |
|---|
| 525 |
* @see dwt.widgets.Widget#addListener |
|---|
| 526 |
* @see dwt.widgets.Display#addFilter |
|---|
| 527 |
* @see dwt.widgets.Event |
|---|
| 528 |
* |
|---|
| 529 |
* @see dwt.widgets.Control#addTraverseListener |
|---|
| 530 |
* @see dwt.events.TraverseListener#keyTraversed |
|---|
| 531 |
* @see dwt.events.TraverseEvent |
|---|
| 532 |
*/ |
|---|
| 533 |
public static const int Traverse = 31; |
|---|
| 534 |
|
|---|
| 535 |
/** |
|---|
| 536 |
* The mouse hover event type (value is 32). |
|---|
| 537 |
* |
|---|
| 538 |
* @see dwt.widgets.Widget#addListener |
|---|
| 539 |
* @see dwt.widgets.Display#addFilter |
|---|
| 540 |
* @see dwt.widgets.Event |
|---|
| 541 |
* |
|---|
| 542 |
* @see dwt.widgets.Control#addMouseTrackListener |
|---|
| 543 |
* @see dwt.events.MouseTrackListener#mouseHover |
|---|
| 544 |
* @see dwt.events.MouseEvent |
|---|
| 545 |
*/ |
|---|
| 546 |
public static const int MouseHover = 32; |
|---|
| 547 |
|
|---|
| 548 |
/** |
|---|
| 549 |
* The hardware key down event type (value is 33). |
|---|
| 550 |
* |
|---|
| 551 |
* @see dwt.widgets.Widget#addListener |
|---|
| 552 |
* @see dwt.widgets.Display#addFilter |
|---|
| 553 |
* @see dwt.widgets.Event |
|---|
| 554 |
*/ |
|---|
| 555 |
public static const int HardKeyDown = 33; |
|---|
| 556 |
|
|---|
| 557 |
/** |
|---|
| 558 |
* The hardware key up event type (value is 34). |
|---|
| 559 |
* |
|---|
| 560 |
* @see dwt.widgets.Widget#addListener |
|---|
| 561 |
* @see dwt.widgets.Display#addFilter |
|---|
| 562 |
* @see dwt.widgets.Event |
|---|
| 563 |
*/ |
|---|
| 564 |
public static const int HardKeyUp = 34; |
|---|
| 565 |
|
|---|
| 566 |
/** |
|---|
| 567 |
* The menu detect event type (value is 35). |
|---|
| 568 |
* |
|---|
| 569 |
* @see dwt.widgets.Widget#addListener |
|---|
| 570 |
* @see dwt.widgets.Display#addFilter |
|---|
| 571 |
* @see dwt.widgets.Event |
|---|
| 572 |
* |
|---|
| 573 |
* @since 3.0 |
|---|
| 574 |
*/ |
|---|
| 575 |
public static const int MenuDetect = 35; |
|---|
| 576 |
|
|---|
| 577 |
/** |
|---|
| 578 |
* The set data event type (value is 36). |
|---|
| 579 |
* |
|---|
| 580 |
* @see dwt.widgets.Widget#addListener |
|---|
| 581 |
* @see dwt.widgets.Display#addFilter |
|---|
| 582 |
* @see dwt.widgets.Event |
|---|
| 583 |
* |
|---|
| 584 |
* @see dwt.widgets.Table |
|---|
| 585 |
* @see dwt.widgets.Tree |
|---|
| 586 |
* |
|---|
| 587 |
* @since 3.0 |
|---|
| 588 |
*/ |
|---|
| 589 |
public static const int SetData = 36; |
|---|
| 590 |
|
|---|
| 591 |
/** |
|---|
| 592 |
* The mouse wheel event type (value is 37). |
|---|
| 593 |
* |
|---|
| 594 |
* @see dwt.widgets.Widget#addListener |
|---|
| 595 |
* @see dwt.widgets.Display#addFilter |
|---|
| 596 |
* @see dwt.widgets.Event |
|---|
| 597 |
* |
|---|
| 598 |
* @since 3.1 |
|---|
| 599 |
*/ |
|---|
| 600 |
public static const int MouseWheel = 37; |
|---|
| 601 |
|
|---|
| 602 |
/** |
|---|
| 603 |
* The settings changed event type (value is 39). |
|---|
| 604 |
* <p> |
|---|
| 605 |
* The settings changed event is sent when an operating system |
|---|
| 606 |
* property, such as a system font or color, has been changed. |
|---|
| 607 |
* The event occurs after the property has been changed, but |
|---|
| 608 |
* before any widget is redrawn. Applications that cache operating |
|---|
| 609 |
* system properties can use this event to update their caches. |
|---|
| 610 |
* A specific property change can be detected by querying the |
|---|
| 611 |
* new value of a property and comparing it with the equivalent |
|---|
| 612 |
* cached value. The operating system automatically redraws and |
|---|
| 613 |
* lays out all widgets after this event is sent. |
|---|
| 614 |
* </p> |
|---|
| 615 |
* |
|---|
| 616 |
* @see dwt.widgets.Display#addListener |
|---|
| 617 |
* @see dwt.widgets.Event |
|---|
| 618 |
* |
|---|
| 619 |
* @since 3.2 |
|---|
| 620 |
*/ |
|---|
| 621 |
public static const int Settings = 39; |
|---|
| 622 |
|
|---|
| 623 |
/** |
|---|
| 624 |
* The erase item event type (value is 40). |
|---|
| 625 |
* |
|---|
| 626 |
* @see dwt.widgets.Widget#addListener |
|---|
| 627 |
* @see dwt.widgets.Display#addFilter |
|---|
| 628 |
* @see dwt.widgets.Event |
|---|
| 629 |
* |
|---|
| 630 |
* @since 3.2 |
|---|
| 631 |
*/ |
|---|
| 632 |
public static const int EraseItem = 40; |
|---|
| 633 |
|
|---|
| 634 |
/** |
|---|
| 635 |
* The measure item event type (value is 41). |
|---|
| 636 |
* |
|---|
| 637 |
* @see dwt.widgets.Widget#addListener |
|---|
| 638 |
* @see dwt.widgets.Display#addFilter |
|---|
| 639 |
* @see dwt.widgets.Event |
|---|
| 640 |
* |
|---|
| 641 |
* @since 3.2 |
|---|
| 642 |
*/ |
|---|
| 643 |
public static const int MeasureItem = 41; |
|---|
| 644 |
|
|---|
| 645 |
/** |
|---|
| 646 |
* The paint item event type (value is 42). |
|---|
| 647 |
* |
|---|
| 648 |
* @see dwt.widgets.Widget#addListener |
|---|
| 649 |
* @see dwt.widgets.Display#addFilter |
|---|
| 650 |
* @see dwt.widgets.Event |
|---|
| 651 |
* |
|---|
| 652 |
* @since 3.2 |
|---|
| 653 |
*/ |
|---|
| 654 |
public static const int PaintItem = 42; |
|---|
| 655 |
|
|---|
| 656 |
/** |
|---|
| 657 |
* The IME composition event type (value is 43). |
|---|
| 658 |
* <p> |
|---|
| 659 |
* The IME composition event is sent to allow |
|---|
| 660 |
* custom text editors to implement in-line |
|---|
| 661 |
* editing of international text. |
|---|
| 662 |
* </p> |
|---|
| 663 |
* |
|---|
| 664 |
* The detail field indicates the action to be taken: |
|---|
| 665 |
* <p><ul> |
|---|
| 666 |
* <li>{@link DWT#COMPOSITION_CHANGED}</li> |
|---|
| 667 |
* <li>{@link DWT#COMPOSITION_OFFSET}</li> |
|---|
| 668 |
* <li>{@link DWT#COMPOSITION_SELECTION}</li> |
|---|
| 669 |
* </ul></p> |
|---|
| 670 |
* |
|---|
| 671 |
* @see dwt.widgets.Widget#addListener |
|---|
| 672 |
* @see dwt.widgets.Display#addFilter |
|---|
| 673 |
* @see dwt.widgets.Event |
|---|
| 674 |
* |
|---|
| 675 |
* @since 3.4 |
|---|
| 676 |
*/ |
|---|
| 677 |
public static const int ImeComposition = 43; |
|---|
| 678 |
|
|---|
| 679 |
/* Event Details */ |
|---|
| 680 |
|
|---|
| 681 |
/** |
|---|
| 682 |
* The IME composition event detail that indicates |
|---|
| 683 |
* a change in the IME composition. The text field |
|---|
| 684 |
* of the event is the new composition text. |
|---|
| 685 |
* The start and end indicate the offsets where the |
|---|
| 686 |
* composition text should be inserted. |
|---|
| 687 |
* The styles and ranges are stored in the IME |
|---|
| 688 |
* object (value is 1). |
|---|
| 689 |
* |
|---|
| 690 |
* @see DWT#ImeComposition |
|---|
| 691 |
* |
|---|
| 692 |
* @since 3.4 |
|---|
| 693 |
*/ |
|---|
| 694 |
public static const int COMPOSITION_CHANGED = 1; |
|---|
| 695 |
|
|---|
| 696 |
/** |
|---|
| 697 |
* The IME composition event detail that indicates |
|---|
| 698 |
* that the IME needs the offset for a given location. |
|---|
| 699 |
* The x and y fields of the event are used by the |
|---|
| 700 |
* application to determine the offset. |
|---|
| 701 |
* |
|---|
| 702 |
* The index field of the event should be set to the |
|---|
| 703 |
* text offset at that location. The count field should |
|---|
| 704 |
* be set to indicate whether the location is closer to |
|---|
| 705 |
* the leading edge (0) or the trailing edge (1) (value is 2). |
|---|
| 706 |
* |
|---|
| 707 |
* @see DWT#ImeComposition |
|---|
| 708 |
* @see dwt.graphics.TextLayout#getOffset(int, int, int[]) |
|---|
| 709 |
* |
|---|
| 710 |
* @since 3.4 |
|---|
| 711 |
*/ |
|---|
| 712 |
public static const int COMPOSITION_OFFSET = 2; |
|---|
| 713 |
|
|---|
| 714 |
/** |
|---|
| 715 |
* The IME composition event detail that indicates |
|---|
| 716 |
* that IME needs the selected text and its start |
|---|
| 717 |
* and end offsets (value is 3). |
|---|
| 718 |
* |
|---|
| 719 |
* @see DWT#ImeComposition |
|---|
| 720 |
* |
|---|
| 721 |
* @since 3.4 |
|---|
| 722 |
*/ |
|---|
| 723 |
public static const int COMPOSITION_SELECTION = 3; |
|---|
| 724 |
|
|---|
| 725 |
/** |
|---|
| 726 |
* Indicates that a user-interface component is being dragged, |
|---|
| 727 |
* for example dragging the thumb of a scroll bar (value is 1). |
|---|
| 728 |
*/ |
|---|
| 729 |
public static const int DRAG = 1; |
|---|
| 730 |
|
|---|
| 731 |
/** |
|---|
| 732 |
* Event detail field that indicates a user-interface component |
|---|
| 733 |
* state is selected (value is 1<<1). |
|---|
| 734 |
* |
|---|
| 735 |
* @since 3.2 |
|---|
| 736 |
*/ |
|---|
| 737 |
public static const int SELECTED = 1 << 1; |
|---|
| 738 |
|
|---|
| 739 |
/** |
|---|
| 740 |
* Event detail field that indicates a user-interface component |
|---|
| 741 |
* state is focused (value is 1<<2). |
|---|
| 742 |
* |
|---|
| 743 |
* @since 3.2 |
|---|
| 744 |
*/ |
|---|
| 745 |
public static const int FOCUSED = 1 << 2; |
|---|
| 746 |
|
|---|
| 747 |
/** |
|---|
| 748 |
* Event detail field that indicates a user-interface component |
|---|
| 749 |
* draws the background (value is 1<<3). |
|---|
| 750 |
* |
|---|
| 751 |
* @since 3.2 |
|---|
| 752 |
*/ |
|---|
| 753 |
public static const int BACKGROUND = 1 << 3; |
|---|
| 754 |
|
|---|
| 755 |
/** |
|---|
| 756 |
* Event detail field that indicates a user-interface component |
|---|
| 757 |
* draws the foreground (value is 1<<4). |
|---|
| 758 |
* |
|---|
| 759 |
* @since 3.2 |
|---|
| 760 |
*/ |
|---|
| 761 |
public static const int FOREGROUND = 1 << 4; |
|---|
| 762 |
|
|---|
| 763 |
/** |
|---|
| 764 |
* Event detail field that indicates a user-interface component |
|---|
| 765 |
* state is hot (value is 1<<5). |
|---|
| 766 |
* |
|---|
| 767 |
* @since 3.3 |
|---|
| 768 |
*/ |
|---|
| 769 |
public static const int HOT = 1 << 5; |
|---|
| 770 |
|
|---|
| 771 |
/* This code is intentionally commented */ |
|---|
| 772 |
//public static const int PRESSED = 1 << 3; |
|---|
| 773 |
//public static const int ACTIVE = 1 << 4; |
|---|
| 774 |
//public static const int DISABLED = 1 << 5; |
|---|
| 775 |
//public static const int HOT = 1 << 6; |
|---|
| 776 |
//public static const int DEFAULTED = 1 << 7; |
|---|
| 777 |
|
|---|
| 778 |
/** |
|---|
| 779 |
* Traversal event detail field value indicating that no |
|---|
| 780 |
* traversal action should be taken |
|---|
| 781 |
* (value is 0). |
|---|
| 782 |
*/ |
|---|
| 783 |
public static const int TRAVERSE_NONE = 0; |
|---|
| 784 |
|
|---|
| 785 |
/** |
|---|
| 786 |
* Traversal event detail field value indicating that the |
|---|
| 787 |
* key which designates that a dialog should be cancelled was |
|---|
| 788 |
* pressed; typically, this is the ESC key |
|---|
| 789 |
* (value is 1<<1). |
|---|
| 790 |
*/ |
|---|
| 791 |
public static const int TRAVERSE_ESCAPE = 1 << 1; |
|---|
| 792 |
|
|---|
| 793 |
/** |
|---|
| 794 |
* Traversal event detail field value indicating that the |
|---|
| 795 |
* key which activates the default button in a dialog was |
|---|
| 796 |
* pressed; typically, this is the ENTER key |
|---|
| 797 |
* (value is 1<<2). |
|---|
| 798 |
*/ |
|---|
| 799 |
public static const int TRAVERSE_RETURN = 1 << 2; |
|---|
| 800 |
|
|---|
| 801 |
/** |
|---|
| 802 |
* Traversal event detail field value indicating that the |
|---|
| 803 |
* key which designates that focus should be given to the |
|---|
| 804 |
* previous tab group was pressed; typically, this is the |
|---|
| 805 |
* SHIFT-TAB key sequence |
|---|
| 806 |
* (value is 1<<3). |
|---|
| 807 |
*/ |
|---|
| 808 |
public static const int TRAVERSE_TAB_PREVIOUS = 1 << 3; |
|---|
| 809 |
|
|---|
| 810 |
/** |
|---|
| 811 |
* Traversal event detail field value indicating that the |
|---|
| 812 |
* key which designates that focus should be given to the |
|---|
| 813 |
* next tab group was pressed; typically, this is the |
|---|
| 814 |
* TAB key |
|---|
| 815 |
* (value is 1<<4). |
|---|
| 816 |
*/ |
|---|
| 817 |
public static const int TRAVERSE_TAB_NEXT = 1 << 4; |
|---|
| 818 |
|
|---|
| 819 |
/** |
|---|
| 820 |
* Traversal event detail field value indicating that the |
|---|
| 821 |
* key which designates that focus should be given to the |
|---|
| 822 |
* previous tab item was pressed; typically, this is either |
|---|
| 823 |
* the LEFT-ARROW or UP-ARROW keys |
|---|
| 824 |
* (value is 1<<5). |
|---|
| 825 |
*/ |
|---|
| 826 |
public static const int TRAVERSE_ARROW_PREVIOUS = 1 << 5; |
|---|
| 827 |
|
|---|
| 828 |
/** |
|---|
| 829 |
* Traversal event detail field value indicating that the |
|---|
| 830 |
* key which designates that focus should be given to the |
|---|
| 831 |
* previous tab item was pressed; typically, this is either |
|---|
| 832 |
* the RIGHT-ARROW or DOWN-ARROW keys |
|---|
| 833 |
* (value is 1<<6). |
|---|
| 834 |
*/ |
|---|
| 835 |
public static const int TRAVERSE_ARROW_NEXT = 1 << 6; |
|---|
| 836 |
|
|---|
| 837 |
/** |
|---|
| 838 |
* Traversal event detail field value indicating that a |
|---|
| 839 |
* mnemonic key sequence was pressed |
|---|
| 840 |
* (value is 1<<7). |
|---|
| 841 |
*/ |
|---|
| 842 |
public static const int TRAVERSE_MNEMONIC = 1 << 7; |
|---|
| 843 |
|
|---|
| 844 |
/** |
|---|
| 845 |
* Traversal event detail field value indicating that the |
|---|
| 846 |
* key which designates that the previous page of a multi-page |
|---|
| 847 |
* window should be shown was pressed; typically, this |
|---|
| 848 |
* is the CTRL-PAGEUP key sequence |
|---|
| 849 |
* (value is 1<<8). |
|---|
| 850 |
*/ |
|---|
| 851 |
public static const int TRAVERSE_PAGE_PREVIOUS = 1 << 8; |
|---|
| 852 |
|
|---|
| 853 |
/** |
|---|
| 854 |
* Traversal event detail field value indicating that the |
|---|
| 855 |
* key which designates that the next page of a multi-page |
|---|
| 856 |
* window should be shown was pressed; typically, this |
|---|
| 857 |
* is the CTRL-PAGEDOWN key sequence |
|---|
| 858 |
* (value is 1<<9). |
|---|
| 859 |
*/ |
|---|
| 860 |
public static const int TRAVERSE_PAGE_NEXT = 1 << 9; |
|---|
| 861 |
|
|---|
| 862 |
/** |
|---|
| 863 |
* A constant known to be zero (0), typically used in operations |
|---|
| 864 |
* which take bit flags to indicate that "no bits are set". |
|---|
| 865 |
*/ |
|---|
| 866 |
public static const int NONE = 0; |
|---|
| 867 |
|
|---|
| 868 |
/** |
|---|
| 869 |
* A constant known to be zero (0), used in operations which |
|---|
| 870 |
* take pointers to indicate a null argument. |
|---|
| 871 |
*/ |
|---|
| 872 |
public static const int NULL = 0; |
|---|
| 873 |
|
|---|
| 874 |
/** |
|---|
| 875 |
* Indicates that a default should be used (value is -1). |
|---|
| 876 |
*/ |
|---|
| 877 |
public static const int DEFAULT = -1; |
|---|
| 878 |
|
|---|
| 879 |
/** |
|---|
| 880 |
* Indicates that a property is off (value is 0). |
|---|
| 881 |
* |
|---|
| 882 |
* @since 3.1 |
|---|
| 883 |
*/ |
|---|
| 884 |
public st |
|---|