comparison dwt/widgets/Tray.d @ 15:2952d5604c0a

Ported some widgets, added some stuff to the runtime bindings
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Fri, 29 Aug 2008 21:46:05 +0200
parents 380af2bdd8e5
children 5b53d338c709
comparison
equal deleted inserted replaced
14:762fbe6f17d3 15:2952d5604c0a
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * IBM Corporation - initial API and implementation 9 * IBM Corporation - initial API and implementation
10 *
11 * Port to the D programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com>
10 *******************************************************************************/ 13 *******************************************************************************/
11 module dwt.widgets.Tray; 14 module dwt.widgets.Tray;
12
13 import dwt.dwthelper.utils;
14 15
15 16
16 import dwt.DWT; 17 import dwt.DWT;
17 import dwt.DWTException; 18 import dwt.DWTException;
19
20 import dwt.dwthelper.utils;
21 import dwt.widgets.Display;
22 import dwt.widgets.Widget;
23 import dwt.widgets.TrayItem;
18 24
19 /** 25 /**
20 * Instances of this class represent the system tray that is part 26 * Instances of this class represent the system tray that is part
21 * of the task bar status area on some operating systems. 27 * of the task bar status area on some operating systems.
22 * 28 *
32 * 38 *
33 * @see Display#getSystemTray 39 * @see Display#getSystemTray
34 * 40 *
35 * @since 3.0 41 * @since 3.0
36 */ 42 */
37 public class Tray extends Widget { 43 public class Tray : Widget {
38 int itemCount; 44 int itemCount;
39 TrayItem [] items = new TrayItem [4]; 45 TrayItem [] items = new TrayItem [4];
40 46
41 Tray (Display display, int style) { 47 this (Display display, int style) {
42 if (display is null) display = Display.getCurrent (); 48 if (display is null) display = Display.getCurrent ();
43 if (display is null) display = Display.getDefault (); 49 if (display is null) display = Display.getDefault ();
44 if (!display.isValidThread ()) { 50 if (!display.isValidThread ()) {
45 error (DWT.ERROR_THREAD_INVALID_ACCESS); 51 error (DWT.ERROR_THREAD_INVALID_ACCESS);
46 } 52 }