2003/08/12 09:59:55
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:04:23 +0000 (07:04 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:04:23 +0000 (07:04 +0000)
darcs-hash:20040130070423-2ba56-18097fc25ad29819346c3335ae94e90292ccb2e0.gz

src/org/xwt/Resources.java
src/org/xwt/SVG.java
src/org/xwt/Surface.java
src/org/xwt/Trap.java

index 615ef97..9149790 100644 (file)
@@ -132,6 +132,10 @@ public class Resources {
 
     /** holds the current theme mappings */
     static Vector mapTo = new Vector();
+    static {
+        mapFrom.addElement("xwt.standard");
+        mapTo.addElement("org.xwt.themes.monopoly");
+    }
 
     /**
      *  Resolves the partial resource name <tt>name</tt> to a fully
index ad34ec1..3af7462 100644 (file)
@@ -1,5 +1,6 @@
 // Copyright 2002 Adam Megacz, see the COPYING file for licensing [GPL]
 package org.xwt;
+import java.util.*;
 
 public class SVG {
 
index 082bb8b..68bbdde 100644 (file)
@@ -278,6 +278,9 @@ public abstract class Surface {
     protected final void SizeChange(int width, int height) {
         this.width = width;
         this.height = height;
+        root.width = width;
+        root.height = height;
+        root.needs_reflow = true;
         abort = true;
         long lastResizeTime = System.currentTimeMillis();
         lastResizeTimeTop = (int)(lastResizeTime >> 32);
@@ -388,7 +391,6 @@ public abstract class Surface {
 
     /** Indicates that the backbuffer region x,y,w,h is no longer correct and must be regenerated */
     public void dirty(int x, int y, int w, int h) {
-        x = 0; y = 0; w = 1000; h = 1000;
         backbufferDirtyRegions.dirty(x, y, w, h);
         Refresh();
     }
@@ -470,7 +472,7 @@ public abstract class Surface {
             if (y+h > height) h = height - y;
             if (w <= 0 || h <= 0) continue;
 
-            root.render(x, y, w, h, backbuffer);
+            root.render(0, 0, x, y, w, h, backbuffer);
             
             // if any area under the scar was repainted, rescar that area
             if (scarred && x < hscar + scarPicture.getWidth() &&
index 8d78fd1..a9023e7 100644 (file)
@@ -24,7 +24,7 @@ public class Trap {
     static {
         String[] p = new String[] {
             "sizetoimage", "shrink", "hshrink", "vshrink", "x", "y", "width", "height",
-            "flex", "hflex", "vflex", "cols", "rows", "align", "invisible", "absolute", "globalx", "globaly",
+            "flex", "hflex", "vflex", /*"cols", "rows",*/ "align", "invisible", "absolute", "globalx", "globaly",
             "minwidth", "minheight", "height", "width", "maxwidth", "maxheight", 
             "numchildren", "hpad", "vpad", "doublebuffered", "cursor",
             "mousex", "mousey", "xwt", "static", "mouseinside", "root", "thisbox", "indexof", "svg"