Revision: 2954
          http://vexi.svn.sourceforge.net/vexi/?rev=2954&view=rev
Author:   clrg
Date:     2008-07-02 04:15:36 -0700 (Wed, 02 Jul 2008)

Log Message:
-----------
Organize test templates

Added Paths:
-----------
    trunk/widgets/org.vexi.widgets/src_dev/test/all.t
    trunk/widgets/org.vexi.widgets/src_dev/test/fields.t
    trunk/widgets/org.vexi.widgets/src_dev/test/fontsize.t
    trunk/widgets/org.vexi.widgets/src_dev/test/option.t
    trunk/widgets/org.vexi.widgets/src_dev/test/scroll.t
    trunk/widgets/org.vexi.widgets/src_dev/test/tabs.t
    trunk/widgets/org.vexi.widgets/src_dev/test/tree/
    trunk/widgets/org.vexi.widgets/src_dev/test/tree/nexttree.t

Removed Paths:
-------------
    trunk/widgets/org.vexi.widgets/src_dev/create_all.t
    trunk/widgets/org.vexi.widgets/src_dev/test_fields.t
    trunk/widgets/org.vexi.widgets/src_dev/test_fontsize.t
    trunk/widgets/org.vexi.widgets/src_dev/test_option.t
    trunk/widgets/org.vexi.widgets/src_dev/test_scroll.t
    trunk/widgets/org.vexi.widgets/src_dev/test_tabs.t
    trunk/widgets/org.vexi.widgets/src_dev/tree_nexttree.t

Deleted: trunk/widgets/org.vexi.widgets/src_dev/create_all.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/create_all.t 2008-07-02 11:04:39 UTC 
(rev 2953)
+++ trunk/widgets/org.vexi.widgets/src_dev/create_all.t 2008-07-02 11:15:36 UTC 
(rev 2954)
@@ -1,14 +0,0 @@
-<vexi xmlns:ui="vexi://ui" xmlns:wi="vexi.widget">
-    <wi:surface />
-    <ui:box titlebar="Creates one of each widget">
-        <wi:scrollpane>
-            for (var k in wi)
-                if (k!=".svn" and k!="surface" and k!="scrollpane" and 
k!="table")
-                    thisbox[numchildren] = wi[k](vexi.box);
-            for (var k in wi.table)
-                if (k!=".svn")
-                    thisbox[numchildren] = wi.table[k](vexi.box);
-        </wi:scrollpane>
-        vexi.ui.frame = thisbox;
-    </ui:box>
-</vexi>
\ No newline at end of file

Copied: trunk/widgets/org.vexi.widgets/src_dev/test/all.t (from rev 2953, 
trunk/widgets/org.vexi.widgets/src_dev/create_all.t)
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test/all.t                           
(rev 0)
+++ trunk/widgets/org.vexi.widgets/src_dev/test/all.t   2008-07-02 11:15:36 UTC 
(rev 2954)
@@ -0,0 +1,14 @@
+<vexi xmlns:ui="vexi://ui" xmlns:wi="vexi.widget">
+    <wi:surface />
+    <ui:box titlebar="Creates one of each widget">
+        <wi:scrollpane>
+            for (var k in wi)
+                if (k!=".svn" and k!="surface" and k!="scrollpane" and 
k!="table")
+                    thisbox[numchildren] = wi[k](vexi.box);
+            for (var k in wi.table)
+                if (k!=".svn")
+                    thisbox[numchildren] = wi.table[k](vexi.box);
+        </wi:scrollpane>
+        vexi.ui.frame = thisbox;
+    </ui:box>
+</vexi>
\ No newline at end of file

Copied: trunk/widgets/org.vexi.widgets/src_dev/test/fields.t (from rev 2953, 
trunk/widgets/org.vexi.widgets/src_dev/test_fields.t)
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test/fields.t                        
        (rev 0)
