comparison dwt/widgets/Tray.d @ 37:642f460a0908

Fixed a lot of compile errors, a "hello world" app compiles now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Fri, 10 Oct 2008 12:29:48 +0200
parents 5b53d338c709
children d8635bb48c7c
comparison
equal deleted inserted replaced
36:db5a898b2119 37:642f460a0908
40 * 40 *
41 * @since 3.0 41 * @since 3.0
42 */ 42 */
43 public class Tray : Widget { 43 public class Tray : Widget {
44 int itemCount; 44 int itemCount;
45 TrayItem [] items = new TrayItem [4]; 45 TrayItem [] items;
46 46
47 this (Display display, int style) { 47 this (Display display, int style) {
48 if (display is null) display = Display.getCurrent (); 48 if (display is null) display = Display.getCurrent ();
49 if (display is null) display = Display.getDefault (); 49 if (display is null) display = Display.getDefault ();
50 if (!display.isValidThread ()) { 50 if (!display.isValidThread ()) {
51 error (DWT.ERROR_THREAD_INVALID_ACCESS); 51 error (DWT.ERROR_THREAD_INVALID_ACCESS);
52 } 52 }
53 this.display = display; 53 this.display = display;
54 items = new TrayItem [4];
54 } 55 }
55 56
56 void createItem (TrayItem item, int index) { 57 void createItem (TrayItem item, int index) {
57 if (!(0 <= index && index <= itemCount)) error (DWT.ERROR_INVALID_RANGE); 58 if (!(0 <= index && index <= itemCount)) error (DWT.ERROR_INVALID_RANGE);
58 if (itemCount is items.length) { 59 if (itemCount is items.length) {