2003/09/04 08:28:17
[org.ibex.core.git] / src / org / xwt / Box.java.pp
index 822f7a0..50ef309 100644 (file)
@@ -115,8 +115,8 @@ public final class Box extends JS.Scope {
     // computed during reflow
     LENGTH x = 0;
     LENGTH y = 0;
-    LENGTH width = 0;
-    LENGTH height = 0;
+    public LENGTH width = 0;
+    public LENGTH height = 0;
     private int row = 0;  // FIXME short
     private int col = 0;  // FIXME short
     private LENGTH contentwidth = 0;             // == max(minwidth, textwidth, sum(child.contentwidth) + pad)
@@ -846,7 +846,9 @@ public final class Box extends JS.Scope {
         public Object get(Object name) { return box.get(name); }
         public void put(Object name, Object value) { box.put(name, value, false, this); }
         public Object[] keys() { return box.keys(); }
-        public Object callMethod(Object method, JS.Array args, boolean justChecking) { return box.callMethod(method,args,justChecking); }
+        public Object callMethod(Object method, JS.Array args, boolean justChecking) {
+           return ((Box)box).callMethod(method,args,justChecking);
+       }
     }
 
 
@@ -1070,9 +1072,7 @@ public final class Box extends JS.Scope {
                     public void put(Box b, Object value) {
                         b.width = stoi(value);
                         if (b.parent == null && b.surface != null) {
-                            // FIXME this gets hosed...
-                            //b.surface.setSize(max(Surface.scarPicture.getWidth(), b.width),
-                            //max(Surface.scarPicture.getHeight(), b.height));
+                            b.surface.setSize();
                             MARK_FOR_REFLOW_b;
                         } else {
                             b.minwidth = b.maxwidth = b.width;
@@ -1288,7 +1288,7 @@ public final class Box extends JS.Scope {
                     public void put(Box b, Object value) {
                         if (b.parent == null && b.surface != null) {
                             b.surface.hscar = stoi(value);
-                            b.surface.dirty(0, 0, b.surface.width, b.surface.height);
+                            b.surface.dirty(0, 0, b.width, b.height);
                             b.surface.Refresh();
                         }
                     }