+++ trunk/widgets/org.vexi.widgets/src_dev/test/fields.t        2008-07-02 
11:15:36 UTC (rev 2954)
@@ -0,0 +1,14 @@
+<vexi xmlns:ui="vexi://ui" xmlns:w="vexi.widget">
+    <w:surface />
+    <ui:box orient="vertical">
+        <ui:box>
+            <w:textfield />
+        </ui:box>
+        <ui:box>
+            <w:numfield />
+            <w:spin />
+        </ui:box>
+        <w:textarea />
+        vexi.ui.frame = thisbox;
+    </ui:box>
+</vexi>
\ No newline at end of file

Copied: trunk/widgets/org.vexi.widgets/src_dev/test/fontsize.t (from rev 2953, 
trunk/widgets/org.vexi.widgets/src_dev/test_fontsize.t)
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test/fontsize.t                      
        (rev 0)
+++ trunk/widgets/org.vexi.widgets/src_dev/test/fontsize.t      2008-07-02 
11:15:36 UTC (rev 2954)
@@ -0,0 +1,18 @@
+<vexi xmlns:ui="vexi://ui" xmlns="vexi.widget">
+    <ui:box fill="white" orient="vertical">
+        <ui:box text="Testing Core Features" fontsize="xxsmall" />
+        <ui:box text="Testing Core Features" fontsize="xsmall" />
+        <ui:box text="Testing Core Features" fontsize="small" />
+        <ui:box text="Testing Core Features" fontsize="medium" />
+        <ui:box text="Testing Core Features" fontsize="large" />
+        <ui:box text="Testing Core Features" fontsize="xlarge" />
+        <ui:box text="Testing Core Features" fontsize="xxlarge" />
+        _KeyPressed ++= function(v) {
+            cascade = v;
+            if (v == "A-+") vexi.ui.fontsize.medium += 1;
+            if (v == "A--") vexi.ui.fontsize.medium -= 1;
+        }
+        fontsize ++= function(v) { vexi.log.info("new size: "+v); cascade = v; 
}
+        vexi.ui.frame = thisbox;
+    </ui:box>
+</vexi>
\ No newline at end of file

Copied: trunk/widgets/org.vexi.widgets/src_dev/test/option.t (from rev 2953, 
trunk/widgets/org.vexi.widgets/src_dev/test_option.t)
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test/option.t                        
        (rev 0)
+++ trunk/widgets/org.vexi.widgets/src_dev/test/option.t        2008-07-02 
11:15:36 UTC (rev 2954)
@@ -0,0 +1,25 @@
+<vexi xmlns:ui="vexi://ui" xmlns:w="vexi.widget">
+    <w:surface />
+    <ui:box>
+        <ui:box />
+        <ui:box shrink="true">
+            <ui:box text=" Option " />
+            <w:option id="o" shrink="true" minwidth="80">
+                <w:item text="Value A" selected="true" />
+                <w:item text="Value B" />
+            </w:option>
+            <w:button id="b1" text="Set Value A" />
+            $b1.action ++= function(v) { $o.value = "Value A"; return; }
+        </ui:box>
+        <ui:box />
+        <ui:box shrink="true">
+            <ui:box text=" Combo " />
+            <w:combo shrink="true" minwidth="80">
+                <w:item text="Value A" selected="true" />
+                <w:item text="Value B" />
+            </w:combo>
+        </ui:box>
+        <ui:box />
+        vexi.ui.frame = thisbox;
+    </ui:box>
+</vexi>
\ No newline at end of file

Copied: trunk/widgets/org.vexi.widgets/src_dev/test/scroll.t (from rev 2953, 
trunk/widgets/org.vexi.widgets/src_dev/test_scroll.t)
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test/scroll.t                        
        (rev 0)
+++ trunk/widgets/org.vexi.widgets/src_dev/test/scroll.t        2008-07-02 
11:15:36 UTC (rev 2954)
@@ -0,0 +1,13 @@
+<vexi xmlns:ui="vexi://ui" xmlns:w="vexi.widget">
+    <w:surface />
+    <ui:box frameheight="200">
+        <ui:box />
+        <w:bevel form="down">
+            <w:scrollpane>
+                <ui:box height="210" />
+            </w:scrollpane>
+        </w:bevel>
+        <ui:box />
+        vexi.ui.frame = thisbox;
+    </ui:box>
+</vexi>
\ No newline at end of file

