changeset 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 93b0e7382fd5
files org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet10.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet107.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet115.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet118.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet122.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130a.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet133.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet134.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet144.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet165.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet170.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet193.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet208.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet21.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet211.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet212.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet213.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet215.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet217.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet218.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet222.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet223.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet226.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet235.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet237.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet24.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet247.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet251.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet258.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet282.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet286.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet288.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet38.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet39.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet47.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet48.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet7.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet75.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet9.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet94.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet96.d org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet97.d rakefile
diffstat 49 files changed, 177 insertions(+), 87 deletions(-) [+]
line wrap: on
line diff
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet10.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet10.d	Sun Mar 22 19:55:00 2009 +0100
@@ -39,7 +39,7 @@
     Shell shell = new Shell(display);
     shell.setText("Advanced Graphics");
     FontData fd = shell.getFont().getFontData()[0];
-    Font font = new Font(display, fd.getName(), 60., SWT.BOLD | DWT.ITALIC);
+    Font font = new Font(display, fd.getName(), 60., SWT.BOLD | SWT.ITALIC);
     Image image = new Image(display, 640, 480);
     Rectangle rect = image.getBounds();
     GC gc = new GC(image);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet107.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet107.d	Sun Mar 22 19:55:00 2009 +0100
@@ -27,7 +27,7 @@
 import org.eclipse.swt.widgets.Sash;
 import org.eclipse.swt.widgets.Shell;
 
