changeset 3:6e0b2c96d1fd

build with dwt-win
author Frank Benoit <benoit@tionex.de>
date Thu, 07 Feb 2008 00:09:21 +0100
parents 1b159afbc053
children 8d49c4eb4800
files dsss.conf dwtexamples/addressbook/AddressBook.d dwtexamples/controlexample/ControlExample.d dwtexamples/controlexample/MenuTab.d dwtexamples/controlexample/ProgressBarTab.d dwtexamples/controlexample/ShellTab.d dwtexamples/controlexample/Tab.d dwtexamples/controlexample/TableTab.d dwtexamples/controlexample/ToolBarTab.d dwtexamples/controlexample/TreeTab.d
diffstat 10 files changed, 85 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/dsss.conf	Fri Feb 01 21:56:15 2008 +0100
+++ b/dsss.conf	Thu Feb 07 00:09:21 2008 +0100
@@ -1,6 +1,10 @@
 
 [*]
-buildflags+=-g -gc
+buildflags+=-g -gc -debug
+version(Windows){
+    #buildflags+= -L/SUBSYSTEM:windows:5
+    buildflags+= -L/SUBSYSTEM:console:5
+}
 
 [dwtexamples/simple.d]
 [dwtexamples/helloworld/HelloWorld1.d]
@@ -9,17 +13,27 @@
 [dwtexamples/helloworld/HelloWorld4.d]
 [dwtexamples/helloworld/HelloWorld5.d]
 
+[test1/draw.d]
 
 [dwtexamples/addressbook/AddressBook.d]
-buildflags+=-g -gc
+buildflags+=-g -gc -debug
+version(Windows){
+    buildflags+= -L/SUBSYSTEM:console:5
+}
 buildflags+=-Jdwtexamples/addressbook
 
 [dwtexamples/controlexample/ControlExample.d]
-buildflags+=-g -gc
+buildflags+=-g -gc -debug
+version(Windows){
+    buildflags+= -L/SUBSYSTEM:console:5
+}
 buildflags+=-Jdwtexamples/controlexample
 buildflags+=-version=CONTROL_EXAMPLE_MAIN
 
 [dwtexamples/controlexample/CustomControlExample.d]
-buildflags+=-g -gc
+buildflags+=-g -gc -debug
+version(Windows){
+    buildflags+= -L/SUBSYSTEM:console:5
+}
 buildflags+=-Jdwtexamples/controlexample
 buildflags+=-version=CUSTOM_CONTROL_EXAMPLE_MAIN
--- a/dwtexamples/addressbook/AddressBook.d	Fri Feb 01 21:56:15 2008 +0100
+++ b/dwtexamples/addressbook/AddressBook.d	Thu Feb 07 00:09:21 2008 +0100
@@ -384,7 +384,7 @@
     } catch(IOException e ) {
         displayError(resAddressBook.getString("IO_error_write") ~ "\n" ~ file.toString());
         result = false;
-    } catch(TracedException e2 ) {
+    } catch(Exception e2 ) {
         displayError(resAddressBook.getString("error_write") ~ "\n" ~ e2.toString());
         result = false;
     } finally {
--- a/dwtexamples/controlexample/ControlExample.d	Fri Feb 01 21:56:15 2008 +0100
+++ b/dwtexamples/controlexample/ControlExample.d	Thu Feb 07 00:09:21 2008 +0100
@@ -32,7 +32,9 @@
 import dwtexamples.controlexample.ComboTab;
 import dwtexamples.controlexample.CoolBarTab;
 //import dwtexamples.controlexample.DateTimeTab;
-import dwtexamples.controlexample.DialogTab;
+version(linux){
+    import dwtexamples.controlexample.DialogTab;
+}
 import dwtexamples.controlexample.ExpandBarTab;
 import dwtexamples.controlexample.GroupTab;
 import dwtexamples.controlexample.LabelTab;
@@ -78,8 +80,16 @@
         Stdout.formatln( "todo: Implement Get/Set API reflection" );
         Stdout.formatln( "todo: DateTimeTab not implemented" );
         Stdout.formatln( "todo: ExpandBarTab looks strange" );
-        Stdout.formatln( "todo: ProgressBarTab crash on vertical" );
-        Stdout.formatln( "todo: SliderTab horizontal arrow buttons are too high" );
+        Stdout.formatln( "" );
+        Stdout.formatln( "On linux GTK:" );
+        Stdout.formatln( "bug:  ProgressBarTab crash on vertical" );
+        Stdout.formatln( "        in java it behaves the same" );
+        Stdout.formatln( "bug:  SliderTab horizontal arrow buttons are too high." );
+        Stdout.formatln( "        in java it behaves the same" );
+        Stdout.formatln( "        Known bug:" );
+        Stdout.formatln( "        https://bugs.eclipse.org/bugs/show_bug.cgi?id=197402" );
+        Stdout.formatln( "        http://bugzilla.gnome.org/show_bug.cgi?id=475909" );
+        Stdout.formatln( "" );
         Stdout.formatln( "please report problems" );
         ControlExample.main( null );
     }
