Revision: 4334 http://vexi.svn.sourceforge.net/vexi/?rev=4334&view=rev Author: clrg Date: 2012-01-19 14:22:08 +0000 (Thu, 19 Jan 2012) Log Message: ----------- Compile fix, don't abort on Place
Modified Paths: -------------- trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp Modified: trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp =================================================================== --- trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp 2012-01-19 00:56:16 UTC (rev 4333) +++ trunk/org.vexi-core.main/src/main/jpp/org/vexi/core/Box.jpp 2012-01-19 14:22:08 UTC (rev 4334) @@ -482,7 +482,7 @@ } - // Reflow //////////////////////////////////////////////////////////////////////////////////////// + // Reflow state management //////////////////////////////////////// /** * Note that it is important to call these functions before doing other logic @@ -512,24 +512,18 @@ } } - private final void setPlace() throws JSExn { set(PLACE); setPlaceInTree(true); } + private final void setPlace() throws JSExn { set(PLACE); setPlaceInTree(); } private final void setParentPlace() throws JSExn { if (parent != null) { parent.setPlace(); } } - private final void setPlaceInTree(boolean abortReflow) throws JSExn { + private final void setPlaceInTree() { Box b=this; while (b.test(DISPLAY) && b.parent!=null && !b.parent.test(PLACE_DESCENDENT)) { b = b.parent; b.set(PLACE_DESCENDENT); } - if (abortReflow) { - Surface s = b.getSurface(); - if (s!=null) { - s.abortReflow(); - } - } } @@ -538,7 +532,7 @@ setConstrainInTree(); } if (test(PLACE) || test(PLACE_DESCENDENT)) { - setPlaceInTree(true); + setPlaceInTree(); } } @@ -561,6 +555,9 @@ } } + + // Reflow/rendering Pipeline ////////////////////////////////////// + /** used to invoke reflow on a box and it's children */ public void reflow() { if ((flags & REFLOW) == 0) { @@ -675,7 +672,7 @@ // assign contentwidth and mark for place in parent and placing of children if (newwidth != contentwidth) { if (parent != null) { - setPlaceInTree(false); + setPlaceInTree(); parent.set(PLACE); parent.set(CONSTRAIN); // parent already in constrain() PUT_BOX_FIELD(SC_contentwidth,JSU.N(newwidth),contentwidth=newwidth,CONTENTWIDTH_TRAP) @@ -685,7 +682,7 @@ newwidth = min(getSurface().pendingWidth, newwidth); } if (newwidth != contentwidth) { - setPlaceInTree(false); + setPlaceInTree(); PUT_BOX_FIELD(SC_contentwidth,JSU.N(newwidth),contentwidth=newwidth,CONTENTWIDTH_TRAP) } } @@ -693,8 +690,8 @@ //#end clear(CONSTRAIN); } - - /** place then invoke place() on a box's children */ + + /** place then invoke place() on a box and its children */ private void place(boolean clean) { if (treeSize()>0) { placeChildren(clean); @@ -1111,14 +1108,14 @@ } } } + + // Box-specific JS functions ////////////////////////////////////// + protected final JS justTriggerTraps(JS name, JS val) throws JSExn { return Main.SCHEDULER.justTriggerTraps(this, name, val); } protected final JS putAndTriggerTraps(JS name, JS val) throws JSExn { return Main.SCHEDULER.putAndTriggerTraps(this, name, val); } protected final JS getAndTriggerTraps(JS name) throws JSExn { return Main.SCHEDULER.getAndTriggerTraps(this, name); } - - // Specific box functions /////////////////////////////////////////////////// - /** catch exceptions to avoid other functions having to catch them, and * handle logging/reporting of errors */ protected final JS justTriggerTrapsAndCatchExceptions(JS name, JS val) { @@ -1148,13 +1145,13 @@ Trap t = getTrap(name); return t==null?null:t.findWrite(); } - + /** fetches a read trap for property 'name' */ private Trap rtrap(JS name) { Trap t = getTrap(name); return t==null?null:t.findRead(); } - + /** execute trap JS up until the put, giving extra control over the put * it must ALWAYS be followed by a postPutTriggerTrapsAndCatchExceptions */ private final JSExn prePutTriggerTrapsAndCatchExceptions(Trap t, JS name, JS val) { @@ -1182,6 +1179,9 @@ } } + + // Box property setting functions ///////////////////////////////// + //#repeat Width/Height width/height WIDTH/HEIGHT /** set minwidth/maxwidth according to min/max */ private final void setMinMaxWidth(int minwidth, int maxwidth) throws JSExn { @@ -1320,7 +1320,7 @@ } - // Event Handling ///////////////////////////////////////////////// + // Input event handling /////////////////////////////////////////// /** initiate a move event - should only ever be invoked by surface or inputevent */ protected void tryPropagateMove(int mx, int my) throws JSExn { @@ -1541,7 +1541,7 @@ } - // Methods to implement org.ibex.js.JS ////////////////////////////////////// + // Methods to implement org.ibex.js.JS //////////////////////////// public JS.Keys keys() throws JSExn { return new JSArrayLike.Keys(this);} public JS type() { return SC_box; } @@ -2968,7 +2968,7 @@ } - // JS surface/visible Handling //////////////////////////////////////////////////////// + // JS surface/visible Handling //////////////////////////////////// /** recursively attempt to fetch a surface object */ static private final JS getSurfaceObject(Box b) throws JSExn { @@ -3056,7 +3056,7 @@ } - // Tree Handling ////////////////////////////////////////////////////////////////////// + // Tree Handling ////////////////////////////////////////////////// final private void clear(Object from) throws JSExn { clear(from, getAndTriggerTraps(SC_numchildren)); } final private void clear(Object from, Object to) throws JSExn { @@ -3083,7 +3083,7 @@ public boolean hasParent() { return parent!=null; } - // Tree Manipulation ///////////////////////////////////////////////////////////////////// + // Tree Manipulation ////////////////////////////////////////////// /** change the parent of the box and fire relevant traps */ protected final void removeFromParent() throws JSExn { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn