Revision: 2478
          http://vexi.svn.sourceforge.net/vexi/?rev=2478&view=rev
Author:   clrg
Date:     2007-10-16 12:48:57 -0700 (Tue, 16 Oct 2007)

Log Message:
-----------
Remove cardpane duplicate from lib.widget

Removed Paths:
-------------
    trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/cardpane.t

Deleted: trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/cardpane.t
===================================================================
--- trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/cardpane.t   
2007-10-16 19:47:24 UTC (rev 2477)
+++ trunk/widgets/org.vexi.widgets/src/org/vexi/lib/widget/cardpane.t   
2007-10-16 19:48:57 UTC (rev 2478)
@@ -1,196 +0,0 @@
-<!-- Copyright 2007 - see COPYING for details [LGPL] -->
-
-<vexi xmlns="org.vexi.lib.widget" xmlns:ui="vexi://ui" 
xmlns:meta="vexi://meta">
-    <meta:doc>
-        <todo>
-            * Make cardpane aware of 'enabled' cards
-            * Prevent card.display from being changed by anything other than 
show
-        </todo>
-    </meta:doc>
-    
-    <ui:box>
-        
-        // public interface
-        
-        thisbox.nextcard;
-        thisbox.nextstep;
-        thisbox.prevcard;
-        thisbox.prevstep;
-        thisbox.show;
-        thisbox.remembersteps = false;
-        
-        // pseudo private variables
-        
-        thisbox.stepmarker = 0;
-        thisbox.stepping = false;
-        thisbox.steps = [];
-        thisbox.th_content;
-        
-        var showlock = false;
-        
-        var displayFunc = function(v)
-        {
-            if (showlock) { cascade = v; return; }
-            cascade = false;
-            if (prevstep) show = prevstep;
-            else if (prevcard) show = prevcard;
-            else if (nextstep) show = nextstep;
-            else if (nextcard) show = nextcard;
-        }
-        
-        /** card management */
-        th_content ++= function(v)
-        {
-            // childadded write trap
-            v.Children ++= function(c)
-            {
-                if (c != null)
-                {
-                    cascade = c;
-                    // show c if it is the first card
-                    if (v.numchildren > 1) c.display = false;
-                    else { show = c; }
-                    c.display ++= displayFunc;
-                    return;
-                }
-                
-                c = thisbox[arguments.trapname];
-                // if c is the shown card, attempt to show another
-                if (show == c)
-                {
-                    if (nextcard) nextcard = true;
-                    else if (prevcard) prevcard = true;
-                }
-                
-                // clean up steps[]
-                var newsteps = [];
-                for (var i=0, j=-1; steps.length>i; i++)
-                    if (steps[i] != c)
-                        newsteps[j++] = steps[i];
-                
-                // clean up traps
-                c.display --= displayFunc;
-                cascade = null;
-            }
-            
-            cascade = v;
-        }
-        
-        /** write trap to show a card by box or index */
-        show ++= function(v)
-        {
-            var card;
-            
-            if (typeof(v) == "number")
-            {
-                if (v >= th_content.numchildren)
-                    throw "Invalid card index put to cardpane.show: "+v;
-                card = th_content[v];
-            }
-            else if (typeof(v) == "box")
-            {
-                if (0 > th_content.indexof(v))
-                    throw "Invalid card object put to cardpane.show: "+v;
-                card = v;
-            }
-            else throw "Put a value other than a box or box index to 
cardpane.show";
-            
-            // hide the previously shown card and show the new one
-            showlock = true;
-            if (show) show.display = false;
-            card.display = true;
-            showlock = false;
-            
-            // remember where we are
-            if (remembersteps and !stepping)
-            {
-                stepmarker ++;
-                if (stepmarker != steps.length) steps.splice(stepmarker, 
steps.length - stepmarker);
-                if (stepmarker > 100) steps.splice(0);
-                steps[stepmarker] = card;
-            }
-            
-            // remember the card, not the trap value
-            cascade = card;
-        }
-        
-        // assign static trap functions
-        nextcard ++= static.ncWriteFunc;
-        nextcard ++= static.ncReadFunc;
-        nextstep ++= static.nsWriteFunc;
-        nextstep ++= static.nsReadFunc;
-        prevcard ++= static.pcWriteFunc;
-        prevcard ++= static.pcReadFunc;
-        prevstep ++= static.psWriteFunc;
-        prevstep ++= static.psReadFunc;
-        
-    </ui:box>
-    
-    /** write trap to show the next card in the cardpane */
-    static.ncWriteFunc = function(v)
-    {
-        if (trapee.nextcard)
-            trapee.show = trapee.nextcard;
-        cascade = v;
-    }
-    
-    /** read trap to fetch the next card in the cardpane */
-    static.ncReadFunc = function()
-    {
-        var ind = trapee.th_content.indexof(trapee.show);
-        if (trapee.show and trapee.th_content.numchildren-1 > ind)
-            return trapee.th_content[ind+1];
-        else return null;
-    }
-    
-    /** write trap to step forward to the next in the show-chain */
-    static.nsWriteFunc = function(v)
-    {
-        trapee.stepping = true;
-        if (trapee.nextstep) trapee.show = trapee.nextstep;
-        trapee.stepping = false;
-        cascade = v;
-    }
-    
-    /** read trap to fetch the next step in the show-chain */
-    static.nsReadFunc = function()
-    {
-        if (trapee.remembersteps and trapee.steps.length-1 > trapee.stepmarker)
-            return trapee.steps[trapee.stepmarker+1];
-        else return false;
-    }
-    
-    /** write trap to show the previous card in the cardpane */
-    static.pcWriteFunc = function(v)
-    {
-        cascade = v;
-        if (trapee.prevcard)
-            trapee.show = trapee.prevcard;
-    }
-    
-    /** read trap to fetch the previous card in the cardpane */
-    static.pcReadFunc = function()
-    {
-        var ind = trapee.th_content.indexof(trapee.show);
-        if (trapee.show and ind > 0) return trapee.th_content[ind-1];
-        else return false;
-    }
-    
-    /** write trap to step back to the previous in the show-chain */
-    static.psWriteFunc = function(v)
-    {
-        trapee.stepping = true;
-        if (trapee.prevstep) trapee.show = trapee.prevstep;
-        trapee.stepping = false;
-        cascade = v;
-    }
-    
-    /** read trap to fetch the previous step in the show-chain */
-    static.psReadFunc = function()
-    {
-        if (trapee.remembersteps and trapee.stepmarker > 0)
-            return trapee.steps[trapee.stepmarker - 1];
-        else return false;
-    }
-    
-</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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to