Revision: 2734 http://vexi.svn.sourceforge.net/vexi/?rev=2734&view=rev Author: clrg Date: 2008-01-17 11:46:50 -0800 (Thu, 17 Jan 2008)
Log Message: ----------- Create gridproxy layout widget (see <usage/> for details) Modified Paths: -------------- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/layout/grid.t Added Paths: ----------- trunk/widgets/org.vexi.widgets/src/vexi/layout/gridproxy.t Modified: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/layout/grid.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/layout/grid.t 2008-01-16 14:17:27 UTC (rev 2733) +++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/layout/grid.t 2008-01-17 19:46:50 UTC (rev 2734) @@ -536,6 +536,13 @@ /** set up children so the grid can react to them */ thisbox.Children ++= function(v) { if (v) { + if (v.v_gridproxy) { + var c = v.v_gridcontent; + var n = c.numchildren; + for (var i=0; n>i; i++) + thisbox[numchildren] = c[0]; + return; + } v.contentwidth ++= invokePlaceWidth; v.contentheight ++= invokePlaceHeight; v.maxwidth ++= invokePlaceWidth; Added: trunk/widgets/org.vexi.widgets/src/vexi/layout/gridproxy.t =================================================================== --- trunk/widgets/org.vexi.widgets/src/vexi/layout/gridproxy.t (rev 0) +++ trunk/widgets/org.vexi.widgets/src/vexi/layout/gridproxy.t 2008-01-17 19:46:50 UTC (rev 2734) @@ -0,0 +1,33 @@ +<!-- Copyright 2007 - see COPYING for details [LGPL] --> + +<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta"> + <meta:doc> + <author>Charles Goodwin</author> + <name>Grid Proxy</name> + <desc>For slotting templated children into a grid</desc> + <usage> + Useful for managing layout in a grid but still being able + to use templates: + + Example mytemplate.t: + <vexi> + <gridproxy /> + <ui:box> + <ui:box id="A" /> + <ui:box id="B" /> + </ui:box> + </vexi> + + Here all $A boxes are in col 1, all $B boxes in col 2: + <grid cols="2"> + <mytempate /> + <mytempate /> + <mytempate /> + </grid> + </usage> + </meta:doc> + + <ui:box v_gridproxy="true"> + thisbox.v_gridcontent = thisbox; + </ui:box> +</vexi> 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: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn