comparison org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet258.d @ 29:4e5843b771cc

First snippets buildable on windows
author Frank Benoit <benoit@tionex.de>
date Sun, 22 Mar 2009 19:55:00 +0100
parents 69b1fa94a4a8
children 9f4c18c268b2
comparison
equal deleted inserted replaced
28:69b1fa94a4a8 29:4e5843b771cc
40 void main() { 40 void main() {
41 auto display = new Display(); 41 auto display = new Display();
42 auto shell = new Shell(display); 42 auto shell = new Shell(display);
43 shell.setLayout(new GridLayout(2, false)); 43 shell.setLayout(new GridLayout(2, false));
44 44
45 auto text = new Text(shell, SWT.SEARCH | DWT.CANCEL); 45 auto text = new Text(shell, SWT.SEARCH | SWT.CANCEL);
46 Image image = null; 46 Image image = null;
47 if ((text.getStyle() & SWT.CANCEL) == 0) { 47 if ((text.getStyle() & SWT.CANCEL) == 0) {
48 image = new Image (display, new ImageData(new ByteArrayInputStream( cast(byte[]) import("links_obj.gif" )))); 48 image = new Image (display, new ImageData(new ByteArrayInputStream( cast(byte[]) import("links_obj.gif" ))));
49 auto toolBar = new ToolBar (shell, SWT.FLAT); 49 auto toolBar = new ToolBar (shell, SWT.FLAT);
50 auto item = new ToolItem (toolBar, SWT.PUSH); 50 auto item = new ToolItem (toolBar, SWT.PUSH);