Copied: trunk/widgets/org.vexi.widgets/src_dev/test/tabs.t (from rev 2953, 
trunk/widgets/org.vexi.widgets/src_dev/test_tabs.t)
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test/tabs.t                          
(rev 0)
+++ trunk/widgets/org.vexi.widgets/src_dev/test/tabs.t  2008-07-02 11:15:36 UTC 
(rev 2954)
@@ -0,0 +1,25 @@
+<vexi xmlns:ui="vexi://ui" xmlns="vexi.widget">
+    <surface />
+    <ui:box>
+        <tabpane>
+            <ui:box orient="vertical" tabtext="Options">
+                <option>
+                    <item text="Alpha" />
+                    <item text="Beti" />
+                    <item text="Spaghetti" />
+                </option>
+                <combo>
+                    <item text="Aubergine" />
+                    <item text="Brocoli" />
+                    <item text="Cabbage" />
+                </combo>
+                <button tooltip="testing 123" />
+            </ui:box>
+            for (var i=0; 10>i; i++) {
+                thisbox[numchildren] = vexi.box;
+                thisbox[numchildren-1].tabtext = "Test Tab "+i;
+            }
+        </tabpane>
+        vexi.ui.frame = thisbox;
+    </ui:box>
+</vexi>
\ No newline at end of file

Copied: trunk/widgets/org.vexi.widgets/src_dev/test/tree/nexttree.t (from rev 
2953, trunk/widgets/org.vexi.widgets/src_dev/tree_nexttree.t)
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test/tree/nexttree.t                 
        (rev 0)
