Revision: 3186
          http://vexi.svn.sourceforge.net/vexi/?rev=3186&view=rev
Author:   clrg
Date:     2008-11-09 20:57:43 +0000 (Sun, 09 Nov 2008)

Log Message:
-----------
Use CHILDREN_TRAP/_READ flags + fix clashing trap flags

Modified Paths:
--------------
    trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp

Modified: trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp
===================================================================
--- trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp  2008-11-08 14:33:17 UTC 
(rev 3185)
+++ trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp  2008-11-09 20:57:43 UTC 
(rev 3186)
@@ -160,17 +160,18 @@
     private static final int ALIGN_RIGHT             = 0x00080000;
     private static final int ALIGNS = ALIGN_TOP | ALIGN_BOTTOM | ALIGN_LEFT | 
ALIGN_RIGHT;
 
-    //private static final int UNUSED                = 0x0--00000;
+    private static final int ENTER_TRAP              = 0x00100000;
+    private static final int LEAVE_TRAP              = 0x00200000;
+    private static final int _MOVE_TRAP              = 0x00400000;
+    private static final int MOVE_TRAP               = 0x00800000;
 
-    private static final int ENTER_TRAP              = 0x10000000;
-    private static final int LEAVE_TRAP              = 0x20000000;
-    private static final int _MOVE_TRAP              = 0x40000000;
-    private static final int MOVE_TRAP               = 0x80000000;
+    private static final int CHILDREN_READ_TRAP      = 0x01000000;
+    private static final int CHILDREN_TRAP           = 0x02000000;
 
-    private static final short MINWIDTH_TRAP         = 0x0010;
-    private static final short MINHEIGHT_TRAP        = 0x0020;
-    private static final short MAXWIDTH_TRAP         = 0x0040;
-    private static final short MAXHEIGHT_TRAP        = 0x0080;
+    private static final short MINWIDTH_TRAP         = 0x0001;
+    private static final short MINHEIGHT_TRAP        = 0x0002;
+    private static final short MAXWIDTH_TRAP         = 0x0004;
+    private static final short MAXHEIGHT_TRAP        = 0x0008;
 
     private static final short WIDTH_TRAP            = 0x0010;
     private static final short HEIGHT_TRAP           = 0x0020;
@@ -184,6 +185,7 @@
 
     private static final short X_TRAP                = 0x1000;
     private static final short Y_TRAP                = 0x2000;
+    // NOTE: 0x8000 is not a usable value
 
 
     // Box Properties 
////////////////////////////////////////////////////////////
@@ -1497,6 +1499,7 @@
             //#switch (JSU.toString(key))
             case "surface": set(SURFACE_READ_TRAP);
             case "visible": set(VISIBLE_READ_TRAP);
+            case "Children": set(CHILDREN_READ_TRAP);
             //#end
             return;
         }
@@ -1513,6 +1516,7 @@
         case "contentheight": set(CONTENTHEIGHT_TRAP);
         case "surface":   set(SURFACE_TRAP); 
         case "visible":   set(VISIBLE_TRAP);
+        case "Children":  set(CHILDREN_TRAP);
         case "Enter":     set(ENTER_TRAP);
         case "Leave":     set(LEAVE_TRAP);
         case "_Move":     set(_MOVE_TRAP);
@@ -1533,6 +1537,7 @@
             //#switch (JSU.toString(key))
             case "surface": if (rtrap(SC_surface)==null) 
clear(SURFACE_READ_TRAP);
             case "visible": if (rtrap(SC_visible)==null) 
clear(VISIBLE_READ_TRAP);
+            case "Children": if (rtrap(SC_Children)==null) 
clear(CHILDREN_READ_TRAP);
             //#end
             return;
         }
@@ -1550,6 +1555,7 @@
         case "contentheight":  if (wtrap(SC_contentheight) == null) 
clear(CONTENTHEIGHT_TRAP);
         case "surface":   if (wtrap(SC_surface) == null) clear(SURFACE_TRAP);
         case "visible":   if (wtrap(SC_visible) == null) clear(VISIBLE_TRAP);
+        case "Children":  if (wtrap(SC_Children) == null) clear(CHILDREN_TRAP);
         case "Enter":     if (wtrap(SC_Enter) == null) clear(ENTER_TRAP);
         case "Leave":     if (wtrap(SC_Leave) == null) clear(LEAVE_TRAP);
         case "_Move":     if (wtrap(SC__Move) == null) clear(_MOVE_TRAP);
@@ -1777,7 +1783,7 @@
     // knowledge that we may never return!!) and not on the redirect where we 
don't
     // exist!
     private void put(int i, JS value, boolean fireTrapsOnRemove, boolean 
viaRedirect) throws JSExn{
-        Trap rangeTrap = wtrap(SC_Children);
+        Trap rangeTrap = test(CHILDREN_TRAP) ? wtrap(SC_Children) : null;
         JSExn rangeTrapException = null;
         try {
             if (rangeTrap != null) {
@@ -1842,7 +1848,7 @@
     
     // children
     private final JS get(int i) throws JSExn { 
-        Trap rangeTrap = rtrap(SC_Children);
+        Trap rangeTrap = test(CHILDREN_READ_TRAP) ? rtrap(SC_Children) : null;
         JSExn rangeTrapException = null;
         
         JS value = null;   


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to