@@ -139,6 +149,34 @@
      * Answers the set of example Tabs
      */
     Tab[] createTabs() {
+        version(Windows){
+        return [ cast(Tab)
+            new ButtonTab (this),
+            new CanvasTab (this),
+            new ComboTab (this),
+            new CoolBarTab (this),
+            //new DateTimeTab (this), // DateTime Control not implemented
+            //new DialogTab (this),   // Dialog not implemented
+            new ExpandBarTab (this),
+            new GroupTab (this),
+            new LabelTab (this),
+            new LinkTab (this),
+            new ListTab (this),
+            new MenuTab (this),
+            //new ProgressBarTab (this), // crash on start
+            new SashTab (this),
+            //new ScaleTab (this),       // crash on start
+            shellTab = new ShellTab(this),
+            //new SliderTab (this),      // crash on start
+            //new SpinnerTab (this),     // crash on start
+            new TabFolderTab (this),
+            new TableTab (this),
+            new TextTab (this),
+            new ToolBarTab (this),
+            new ToolTipTab (this),
+            new TreeTab (this)
+        ];
+        } else { // linux
         return [ cast(Tab)
             new ButtonTab (this),
             new CanvasTab (this),
@@ -165,6 +203,7 @@
             new ToolTipTab (this),
             new TreeTab (this)
         ];
+        }
     }
 
     /**
@@ -262,7 +301,7 @@
                     }
                 }
                 return;
-            } catch (TracedException t) {
+            } catch (Exception t) {
                 Stdout.formatln( "ups {}", t );
             }
         }
@@ -270,7 +309,7 @@
             getResourceString("error.CouldNotLoadResources") :
             "Unable to load resources"; //$NON-NLS-1$
         freeResources();
-        throw new TracedException(error);
+        throw new Exception(error);
     }
 
     /**
--- a/dwtexamples/controlexample/MenuTab.d	Fri Feb 01 21:56:15 2008 +0100
+++ b/dwtexamples/controlexample/MenuTab.d	Thu Feb 07 00:09:21 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2005 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -30,6 +30,9 @@
 
 import dwtexamples.controlexample.Tab;
 import dwtexamples.controlexample.ControlExample;
+
+import dwt.dwthelper.utils;
+
 import tango.util.Convert;
 
 class MenuTab : Tab {
--- a/dwtexamples/controlexample/ProgressBarTab.d	Fri Feb 01 21:56:15 2008 +0100
+++ b/dwtexamples/controlexample/ProgressBarTab.d	Thu Feb 07 00:09:21 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
--- a/dwtexamples/controlexample/ShellTab.d	Fri Feb 01 21:56:15 2008 +0100
+++ b/dwtexamples/controlexample/ShellTab.d	Thu Feb 07 00:09:21 2008 +0100
@@ -28,6 +28,9 @@
 
 import dwtexamples.controlexample.Tab;
 import dwtexamples.controlexample.ControlExample;
+
+import dwt.dwthelper.utils;
+
 import tango.util.Convert;
 
 class ShellTab : Tab {
--- a/dwtexamples/controlexample/Tab.d	Fri Feb 01 21:56:15 2008 +0100
+++ b/dwtexamples/controlexample/Tab.d	Thu Feb 07 00:09:21 2008 +0100
@@ -79,6 +79,8 @@
 import dwt.widgets.CoolBar;
 import dwt.widgets.ExpandBar;
 
+import dwt.dwthelper.utils;
+
 import dwtexamples.controlexample.ControlExample;
 import tango.text.convert.Format;
 
--- a/dwtexamples/controlexample/TableTab.d	Fri Feb 01 21:56:15 2008 +0100
+++ b/dwtexamples/controlexample/TableTab.d	Thu Feb 07 00:09:21 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -42,6 +42,9 @@
 import dwtexamples.controlexample.Tab;
 import dwtexamples.controlexample.ControlExample;
 import dwtexamples.controlexample.ScrollableTab;
+
+import dwt.dwthelper.utils;
+
 import tango.text.convert.Format;
 import tango.util.Convert;
 import tango.core.Exception;
--- a/dwtexamples/controlexample/ToolBarTab.d	Fri Feb 01 21:56:15 2008 +0100
+++ b/dwtexamples/controlexample/ToolBarTab.d	Thu Feb 07 00:09:21 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -33,6 +33,9 @@
 
 import dwtexamples.controlexample.Tab;
 import dwtexamples.controlexample.ControlExample;
+
+import dwt.dwthelper.utils;
+
 import tango.util.Convert;
 
 class ToolBarTab : Tab {
--- a/dwtexamples/controlexample/TreeTab.d	Fri Feb 01 21:56:15 2008 +0100
+++ b/dwtexamples/controlexample/TreeTab.d	Thu Feb 07 00:09:21 2008 +0100
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*******************************************************************************
  * Copyright (c) 2000, 2007 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -43,6 +43,9 @@
 import dwtexamples.controlexample.Tab;
 import dwtexamples.controlexample.ControlExample;
 import dwtexamples.controlexample.ScrollableTab;
+
+import dwt.dwthelper.utils;
+
 import tango.text.convert.Format;
 import tango.util.Convert;
 import tango.core.Exception;