+++ trunk/widgets/org.vexi.widgets/src_dev/test/tree/nexttree.t 2008-07-02 
11:15:36 UTC (rev 2954)
@@ -0,0 +1,196 @@
+<!-- Copyright 2007 - see COPYING for details [LGPL] -->
+
+<vexi xmlns="org.vexi.lib.role" xmlns:ui="vexi://ui" xmlns:meta="vexi://meta">
+    <meta:doc>
+        <author>Charles Goodwin</author>
+    </meta:doc>
+    
+    <selectable />
+    <ui:box>
+        
+        thisbox.th_content = null;
+        thisbox.th_expand = null;
+        thisbox.th_handle = null;
+        thisbox.th_node = null;
+        thisbox.th_title = null;
+        
+        thisbox.v_isroot = true;
+        thisbox.v_self ++= function() { return thisbox; }
+        
+        thisbox.expanded = true;
+        
+        var icontemplate = null;
+        
+        /** used for closing / expanding the tree */
+        thisbox.flipDisplay = function(v) { expanded = !th_expand.display; 
cascade = v; }
+        
+        /** select when we mouse press on the node */
+        thisbox.nodePress = function(v) { selected = true; cascade = v; }
+        
+        /** used for fancier icon implementations */
+        thisbox.setIconTemplate = function(i) { icontemplate = i; }
+        
+        thisbox.childrenWrite = function(c) {
+            if (c and c.v_istree) {
+                var cself = c.v_self;
+                cself.v_node = c;
+                cself.nexttree ++= nexttreeChildRead;
+                cself.prevtree ++= prevtreeChildRead;
+                // we have no group
+                if (!v_group) {
+                    // add to child group
+                    if (cself.v_group) {
+                        v_group = cself.v_group;
+                        v_group.members.unshift(thisbox);
+                    // start a new group
+                    } else c.group = group;
+                // we have a group - insert or merge into this
+                } else {
+                    var insafter = null;
+                    // no children, insert after thisbox
+                    if (!th_content.numchildren) insafter = thisbox;
+                    // try the box under the current placement
+                    if (!insafter) insafter = th_content[trapname];
+                    // double-check before attempting insertion
+                    if (insafter) insafter = v_group.members.before(insafter);
+                    // need to find last node (nodes may be trees)
+                    else {
+                        var node = thisbox;
+                        insafter = thisbox;
+                        for (var i=thisbox.numchildren-1; i>=0; i--) {
+                           if (node[i].v_istree) {
+                               insafter = node[i].v_self;
+                               if (node[i].numchildren) {
+                                   node = node[i];
+                                   // reset i, no -1 due to for loop i--
+                                   i = node.numchildren;
+                               } else break;
+                           }
+                        }
+                    }
+                    // now position [insafter] is known
+                    
+                    // merge groups
+                    if (c.v_self.v_group)
+                        v_group.merge(c.v_self.v_group, insafter);
+                    // c has no group - insert it
+                    else {
+                        c.v_self.v_group = v_group;
+                        v_group.members.insert(c.v_self, insafter);
+                    }
+                }
+            }
+            var _c = trapee[trapname];
+            if (c == null and _c != null) {
+                // remove from this tree
+                if (_c.v_istree) {
+                    // FIXME: split groups
+                    _c.v_self.v_group = null;
+                    _c.v_self.nexttree --= nexttreeChildRead;
+                    _c.v_self.prevtree --= prevtreeChildRead;
+                }
+            }
+            cascade = c;
+            th_handle.display = (th_content.numchildren > 0);
+        }
+        
+        thisbox.nexttree ++= function() {
+        vexi.log.info("???");
+            if (expanded) {
+                var n = th_content.numchildren;
+                for (var i=0; n>i; i++)
+                    if (th_content[i].v_istree and th_content[i].visible)
+                        return th_content[i];
+            }
+            return thisbox;
+        }
+        
+        thisbox.nexttreeChildRead = function() {
+        vexi.log.info("!!!");
+            var t = trapee;
+            var c = cascade;
+            if (!c.selected) return c;
+            var n = th_content.numchildren;
+            for (var i = th_content.indexof(t.v_node)+1; n>i; i++)
+                if (th_content[i].v_istree and th_content[i].visible)
+                    return th_content[i];
+            return nexttree;
+        }
+        
+        //thisbox.prevtree ++= function() { return thisbox; }
+        thisbox.prevtreeChildRead = function() {
+            var t = trapee;
+            for (var i = th_content.indexof(t.v_node)-1; i>=0; i--)
+                if (th_content[i].v_istree and th_content[i].visible)
+                    return th_content[i];
+            return thisbox;
+        }
+        
+        thisbox.expanded   ++= static.expandRead;
+        thisbox.expanded   ++= static.expandWrite;
+        thisbox.nextselect ++= static.nextselectRead;
+        thisbox.th_content ++= static.contentWrite;
+        thisbox.th_handle  ++= static.handleWrite;
+        thisbox.th_node    ++= static.nodeWrite;
+        thisbox.th_title   ++= static.titleWrite;
+        thisbox.KeyPressed ++= static.keypressWrite;
+        
+    </ui:box>
+    
+    static.expandRead = function() { return trapee.th_expand.display; }
+    static.expandWrite = function(v) {
+        var t = trapee;
+        t.th_expand.display = v;
+        if (!v) {
+            var g = t.v_group;
+            if (g and g.selected and !g.selected.visible)
+                t.selected = true;
+        }
+        return;
+    }
+    
+    static.nextselectRead = function() {
+        var c = cascade;
+        if (c and c.visible) return c;
+        return null;
+        return trapee.nexttree;
+    }
+    
+    static.contentWrite = function(v) {
+        cascade = v;
+        v.Children ++= trapee.childrenWrite;
+    }
+        
+    static.handleWrite = function(v) {
+        cascade = v;
+        v.Press1 ++= trapee.flipDisplay;
+    }
+    
+    /** override action write trap in selectable */
+    static.nodeWrite = function(n) {
+        cascade = n;
+        n.Press1 ++= trapee.nodePress;
+    }
+    
+    static.titleWrite = function(v) {
+        cascade = v;
+        v.DoubleClick1 ++= trapee.flipDisplay;
+    }
+    
+    static.keypressWrite = function(v) {
+        vexi.log.info("? "+v);
+        var t = trapee;
+        if (v == "left") t.th_expand.display = false;
+        else if (v == "right") {
+            if (t.th_content.numchildren)
+                t.th_expand.display = true;
+        } else if (v == "up") {
+            var pt = t.prevtree;
+            if (pt) pt.selected = true;
+        } else if (v == "down") {
+            var nt = t.nexttree;
+            if (nt) nt.selected = true;
+        } else cascade = v;
+    }
+    
+</vexi>

