diff dwt/internal/theme/DrawData.d @ 124:540fa4e9974a

Ported dwt.internal.theme
author Jacob Carlborg <doob@me.com>
date Fri, 16 Jan 2009 12:19:08 +0100
parents 1a8b3cb347e0
children
line wrap: on
line diff
--- a/dwt/internal/theme/DrawData.d	Thu Jan 15 23:08:54 2009 +0100
+++ b/dwt/internal/theme/DrawData.d	Fri Jan 16 12:19:08 2009 +0100
@@ -7,10 +7,20 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *     Jacob Carlborg <doob@me.com>
  *******************************************************************************/
-module dwt.internal.theme;
+module dwt.internal.theme.DrawData;
+
+import dwt.dwthelper.utils;
 
-import dwt.graphics.*;
+import dwt.graphics.GC;
+import dwt.graphics.Image;
+import dwt.graphics.Point;
+import dwt.graphics.Rectangle;
+
+import dwt.internal.theme.Theme;
 
 public class DrawData {
     public int style;
@@ -18,50 +28,50 @@
     public Rectangle clientArea;
 
     /** Part states */
-    public static final int SELECTED = 1 << 1;
-    public static final int FOCUSED = 1 << 2;
-    public static final int PRESSED = 1 << 3;
-    public static final int ACTIVE = 1 << 4;
-    public static final int DISABLED = 1 << 5;
-    public static final int HOT = 1 << 6;
-    public static final int DEFAULTED = 1 << 7;
-    public static final int GRAYED = 1 << 8;
-    
+    public static const int SELECTED = 1 << 1;
+    public static const int FOCUSED = 1 << 2;
+    public static const int PRESSED = 1 << 3;
+    public static const int ACTIVE = 1 << 4;
+    public static const int DISABLED = 1 << 5;
+    public static const int HOT = 1 << 6;
+    public static const int DEFAULTED = 1 << 7;
+    public static const int GRAYED = 1 << 8;
+
     /** Text and Image drawing flags */
-    public static final int DRAW_LEFT = 1 << 4;
-    public static final int DRAW_TOP = 1 << 5;
-    public static final int DRAW_RIGHT = 1 << 6;
-    public static final int DRAW_BOTTOM = 1 << 7;
-    public static final int DRAW_HCENTER = 1 << 8;
-    public static final int DRAW_VCENTER = 1 << 9;
+    public static const int DRAW_LEFT = 1 << 4;
+    public static const int DRAW_TOP = 1 << 5;
+    public static const int DRAW_RIGHT = 1 << 6;
+    public static const int DRAW_BOTTOM = 1 << 7;
+    public static const int DRAW_HCENTER = 1 << 8;
+    public static const int DRAW_VCENTER = 1 << 9;
 
     /** Widget parts */
-    public static final int WIDGET_NOWHERE = -1;
-    public static final int WIDGET_WHOLE = 0;
+    public static const int WIDGET_NOWHERE = -1;
+    public static const int WIDGET_WHOLE = 0;
 
     /** Scrollbar parts */
-    public static final int SCROLLBAR_UP_ARROW = 1;
-    public static final int SCROLLBAR_DOWN_ARROW = 2;
-    public static final int SCROLLBAR_LEFT_ARROW = SCROLLBAR_UP_ARROW;
-    public static final int SCROLLBAR_RIGHT_ARROW = SCROLLBAR_DOWN_ARROW;
-    public static final int SCROLLBAR_UP_TRACK = 3;
-    public static final int SCROLLBAR_DOWN_TRACK = 4;
-    public static final int SCROLLBAR_LEFT_TRACK = SCROLLBAR_UP_TRACK;
-    public static final int SCROLLBAR_RIGHT_TRACK = SCROLLBAR_DOWN_TRACK;
-    public static final int SCROLLBAR_THUMB = 5;
-    
+    public static const int SCROLLBAR_UP_ARROW = 1;
+    public static const int SCROLLBAR_DOWN_ARROW = 2;
+    public static const int SCROLLBAR_LEFT_ARROW = SCROLLBAR_UP_ARROW;
+    public static const int SCROLLBAR_RIGHT_ARROW = SCROLLBAR_DOWN_ARROW;
+    public static const int SCROLLBAR_UP_TRACK = 3;
+    public static const int SCROLLBAR_DOWN_TRACK = 4;
+    public static const int SCROLLBAR_LEFT_TRACK = SCROLLBAR_UP_TRACK;
+    public static const int SCROLLBAR_RIGHT_TRACK = SCROLLBAR_DOWN_TRACK;
+    public static const int SCROLLBAR_THUMB = 5;
+
     /** Scale parts */
-    public static final int SCALE_UP_TRACK = 1;
-    public static final int SCALE_LEFT_TRACK = SCALE_UP_TRACK;
-    public static final int SCALE_DOWN_TRACK = 2;
-    public static final int SCALE_RIGHT_TRACK = SCALE_DOWN_TRACK;
-    public static final int SCALE_THUMB = 3;
-    
+    public static const int SCALE_UP_TRACK = 1;
+    public static const int SCALE_LEFT_TRACK = SCALE_UP_TRACK;
+    public static const int SCALE_DOWN_TRACK = 2;
+    public static const int SCALE_RIGHT_TRACK = SCALE_DOWN_TRACK;
+    public static const int SCALE_THUMB = 3;
+
     /** ToolItem parts */
-    public static final int TOOLITEM_ARROW = 1;
-    
+    public static const int TOOLITEM_ARROW = 1;
+
     /** Combo parts */
-    public static final int COMBO_ARROW = 1;
+    public static const int COMBO_ARROW = 1;
     
 
 public this() {