-import tango.math.Math;
+import java.lang.all;
 
 void main () {
     auto display = new Display ();
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet115.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet115.d	Sun Mar 22 19:55:00 2009 +0100
@@ -35,9 +35,9 @@
     Display display = new Display ();
     Shell shell = new Shell (display);
     shell.setLayout (new RowLayout (SWT.VERTICAL));
-    Composite c1 = new Composite (shell, SWT.BORDER | DWT.NO_RADIO_GROUP);
+    Composite c1 = new Composite (shell, SWT.BORDER | SWT.NO_RADIO_GROUP);
     c1.setLayout (new RowLayout ());
-    Composite c2 = new Composite (shell, SWT.BORDER | DWT.NO_RADIO_GROUP);
+    Composite c2 = new Composite (shell, SWT.BORDER | SWT.NO_RADIO_GROUP);
     c2.setLayout (new RowLayout ());
     Composite [] composites = [c1, c2];
     Listener radioGroup = new class() Listener{
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet118.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet118.d	Sun Mar 22 19:55:00 2009 +0100
@@ -40,7 +40,7 @@
     Cursor[] cursor = new Cursor[1];
     Button button = new Button(shell, SWT.PUSH);
     button.setText("Change cursor");
-    Point size = button.computeSize(SWT.DEFAULT, DWT.DEFAULT);
+    Point size = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);
     button.setSize(size);
     button.addListener(SWT.Selection, new class() Listener{
         public void handleEvent(Event e) {
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet122.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet122.d	Sun Mar 22 19:55:00 2009 +0100
@@ -42,7 +42,7 @@
     Clipboard cb = new Clipboard(display);
     Shell shell = new Shell(display);
     shell.setLayout(new FillLayout());
-    Text text = new Text(shell, SWT.BORDER | DWT.MULTI | DWT.WRAP);
+    Text text = new Text(shell, SWT.BORDER | SWT.MULTI | SWT.WRAP);
     Menu menu = new Menu(shell, SWT.POP_UP);
     MenuItem copyItem = new MenuItem(menu, SWT.PUSH);
     copyItem.setText("Copy");
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.d	Sun Mar 22 19:55:00 2009 +0100
@@ -34,8 +34,8 @@
 import java.lang.all;
 
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.DWTError;
-import org.eclipse.swt.DWTException;
+import org.eclipse.swt.SWTError;
+import org.eclipse.swt.SWTException;
 
 import org.eclipse.swt.browser.Browser;
 import org.eclipse.swt.browser.ProgressEvent;
@@ -93,7 +93,7 @@
 	Browser browser;
 	try {
 		browser = new Browser(shell, SWT.NONE);
-	} catch (DWTError e) {
+	} catch (SWTError e) {
 		Cout ("Could not instantiate Browser: " ~ e.getMessage());
 		return;
 	}
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130.d	Sun Mar 22 19:55:00 2009 +0100
@@ -49,7 +49,7 @@
         Display display = new Display();
         Shell shell = new Shell(display);
         shell.setLayout(new GridLayout());
-        Text text = new Text(shell, SWT.MULTI | DWT.BORDER | DWT.V_SCROLL);
+        Text text = new Text(shell, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
         text.setLayoutData(new GridData(GridData.FILL_BOTH));
         int[] nextId = new int[1];
         Button b = new Button(shell, SWT.PUSH);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130a.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet130a.d	Sun Mar 22 19:55:00 2009 +0100
@@ -49,7 +49,7 @@
         Display display = new Display();
         Shell shell = new Shell(display);
         shell.setLayout(new GridLayout());
-        Text text = new Text(shell, SWT.MULTI | DWT.BORDER | DWT.V_SCROLL);
+        Text text = new Text(shell, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
         text.setLayoutData(new GridData(GridData.FILL_BOTH));
         int[] nextId = new int[1];
         Button b = new Button(shell, SWT.PUSH);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet133.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet133.d	Sun Mar 22 19:55:00 2009 +0100
@@ -87,7 +87,7 @@
         shell = new Shell(display);
         shell.setLayout(new FillLayout());
         shell.setText("Print Text");
-        text = new Text(shell, SWT.BORDER | DWT.MULTI | DWT.V_SCROLL | DWT.H_SCROLL);
+        text = new Text(shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
 
         Menu menuBar = new Menu(shell, SWT.BAR);
         shell.setMenuBar(menuBar);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet134.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet134.d	Sun Mar 22 19:55:00 2009 +0100
@@ -56,7 +56,7 @@
 void main(char[][] args) {
     display = new Display();
     //Shell must be created with style SWT.NO_TRIM
-    shell = new Shell(display, SWT.NO_TRIM | DWT.ON_TOP);
+    shell = new Shell(display, SWT.NO_TRIM | SWT.ON_TOP);
     shell.setBackground(display.getSystemColor(SWT.COLOR_RED));
     //define a region that looks like a key hole
     Region region = new Region();
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet136.d	Sun Mar 22 19:55:00 2009 +0100
@@ -21,8 +21,8 @@
  * @since 3.0
  */
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.DWTError;
-import org.eclipse.swt.DWTException;
+import org.eclipse.swt.SWTError;
+import org.eclipse.swt.SWTException;
 
 import org.eclipse.swt.browser.Browser;
 import org.eclipse.swt.widgets.Display;
@@ -52,7 +52,7 @@
 		Browser browser;
 		try {
 			browser = new Browser(shell, SWT.NONE);
-		} catch (DWTError e) {
+		} catch (SWTError e) {
 			Cout("Could not instatiate Browser.").newline;
 			return;
 		}
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet140.d	Sun Mar 22 19:55:00 2009 +0100
@@ -46,9 +46,9 @@
     display = new Display ();
     shell = new Shell (display);
     shell.setLayout(new GridLayout());
-    coolBar = new CoolBar(shell, SWT.FLAT | DWT.BORDER);
+    coolBar = new CoolBar(shell, SWT.FLAT | SWT.BORDER);
     coolBar.setLayoutData(new GridData(GridData.FILL_BOTH));
-    ToolBar toolBar = new ToolBar(coolBar, SWT.FLAT | DWT.WRAP);
+    ToolBar toolBar = new ToolBar(coolBar, SWT.FLAT | SWT.WRAP);
     int minWidth = 0;
     for (int j = 0; j < 5; j++) {
         int width = 0;
@@ -60,7 +60,7 @@
     }
     CoolItem coolItem = new CoolItem(coolBar, SWT.DROP_DOWN);
     coolItem.setControl(toolBar);
-    Point size = toolBar.computeSize(SWT.DEFAULT, DWT.DEFAULT);
+    Point size = toolBar.computeSize(SWT.DEFAULT, SWT.DEFAULT);
     Point coolSize = coolItem.computeSize (size.x, size.y);
     coolItem.setMinimumSize(minWidth, coolSize.y);
     coolItem.setPreferredSize(coolSize);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet144.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet144.d	Sun Mar 22 19:55:00 2009 +0100
@@ -42,7 +42,7 @@
     auto display = new Display ();
     auto shell = new Shell (display);
     shell.setLayout (new RowLayout (SWT.VERTICAL));
-    auto table = new Table (shell, SWT.VIRTUAL | DWT.BORDER);
+    auto table = new Table (shell, SWT.VIRTUAL | SWT.BORDER);
     table.addListener (SWT.SetData, new class Listener {
         public void handleEvent (Event event) {
             auto item = cast(TableItem) event.item;
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet150.d	Sun Mar 22 19:55:00 2009 +0100
@@ -63,7 +63,7 @@
     createItem(coolBar, 2);
     createItem(coolBar, 3);
     createItem(coolBar, 4);
-    int style = SWT.BORDER | DWT.H_SCROLL | DWT.V_SCROLL;
+    int style = SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL;
     Text text = new Text(shell, style);
     FormLayout layout = new FormLayout();
     shell.setLayout(layout);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet165.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet165.d	Sun Mar 22 19:55:00 2009 +0100
@@ -48,7 +48,7 @@
     auto shell = new Shell (display);
     shell.setLayout(new GridLayout());
     auto folder = new CTabFolder(shell, SWT.BORDER);
-    folder.setLayoutData(new GridData(SWT.FILL, DWT.FILL, true, false));
+    folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
     folder.setSimple(false);
     folder.setUnselectedImageVisible(false);
     folder.setUnselectedCloseVisible(false);
@@ -56,7 +56,7 @@
         CTabItem item = new CTabItem(folder, SWT.CLOSE);
         item.setText("Item " ~ to!(char[])(i));
         item.setImage(image);
-        Text text = new Text(folder, SWT.MULTI | DWT.V_SCROLL | DWT.H_SCROLL);
+        Text text = new Text(folder, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
         text.setText("Text for item " ~ to!(char[])(i) ~
                      "\n\none, two, three\n\nabcdefghijklmnop");
         item.setControl(text);
@@ -70,13 +70,13 @@
         }
         public void maximize(CTabFolderEvent event) {
             folder.setMaximized(true);
-            folder.setLayoutData(new GridData(SWT.FILL, DWT.FILL, true, true));
+            folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
             shell.layout(true);
         }
         public void restore(CTabFolderEvent event) {
             folder.setMinimized(false);
             folder.setMaximized(false);
-            folder.setLayoutData(new GridData(SWT.FILL, DWT.FILL, true, false));
+            folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
             shell.layout(true);
         }
     });
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet170.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet170.d	Sun Mar 22 19:55:00 2009 +0100
@@ -37,7 +37,7 @@
     Display display = new Display();
     final Shell shell = new Shell(display);
     shell.setLayout(new FillLayout());
-    Tree tree = new Tree(shell, SWT.BORDER | DWT.H_SCROLL | DWT.V_SCROLL);
+    Tree tree = new Tree(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
     tree.setHeaderVisible(true);
     TreeColumn column1 = new TreeColumn(tree, SWT.LEFT);
     column1.setText("Column 1");
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet193.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet193.d	Sun Mar 22 19:55:00 2009 +0100
@@ -42,7 +42,7 @@
     Display display = new Display();
     Shell shell = new Shell(display);
     shell.setLayout(new RowLayout(SWT.HORIZONTAL));
-    final Tree tree = new Tree(shell, SWT.BORDER | DWT.CHECK);
+    final Tree tree = new Tree(shell, SWT.BORDER | SWT.CHECK);
     tree.setLayoutData(new RowData(-1, 300));
     tree.setHeaderVisible(true);
     TreeColumn column = new TreeColumn(tree, SWT.LEFT);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet20.d	Sun Mar 22 19:55:00 2009 +0100
@@ -36,7 +36,7 @@
         auto item = new CoolItem (bar, SWT.NONE);
         auto button = new Button (bar, SWT.PUSH);
         button.setText ("Button " ~ to!(char[])(i));
-        auto size = button.computeSize (SWT.DEFAULT, DWT.DEFAULT);
+        auto size = button.computeSize (SWT.DEFAULT, SWT.DEFAULT);
         item.setPreferredSize (item.computeSize (size.x, size.y));
         item.setControl (button);
     }
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet208.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet208.d	Sun Mar 22 19:55:00 2009 +0100
@@ -73,32 +73,32 @@
 
     Label label = new Label(shell, SWT.CENTER);
     label.setImage(hueImage);
-    GridData data = new GridData(SWT.RIGHT, DWT.CENTER, false, false, 2, 1);
+    GridData data = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 2, 1);
     label.setLayoutData(data);
 
     label = new Label(shell, SWT.CENTER); //spacer
     label = new Label(shell, SWT.CENTER);
     label.setText("Hue");
-    data = new GridData(SWT.CENTER, DWT.CENTER, false, false);
+    data = new GridData(SWT.CENTER, SWT.CENTER, false, false);
     label.setLayoutData(data);
     label = new Label(shell, SWT.CENTER); //spacer
-    data = new GridData(SWT.CENTER, DWT.CENTER, false, false, 2, 1);
+    data = new GridData(SWT.CENTER, SWT.CENTER, false, false, 2, 1);
     label.setLayoutData(data);
 
     label = new Label(shell, SWT.LEFT);
     label.setText("Brightness");
-    data = new GridData(SWT.LEFT, DWT.CENTER, false, false);
+    data = new GridData(SWT.LEFT, SWT.CENTER, false, false);
     label.setLayoutData(data);
 
     label = new Label(shell, SWT.CENTER);
     label.setImage(saturationImage);
-    data = new GridData(SWT.CENTER, DWT.CENTER, false, false);
+    data = new GridData(SWT.CENTER, SWT.CENTER, false, false);
     label.setLayoutData (data);
 
     label = new Label(shell, SWT.CENTER); //spacer
     label = new Label(shell, SWT.CENTER);
     label.setText("Saturation");
-    data = new GridData(SWT.CENTER, DWT.CENTER, false, false);
+    data = new GridData(SWT.CENTER, SWT.CENTER, false, false);
     label.setLayoutData(data);
 
     shell.pack();
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet21.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet21.d	Sun Mar 22 19:55:00 2009 +0100
@@ -84,10 +84,10 @@
 	c.addListener (SWT.FocusOut, dgListener(&onFocusOut, c));
 	c.addListener (SWT.KeyDown, dgListener(&onKeyDown, c));
 
-	Text t = new Text (shell, SWT.SINGLE | DWT.BORDER);
+	Text t = new Text (shell, SWT.SINGLE | SWT.BORDER);
 	t.setBounds (10, 85, 100, 32);
 
-	Text r = new Text (shell, SWT.MULTI | DWT.BORDER);
+	Text r = new Text (shell, SWT.MULTI | SWT.BORDER);
 	r.setBounds (10, 120, 100, 32);
 	
 	c.setFocus ();
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet211.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet211.d	Sun Mar 22 19:55:00 2009 +0100
@@ -48,7 +48,7 @@
     Display display = new Display();
     Shell shell = new Shell(display);
     shell.setLayout(new FillLayout());
-    StyledText styledText = new StyledText(shell, SWT.WRAP | DWT.BORDER);
+    StyledText styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER);
     styledText.setText(text);
     FontData data = styledText.getFont().getFontData()[0];
     Font font1 = new Font(display, data.getName(), data.getHeight() * 2f, data.getStyle());
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet212.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet212.d	Sun Mar 22 19:55:00 2009 +0100
@@ -92,8 +92,8 @@
     Display display = new Display();
     Shell shell = new Shell(display);
     shell.setLayout(new GridLayout());
-    styledText = new StyledText(shell, SWT.WRAP | DWT.BORDER);
-    styledText.setLayoutData(new GridData(SWT.FILL, DWT.FILL, true, true));
+    styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER);
+    styledText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
     styledText.setText(text);
     images = [
         display.getSystemImage(SWT.ICON_QUESTION),
@@ -154,7 +154,7 @@
     
     Button button = new Button (shell, SWT.PUSH);
     button.setText("Add Image");
-    button.setLayoutData(new GridData(SWT.CENTER, DWT.CENTER, false, false));
+    button.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false));
     
     void onSelection(Event e) {
        FileDialog dialog = new FileDialog(shell);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet213.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet213.d	Sun Mar 22 19:55:00 2009 +0100
@@ -44,7 +44,7 @@
     Display display = new Display();
     Shell shell = new Shell(display);
     shell.setLayout(new FillLayout());
-    StyledText styledText = new StyledText(shell, SWT.WRAP | DWT.BORDER);
+    StyledText styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER);
     styledText.setText(text);
     styledText.setLineIndent(0, 1, 50);
     styledText.setLineAlignment(2, 1, SWT.CENTER);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet215.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet215.d	Sun Mar 22 19:55:00 2009 +0100
@@ -58,7 +58,7 @@
                     }
                 });
 
-            ScrolledComposite sc = new ScrolledComposite (popup, SWT.V_SCROLL | DWT.H_SCROLL);
+            ScrolledComposite sc = new ScrolledComposite (popup, SWT.V_SCROLL | SWT.H_SCROLL);
             Canvas canvas = new Canvas(sc, SWT.NONE);
             sc.setContent(canvas);
             canvas.setBounds(display.getBounds ());
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet217.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet217.d	Sun Mar 22 19:55:00 2009 +0100
@@ -75,9 +75,9 @@
     Font font = new Font(display, "Tahoma", 32f, SWT.NORMAL);
     Shell shell = new Shell(display);
     shell.setLayout(new GridLayout());
-    styledText = new StyledText(shell, SWT.WRAP | DWT.BORDER);
+    styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER);
     styledText.setFont(font);
-    styledText.setLayoutData(new GridData(SWT.FILL, DWT.FILL, true, true));
+    styledText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
     styledText.setText(text);
     controls = new Control[2];
     Button button = new Button(styledText, SWT.PUSH);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet218.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet218.d	Sun Mar 22 19:55:00 2009 +0100
@@ -55,7 +55,7 @@
     Display display = new Display();
     Shell shell = new Shell(display);
     shell.setLayout(new FillLayout());
-    StyledText styledText = new StyledText(shell, SWT.WRAP | DWT.BORDER);
+    StyledText styledText = new StyledText(shell, SWT.WRAP | SWT.BORDER);
     styledText.setText(text);
     FontData data = display.getSystemFont().getFontData()[0];
     Font font = new Font(display, data.getName(), 16f, SWT.BOLD);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet222.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet222.d	Sun Mar 22 19:55:00 2009 +0100
@@ -53,7 +53,7 @@
     Shell shell = new Shell(display);
     shell.setText("StyledText Bullet Example");
     shell.setLayout(new FillLayout());
-    StyledText styledText = new StyledText (shell, SWT.FULL_SELECTION | DWT.BORDER | DWT.WRAP | DWT.V_SCROLL);
+    StyledText styledText = new StyledText (shell, SWT.FULL_SELECTION | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL);
     StringBuffer text = new StringBuffer();
     text.append("Here is StyledText with some bulleted lists:\n\n");
     for (int i = 0; i < 4; i++) text.append("Red Bullet List Item " ~ to!(char[])(i) ~ "\n");
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet223.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet223.d	Sun Mar 22 19:55:00 2009 +0100
@@ -61,7 +61,7 @@
     button.setText("SWT.TOGGLE");
     ExpandItem item0 = new ExpandItem (bar, SWT.NONE, 0);
     item0.setText("What is your favorite button");
-    item0.setHeight(composite.computeSize(SWT.DEFAULT, DWT.DEFAULT).y);
+    item0.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
     item0.setControl(composite);
     item0.setImage(image);
     
@@ -89,7 +89,7 @@
     label.setText("SWT.ICON_QUESTION");
     ExpandItem item1 = new ExpandItem (bar, SWT.NONE, 1);
     item1.setText("What is your favorite icon");
-    item1.setHeight(composite.computeSize(SWT.DEFAULT, DWT.DEFAULT).y);
+    item1.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
     item1.setControl(composite);
     item1.setImage(image);
     
@@ -110,7 +110,7 @@
     new Slider (composite, SWT.NONE);
     ExpandItem item2 = new ExpandItem (bar, SWT.NONE, 2);
     item2.setText("What is your favorite range widget");
-    item2.setHeight(composite.computeSize(SWT.DEFAULT, DWT.DEFAULT).y);
+    item2.setHeight(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
     item2.setControl(composite);
     item2.setImage(image);
     
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet226.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet226.d	Sun Mar 22 19:55:00 2009 +0100
@@ -44,7 +44,7 @@
 	Shell shell = new Shell(display);
 	shell.setText("Custom gradient selection for Tree");
 	shell.setLayout(new FillLayout());
-	final Tree tree = new Tree(shell, SWT.MULTI | DWT.FULL_SELECTION);
+	final Tree tree = new Tree(shell, SWT.MULTI | SWT.FULL_SELECTION);
 	tree.setHeaderVisible(true);
 	tree.setLinesVisible(true);
 	int columnCount = 4;
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet235.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet235.d	Sun Mar 22 19:55:00 2009 +0100
@@ -41,10 +41,10 @@
     shell.setText("The SWT.Settings Event");
     shell.setLayout(new GridLayout());
     Label label = new Label(shell, SWT.WRAP);
-    label.setLayoutData(new GridData(SWT.FILL, DWT.CENTER, true, false));
+    label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
     label.setText("Change a system setting and the table below will be updated.");
     final Table table = new Table(shell, SWT.BORDER);
-    table.setLayoutData(new GridData(SWT.FILL, DWT.FILL, true, true));
+    table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
     TableColumn column = new TableColumn(table, SWT.NONE);
     column = new TableColumn(table, SWT.NONE);
     column.setWidth(150);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet237.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet237.d	Sun Mar 22 19:55:00 2009 +0100
@@ -74,7 +74,7 @@
     }
     static void createChildren(Composite parent) {
         parent.setLayout(new RowLayout());
-        List list = new List(parent, SWT.BORDER | DWT.MULTI);
+        List list = new List(parent, SWT.BORDER | SWT.MULTI);
         list.add("List item 1");
         list.add("List item 2");
         Label label = new Label(parent, SWT.NONE);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet24.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet24.d	Sun Mar 22 19:55:00 2009 +0100
@@ -36,7 +36,7 @@
     shell.setLayout (new RowLayout ());
     Combo combo = new Combo (shell, SWT.NONE);
     combo.setItems (["A-1", "B-1", "C-1"]);
-    Text text = new Text (shell, SWT.SINGLE | DWT.BORDER);
+    Text text = new Text (shell, SWT.SINGLE | SWT.BORDER);
     text.setText ("some text");
     combo.addListener (SWT.DefaultSelection, new class() Listener{
         public void handleEvent (Event e) {
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet247.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet247.d	Sun Mar 22 19:55:00 2009 +0100
@@ -38,8 +38,8 @@
     Display display = new Display ();
     Shell shell = new Shell (display);
     shell.setLayout(new RowLayout());
-    Text text = new Text(shell, SWT.MULTI | DWT.BORDER);
-    String modifier = SWT.MOD1 == DWT.CTRL ? "Ctrl" : "Command";
+    Text text = new Text(shell, SWT.MULTI | SWT.BORDER);
+    String modifier = SWT.MOD1 == SWT.CTRL ? "Ctrl" : "Command";
     text.setText("Hit " ~ modifier ~ "+Return\nto see\nthe default button\nrun");
     text.addTraverseListener(new class() TraverseListener{
         public void keyTraversed(TraverseEvent e) {
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet251.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet251.d	Sun Mar 22 19:55:00 2009 +0100
@@ -55,15 +55,15 @@
             dialog = new Shell (shell, SWT.DIALOG_TRIM);
             dialog.setLayout (new GridLayout (3, false));
 
-            calendar = new DateTime (dialog, SWT.CALENDAR | DWT.BORDER);
-            date = new DateTime (dialog, SWT.DATE | DWT.SHORT);
-            time = new DateTime (dialog, SWT.TIME | DWT.SHORT);
+            calendar = new DateTime (dialog, SWT.CALENDAR | SWT.BORDER);
+            date = new DateTime (dialog, SWT.DATE | SWT.SHORT);
+            time = new DateTime (dialog, SWT.TIME | SWT.SHORT);
 
             new Label (dialog, SWT.NONE);
             new Label (dialog, SWT.NONE);
             Button ok = new Button (dialog, SWT.PUSH);
             ok.setText ("OK");
-            ok.setLayoutData(new GridData (SWT.FILL, DWT.CENTER, false, false));
+            ok.setLayoutData(new GridData (SWT.FILL, SWT.CENTER, false, false));
             ok.addSelectionListener (new class() SelectionAdapter{
                 void widgetSelected (SelectionEvent e) {
                     Stdout.formatln("Calendar date selected (MM/DD/YYYY) = {:d02}/{:d02}/{:d04}",
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet258.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet258.d	Sun Mar 22 19:55:00 2009 +0100
@@ -42,7 +42,7 @@
     auto shell = new Shell(display);
     shell.setLayout(new GridLayout(2, false));
 
-    auto text = new Text(shell, SWT.SEARCH | DWT.CANCEL);
+    auto text = new Text(shell, SWT.SEARCH | SWT.CANCEL);
     Image image = null;
     if ((text.getStyle() & SWT.CANCEL) == 0) {
         image = new Image (display, new ImageData(new ByteArrayInputStream( cast(byte[]) import("links_obj.gif" ))));
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet282.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet282.d	Sun Mar 22 19:55:00 2009 +0100
@@ -46,7 +46,7 @@
     shell.setText("Clipboard ImageTransfer");
 
     Button imageButton = new Button(shell, SWT.NONE );
-    GridData gd = new GridData(SWT.FILL, DWT.FILL, true, true);
+    GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
     gd.minimumHeight = 400;
     gd.minimumWidth = 600;
     imageButton.setLayoutData(gd);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet286.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet286.d	Sun Mar 22 19:55:00 2009 +0100
@@ -39,7 +39,7 @@
     Canvas blankCanvas = new Canvas(shell, SWT.BORDER);
     blankCanvas.setLayoutData(new GridData(200, 200));
     Label statusLine = new Label(shell, SWT.NONE);
-    statusLine.setLayoutData(new GridData(SWT.FILL, DWT.CENTER, true, false));
+    statusLine.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
 
     Menu bar = new Menu (shell, SWT.BAR);
     shell.setMenuBar (bar);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet288.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet288.d	Sun Mar 22 19:55:00 2009 +0100
@@ -17,7 +17,7 @@
  * http://www.eclipse.org/swt/snippets/
  */
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.DWTException;
+import org.eclipse.swt.SWTException;
 import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Image;
@@ -51,7 +51,7 @@
     display = new Display();
     Shell shell = new Shell (display);
     shellBackground = shell.getBackground();
-    FileDialog dialog = new FileDialog(shell, SWT.OPEN | DWT.MULTI);
+    FileDialog dialog = new FileDialog(shell, SWT.OPEN | SWT.MULTI);
     dialog.setText("Select Multiple Animated GIFs");
     dialog.setFilterExtensions(["*.gif"]);
     char[] filename = dialog.open();
@@ -60,11 +60,11 @@
     if (numToolBarItems > 0) {
         try {
             loadAllImages((new FilePath(filename)).parent, filenames);
-        } catch (DWTException e) {
+        } catch (SWTException e) {
             Stdout.print("There was an error loading an image.").newline;
             e.printStackTrace();
         }
-        ToolBar toolBar = new ToolBar (shell, SWT.FLAT | DWT.BORDER | DWT.WRAP);
+        ToolBar toolBar = new ToolBar (shell, SWT.FLAT | SWT.BORDER | SWT.WRAP);
         item = new ToolItem[numToolBarItems];
         for (int i = 0; i < numToolBarItems; i++) {
             item[i] = new ToolItem (toolBar, SWT.PUSH);
@@ -195,7 +195,7 @@
                         /* If we have just drawn the last image, decrement the repeat count and start again. */
                         if (imageDataIndex == imageDataArray[id].length - 1) repeatCount--;
                     }
-                } catch (DWTException ex) {
+                } catch (SWTException ex) {
                     Stdout.print("There was an error animating the GIF").newline;
                     ex.printStackTrace();
                 }
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet38.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet38.d	Sun Mar 22 19:55:00 2009 +0100
@@ -30,11 +30,11 @@
 void main () {
     auto display = new Display ();
     auto shell = new Shell (display);
-    auto table = new Table (shell, SWT.MULTI | DWT.BORDER | DWT.FULL_SELECTION);
+    auto table = new Table (shell, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION);
     table.setLinesVisible (true);
     table.setHeaderVisible (true);
     char[][] titles = [" ", "C", "!", "Description", "Resource", "In Folder", "Location"];
-    int[]    styles = [SWT.NONE, DWT.LEFT, DWT.RIGHT, DWT.CENTER, DWT.NONE, DWT.NONE, DWT.NONE];
+    int[]    styles = [SWT.NONE, SWT.LEFT, SWT.RIGHT, SWT.CENTER, SWT.NONE, SWT.NONE, SWT.NONE];
     foreach (i,title; titles) {
         auto column = new TableColumn (table, styles[i]);
         column.setText (title);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet39.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet39.d	Sun Mar 22 19:55:00 2009 +0100
@@ -35,8 +35,8 @@
     Shell shell = new Shell(display);
     shell.setLayout(new GridLayout());
 
-    CCombo combo = new CCombo(shell, SWT.FLAT | DWT.BORDER);
-    combo.setLayoutData(new GridData(SWT.FILL, DWT.CENTER, true, false));
+    CCombo combo = new CCombo(shell, SWT.FLAT | SWT.BORDER);
+    combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
     for (int i = 0; i < 5; i++) {
         combo.add("item" ~ to!(char[])(i));
     }
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet47.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet47.d	Sun Mar 22 19:55:00 2009 +0100
@@ -52,7 +52,7 @@
     gc.fillRectangle (hotImage.getBounds ());
     gc.dispose ();
     
-    ToolBar bar = new ToolBar (shell, SWT.BORDER | DWT.FLAT);
+    ToolBar bar = new ToolBar (shell, SWT.BORDER | SWT.FLAT);
     bar.setSize (200, 32);
     for (int i=0; i<12; i++) {
         ToolItem item = new ToolItem (bar, 0);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet48.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet48.d	Sun Mar 22 19:55:00 2009 +0100
@@ -60,7 +60,7 @@
 	final Image image = originalImage;
 	final Point origin = new Point (0, 0);
 	final Canvas canvas = new Canvas (shell, SWT.NO_BACKGROUND |
-			SWT.NO_REDRAW_RESIZE | DWT.V_SCROLL | DWT.H_SCROLL);
+			SWT.NO_REDRAW_RESIZE | SWT.V_SCROLL | SWT.H_SCROLL);
 	final ScrollBar hBar = canvas.getHorizontalBar ();
     void onHBarSelection (Event e) {
         int hSelection = hBar.getSelection ();
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet7.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet7.d	Sun Mar 22 19:55:00 2009 +0100
@@ -44,7 +44,7 @@
     Shell shell = new Shell (display);
     shell.setText ("Lazy Table");
     shell.setLayout (new FillLayout ());
-    Table table = new Table (shell, SWT.BORDER | DWT.MULTI);
+    Table table = new Table (shell, SWT.BORDER | SWT.MULTI);
     table.setSize (200, 200);
     Thread thread = new Thread({
         for(int i=0; i< 20000; i++){
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet75.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet75.d	Sun Mar 22 19:55:00 2009 +0100
@@ -54,7 +54,7 @@
     r3.setText ("R3");
     Button b2 = new Button (c1, SWT.PUSH);
     b2.setText ("B2");
-    List l1 = new List (c1, SWT.SINGLE | DWT.BORDER);
+    List l1 = new List (c1, SWT.SINGLE | SWT.BORDER);
     l1.setItems (["L1"]);
     Button b3 = new Button (c1, SWT.PUSH);
     b3.setText ("B&3");
@@ -68,15 +68,15 @@
     Button b6 = new Button (c2, SWT.PUSH);
     b6.setText ("B&6");
 
-    List l2 = new List (shell, SWT.SINGLE | DWT.BORDER);
+    List l2 = new List (shell, SWT.SINGLE | SWT.BORDER);
     l2.setItems ( ["L2"] );
 
-    ToolBar tb1 = new ToolBar (shell, SWT.FLAT | DWT.BORDER);
+    ToolBar tb1 = new ToolBar (shell, SWT.FLAT | SWT.BORDER);
     ToolItem i1 = new ToolItem (tb1, SWT.RADIO);
     i1.setText ("I1");
     ToolItem i2 = new ToolItem (tb1, SWT.RADIO);
     i2.setText ("I2");
-    Combo combo1 = new Combo (tb1, SWT.READ_ONLY | DWT.BORDER);
+    Combo combo1 = new Combo (tb1, SWT.READ_ONLY | SWT.BORDER);
     combo1.setItems (["C1"]);
     combo1.setText ("C1");
     combo1.pack ();
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet9.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet9.d	Sun Mar 22 19:55:00 2009 +0100
@@ -10,7 +10,7 @@
  * D Port
  *     Jesse Phillips <Jesse.K.Phillips+D> gmail.com
  *******************************************************************************/
-module org.eclipse.swt.snippets.Snippit9;
+module org.eclipse.swt.snippets.Snippet9;
 
 /*
  * Composite example snippet: scroll a child control automatically
@@ -34,7 +34,7 @@
 void main () {
     auto display = new Display ();
     auto shell = new Shell
-       (display, SWT.SHELL_TRIM | DWT.H_SCROLL | DWT.V_SCROLL);
+       (display, SWT.SHELL_TRIM | SWT.H_SCROLL | SWT.V_SCROLL);
     auto composite = new Composite (shell, SWT.BORDER);
     composite.setSize (700, 600);
     auto red = display.getSystemColor (SWT.COLOR_RED);
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet94.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet94.d	Sun Mar 22 19:55:00 2009 +0100
@@ -41,7 +41,7 @@
     Clipboard cb = new Clipboard(display);
     Shell shell = new Shell (display);
     shell.setLayout(new FormLayout());
-    Text text = new Text(shell, SWT.BORDER | DWT.MULTI | DWT.V_SCROLL | DWT.H_SCROLL);
+    Text text = new Text(shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL);
 
     Button copy = new Button(shell, SWT.PUSH);
     copy.setText("Copy");
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet96.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet96.d	Sun Mar 22 19:55:00 2009 +0100
@@ -61,7 +61,7 @@
     shell.setLayout(new GridLayout());
 
     // create a a table with 3 columns and fill with data
-    final Table table = new Table(shell, SWT.BORDER | DWT.MULTI | DWT.FULL_SELECTION);
+    final Table table = new Table(shell, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
     table.setLayoutData(new GridData(GridData.FILL_BOTH));
     TableColumn column1 = new TableColumn(table, SWT.NONE);
     TableColumn column2 = new TableColumn(table, SWT.NONE);
@@ -227,14 +227,14 @@
             cursor = cursor_;
         }
         public void keyReleased(KeyEvent e) {
-            if (e.keyCode == SWT.CONTROL && (e.stateMask & DWT.SHIFT) != 0)
+            if (e.keyCode == SWT.CONTROL && (e.stateMask & SWT.SHIFT) != 0)
                 return;
-            if (e.keyCode == SWT.SHIFT && (e.stateMask & DWT.CONTROL) != 0)
+            if (e.keyCode == SWT.SHIFT && (e.stateMask & SWT.CONTROL) != 0)
                 return;
             if (e.keyCode != SWT.CONTROL
                 && (e.stateMask & SWT.CONTROL) != 0)
                 return;
-            if (e.keyCode != SWT.SHIFT && (e.stateMask & DWT.SHIFT) != 0)
+            if (e.keyCode != SWT.SHIFT && (e.stateMask & SWT.SHIFT) != 0)
                 return;
 
             TableItem[] selection = table.getSelection();
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet97.d	Sun Mar 22 15:17:04 2009 +0100
+++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet97.d	Sun Mar 22 19:55:00 2009 +0100
@@ -34,7 +34,7 @@
 void main () {
     auto display = new Display ();
     auto shell = new Shell (display);
-    auto tree = new Tree (shell, SWT.BORDER | DWT.MULTI);
+    auto tree = new Tree (shell, SWT.BORDER | SWT.MULTI);
     auto menu = new Menu (shell, SWT.POP_UP);
     tree.setMenu (menu);
     for (int i=0; i<12; i++) {
--- a/rakefile	Sun Mar 22 15:17:04 2009 +0100
+++ b/rakefile	Sun Mar 22 19:55:00 2009 +0100
@@ -11,6 +11,7 @@
 OBJDIR  =File.expand_path("obj")
 DIMPDIR =File.expand_path("imp")
 LIBDIR  =File.expand_path("lib")
+BINDIR  =File.expand_path("bin")
 RSPNAME =File.expand_path("rsp")
 ALL_RESDIRS= [ "base/res", "res" ]
 
@@ -201,3 +202,92 @@
 task :default => [ :clean, :all ]
 
 
+desc "Build SWT Snippet Collection"
+task :swtsnippets do
+
+    snps_browser = [ "Snippet128", "Snippet136" ]
+    snps_opengl = [ "Snippet174", "Snippet195" ]
+
+    snps_exclude = snps_browser + snps_opengl
+    allsnippets = FileList[ File.join("org.eclipse.swt.snippets", "src", "**/Snippet*.d" )]
+    allsnippets.each do | snp |
+        puts "Building #{snp}"
+        if snp =~ /.*(Snippet\w+)\.d$/
+            snpname = $1
+            if !snps_exclude.include? snpname
+                buildApp( "org.eclipse.swt.snippets", "src", "res", "", snpname )
+            end
+        else
+            puts snp
+            raise "Name does not match"
+        end
+    end
+end
+
+def buildApp( basedir, srcdir, resdir, dflags, appname, filelist=nil )
+    if filelist == nil
+        filelist = FileList[ "**/#{appname}.d" ]
+    end
+
+    srcdir_abs = File.expand_path( File.join( basedir, srcdir))
+    resdir_abs = File.expand_path( File.join( basedir, resdir))
+
+    rsp = File.new( RSPNAME, "w+" )
+    rsp.puts "-I#{srcdir_abs.to_path}"
+    rsp.puts "-I#{DIMPDIR.to_path}"
+    rsp.puts "-J#{resdir_abs.to_path}"
+    if dflags.size > 0 then
+        rsp.puts dflags
+    end
+    ALL_RESDIRS.each do | dir |
+        rsp.puts "-J#{File.expand_path(dir).to_path}"
+    end
+    rsp.print "-L"
+    rsp.print "+advapi32"
+    rsp.print "+comctl32"
+    rsp.print "+comdlg32"
+    rsp.print "+gdi32"
+    rsp.print "+kernel32"
+    rsp.print "+shell32"
+    rsp.print "+ole32"
+    rsp.print "+oleaut32"
+    rsp.print "+olepro32"
+    rsp.print "+oleacc"
+    rsp.print "+user32"
+    rsp.print "+usp10"
+    rsp.print "+msimg32"
+    rsp.print "+opengl32"
+    rsp.print "+shlwapi"
+    rsp.print "+tango-user-dmd.lib"
+    rsp.print "+zlib.lib"
+    rsp.print "+dwt-base.lib"
+    rsp.print "+org.eclipse.swt.win32.win32.x86.lib"
+    rsp.print "+#{LIBDIR.to_path}\\"
+    rsp.puts
+
+    rsp.puts "-op"
+    rsp.puts "-od#{OBJDIR.to_path}"
+    applfile = File.join(BINDIR,appname+EXEEXT)
+    rsp.puts "-of#{applfile.to_path}"
+    filelist.each do |path|
+        rsp.puts File.expand_path(path).to_path
+    end
+    rsp.close
+
+    Dir.chdir(basedir) do
+        if isWindows
+            cmd = "#{DMD} @#{RSPNAME.to_path}"
+        else
+            cmd = "cat #{RSPNAME.to_path} | xargs #{DMD}"
+        end
+        sh cmd, :verbose => false do |ok, res|
+            if !ok then
+                raise "compile error"
+            end
+        end
+    end
+
+end
+
+
+