Deleted: trunk/widgets/org.vexi.widgets/src_dev/test_fields.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test_fields.t        2008-07-02 
11:04:39 UTC (rev 2953)
+++ trunk/widgets/org.vexi.widgets/src_dev/test_fields.t        2008-07-02 
11:15:36 UTC (rev 2954)
@@ -1,9 +0,0 @@
-<vexi xmlns:ui="vexi://ui" xmlns:w="vexi.widget">
-    <w:surface />
-    <ui:box orient="vertical">
-        <w:timefield />
-        <w:datefield />
-        <w:datetime />
-        vexi.ui.frame = thisbox;
-    </ui:box>
-</vexi>
\ No newline at end of file

Deleted: trunk/widgets/org.vexi.widgets/src_dev/test_fontsize.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test_fontsize.t      2008-07-02 
11:04:39 UTC (rev 2953)
+++ trunk/widgets/org.vexi.widgets/src_dev/test_fontsize.t      2008-07-02 
11:15:36 UTC (rev 2954)
@@ -1,18 +0,0 @@
-<vexi xmlns:ui="vexi://ui" xmlns="vexi.widget">
-    <ui:box fill="white" orient="vertical">
-        <ui:box text="Testing Core Features" fontsize="xxsmall" />
-        <ui:box text="Testing Core Features" fontsize="xsmall" />
-        <ui:box text="Testing Core Features" fontsize="small" />
-        <ui:box text="Testing Core Features" fontsize="medium" />
-        <ui:box text="Testing Core Features" fontsize="large" />
-        <ui:box text="Testing Core Features" fontsize="xlarge" />
-        <ui:box text="Testing Core Features" fontsize="xxlarge" />
-        _KeyPressed ++= function(v) {
-            cascade = v;
-            if (v == "A-+") vexi.ui.fontsize.medium += 1;
-            if (v == "A--") vexi.ui.fontsize.medium -= 1;
-        }
-        fontsize ++= function(v) { vexi.log.info("new size: "+v); cascade = v; 
}
-        vexi.ui.frame = thisbox;
-    </ui:box>
-</vexi>
\ No newline at end of file

Deleted: trunk/widgets/org.vexi.widgets/src_dev/test_option.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test_option.t        2008-07-02 
11:04:39 UTC (rev 2953)
+++ trunk/widgets/org.vexi.widgets/src_dev/test_option.t        2008-07-02 
11:15:36 UTC (rev 2954)
@@ -1,25 +0,0 @@
-<vexi xmlns:ui="vexi://ui" xmlns:w="vexi.widget">
-    <w:surface />
-    <ui:box>
-        <ui:box />
-        <ui:box shrink="true">
-            <ui:box text=" Option " />
-            <w:option id="o" shrink="true" minwidth="80">
-                <w:item text="Value A" selected="true" />
-                <w:item text="Value B" />
-            </w:option>
-            <w:button id="b1" text="Set Value A" />
-            $b1.action ++= function(v) { $o.value = "Value A"; return; }
-        </ui:box>
-        <ui:box />
-        <ui:box shrink="true">
-            <ui:box text=" Combo " />
-            <w:combo shrink="true" minwidth="80">
-                <w:item text="Value A" selected="true" />
-                <w:item text="Value B" />
-            </w:combo>
-        </ui:box>
-        <ui:box />
-        vexi.ui.frame = thisbox;
-    </ui:box>
-</vexi>
\ No newline at end of file

Deleted: trunk/widgets/org.vexi.widgets/src_dev/test_scroll.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test_scroll.t        2008-07-02 
11:04:39 UTC (rev 2953)
+++ trunk/widgets/org.vexi.widgets/src_dev/test_scroll.t        2008-07-02 
11:15:36 UTC (rev 2954)
@@ -1,13 +0,0 @@
-<vexi xmlns:ui="vexi://ui" xmlns:w="vexi.widget">
-    <w:surface />
-    <ui:box frameheight="200">
-        <ui:box />
-        <w:bevel form="down">
-            <w:scrollpane>
-                <ui:box height="210" />
-            </w:scrollpane>
-        </w:bevel>
-        <ui:box />
-        vexi.ui.frame = thisbox;
-    </ui:box>
-</vexi>
\ No newline at end of file

Deleted: trunk/widgets/org.vexi.widgets/src_dev/test_tabs.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/test_tabs.t  2008-07-02 11:04:39 UTC 
(rev 2953)
+++ trunk/widgets/org.vexi.widgets/src_dev/test_tabs.t  2008-07-02 11:15:36 UTC 
(rev 2954)
@@ -1,25 +0,0 @@
-<vexi xmlns:ui="vexi://ui" xmlns="vexi.widget">
-    <surface />
-    <ui:box>
-        <tabpane>
-            <ui:box orient="vertical" tabtext="Options">
-                <option>
-                    <item text="Alpha" />
-                    <item text="Beti" />
-                    <item text="Spaghetti" />
-                </option>
-                <combo>
-                    <item text="Aubergine" />
-                    <item text="Brocoli" />
-                    <item text="Cabbage" />
-                </combo>
-                <button tooltip="testing 123" />
-            </ui:box>
-            for (var i=0; 10>i; i++) {
-                thisbox[numchildren] = vexi.box;
-                thisbox[numchildren-1].tabtext = "Test Tab "+i;
-            }
-        </tabpane>
-        vexi.ui.frame = thisbox;
-    </ui:box>
-</vexi>
\ No newline at end of file

Deleted: trunk/widgets/org.vexi.widgets/src_dev/tree_nexttree.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src_dev/tree_nexttree.t      2008-07-02 
11:04:39 UTC (rev 2953)
+++ trunk/widgets/org.vexi.widgets/src_dev/tree_nexttree.t      2008-07-02 
11:15:36 UTC (rev 2954)
@@ -1,196 +0,0 @@
-<!-- Copyright 2007 - see COPYING for details [LGPL] -->
-
-<vexi xmlns="org.vexi.lib.role" xmlns:ui="vexi://ui" xmlns:meta="vexi://meta">
-    <meta:doc>
-        <author>Charles Goodwin</author>
-    </meta:doc>
-    
-    <selectable />
-    <ui:box>
-        
-        thisbox.th_content = null;
-        thisbox.th_expand = null;
-        thisbox.th_handle = null;
-        thisbox.th_node = null;
-        thisbox.th_title = null;
-        
-        thisbox.v_isroot = true;
-        thisbox.v_self ++= function() { return thisbox; }
-        
-        thisbox.expanded = true;
-        
-        var icontemplate = null;
-        
-        /** used for closing / expanding the tree */
-        thisbox.flipDisplay = function(v) { expanded = !th_expand.display; 
cascade = v; }
-        
-        /** select when we mouse press on the node */
-        thisbox.nodePress = function(v) { selected = true; cascade = v; }
-        
-        /** used for fancier icon implementations */
-        thisbox.setIconTemplate = function(i) { icontemplate = i; }
-        
-        thisbox.childrenWrite = function(c) {
-            if (c and c.v_istree) {
-                var cself = c.v_self;
-                cself.v_node = c;
-                cself.nexttree ++= nexttreeChildRead;
-                cself.prevtree ++= prevtreeChildRead;
-                // we have no group
-                if (!v_group) {
-                    // add to child group
-                    if (cself.v_group) {
-                        v_group = cself.v_group;
-                        v_group.members.unshift(thisbox);
-                    // start a new group
-                    } else c.group = group;
-                // we have a group - insert or merge into this
-                } else {
-                    var insafter = null;
-                    // no children, insert after thisbox
-                    if (!th_content.numchildren) insafter = thisbox;
-                    // try the box under the current placement
-                    if (!insafter) insafter = th_content[trapname];
-                    // double-check before attempting insertion
-                    if (insafter) insafter = v_group.members.before(insafter);
-                    // need to find last node (nodes may be trees)
-                    else {
-                        var node = thisbox;
-                        insafter = thisbox;
-                        for (var i=thisbox.numchildren-1; i>=0; i--) {
-                           if (node[i].v_istree) {
-                               insafter = node[i].v_self;
-                               if (node[i].numchildren) {
-                                   node = node[i];
-                                   // reset i, no -1 due to for loop i--
-                                   i = node.numchildren;
-                               } else break;
-                           }
-                        }
-                    }
-                    // now position [insafter] is known
-                    
-                    // merge groups
-                    if (c.v_self.v_group)
-                        v_group.merge(c.v_self.v_group, insafter);
-                    // c has no group - insert it
-                    else {
-                        c.v_self.v_group = v_group;
-                        v_group.members.insert(c.v_self, insafter);
-                    }
-                }
-            }
-            var _c = trapee[trapname];
-            if (c == null and _c != null) {
-                // remove from this tree
-                if (_c.v_istree) {
-                    // FIXME: split groups
-                    _c.v_self.v_group = null;
-                    _c.v_self.nexttree --= nexttreeChildRead;
-                    _c.v_self.prevtree --= prevtreeChildRead;
-                }
-            }
-            cascade = c;
-            th_handle.display = (th_content.numchildren > 0);
-        }
-        
-        thisbox.nexttree ++= function() {
-        vexi.log.info("???");
-            if (expanded) {
-                var n = th_content.numchildren;
-                for (var i=0; n>i; i++)
-                    if (th_content[i].v_istree and th_content[i].visible)
-                        return th_content[i];
-            }
-            return thisbox;
-        }
-        
-        thisbox.nexttreeChildRead = function() {
-        vexi.log.info("!!!");
-            var t = trapee;
-            var c = cascade;
-            if (!c.selected) return c;
-            var n = th_content.numchildren;
-            for (var i = th_content.indexof(t.v_node)+1; n>i; i++)
-                if (th_content[i].v_istree and th_content[i].visible)
-                    return th_content[i];
-            return nexttree;
-        }
-        
-        //thisbox.prevtree ++= function() { return thisbox; }
-        thisbox.prevtreeChildRead = function() {
-            var t = trapee;
-            for (var i = th_content.indexof(t.v_node)-1; i>=0; i--)
-                if (th_content[i].v_istree and th_content[i].visible)
-                    return th_content[i];
-            return thisbox;
-        }
-        
-        thisbox.expanded   ++= static.expandRead;
-        thisbox.expanded   ++= static.expandWrite;
-        thisbox.nextselect ++= static.nextselectRead;
-        thisbox.th_content ++= static.contentWrite;
-        thisbox.th_handle  ++= static.handleWrite;
-        thisbox.th_node    ++= static.nodeWrite;
-        thisbox.th_title   ++= static.titleWrite;
-        thisbox.KeyPressed ++= static.keypressWrite;
-        
-    </ui:box>
-    
-    static.expandRead = function() { return trapee.th_expand.display; }
-    static.expandWrite = function(v) {
-        var t = trapee;
-        t.th_expand.display = v;
-        if (!v) {
-            var g = t.v_group;
-            if (g and g.selected and !g.selected.visible)
-                t.selected = true;
-        }
-        return;
-    }
-    
-    static.nextselectRead = function() {
-        var c = cascade;
-        if (c and c.visible) return c;
-        return null;
-        return trapee.nexttree;
-    }
-    
-    static.contentWrite = function(v) {
-        cascade = v;
-        v.Children ++= trapee.childrenWrite;
-    }
-        
-    static.handleWrite = function(v) {
-        cascade = v;
-        v.Press1 ++= trapee.flipDisplay;
-    }
-    
-    /** override action write trap in selectable */
-    static.nodeWrite = function(n) {
-        cascade = n;
-        n.Press1 ++= trapee.nodePress;
-    }
-    
-    static.titleWrite = function(v) {
-        cascade = v;
-        v.DoubleClick1 ++= trapee.flipDisplay;
-    }
-    
-    static.keypressWrite = function(v) {
-        vexi.log.info("? "+v);
-        var t = trapee;
-        if (v == "left") t.th_expand.display = false;
-        else if (v == "right") {
-            if (t.th_content.numchildren)
-                t.th_expand.display = true;
-        } else if (v == "up") {
-            var pt = t.prevtree;
-            if (pt) pt.selected = true;
-        } else if (v == "down") {
-            var nt = t.nexttree;
-            if (nt) nt.selected = true;
-        } else cascade = v;
-    }
-    
-</vexi>


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

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to