Revision: 4598
          http://sourceforge.net/p/vexi/code/4598
Author:   clrg
Date:     2013-11-21 22:06:41 +0000 (Thu, 21 Nov 2013)
Log Message:
-----------
Fix classic tabpane not using lib.button

Modified Paths:
--------------
    
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t

Added Paths:
-----------
    
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/tablist.t

Removed Paths:
-------------
    
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tablist.t

Copied: 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/tablist.t
 (from rev 4581, 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tablist.t)
===================================================================
--- 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/tablist.t
                          (rev 0)
+++ 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/lib/tablist.t
  2013-11-21 22:06:41 UTC (rev 4598)
@@ -0,0 +1,93 @@
+<!-- Copyright 2013 - see COPYING for details [LGPL] -->
+
+<vexi xmlns:ui="vexi://ui"
+      xmlns:lay="org.vexi.lib.layout"
+      xmlns:lib="org.vexi.lib.widget"
+      xmlns:wi="vexi.widget"
+      xmlns="vexi.theme">
+    
+    <lib:option />
+    <lay:margin redirect=":$content" margin="3" maxlistheight="160" 
shrink="true">
+        <lib.button id="button" width="18" minheight="18">
+            <ui:box layout="layer"> 
+                <ui:box id="arrow" fill=":.image.arrowdown" shrink="true" />
+            </ui:box>
+        </lib.button>
+        <!-- our popox -->
+        <lay:border id="popbox" border="black" depth="1">
+            <scrollpane id="scroll" autohide="true" 
fill=":.settings..surfacefill" hshrink="true" scrollhorizontal="false">
+                <ui:box id="content" align="left" fill="white" 
orient="vertical" shrink="true" />
+            </scrollpane>
+        </lay:border>
+        
+        // assign theme variables
+        thisbox.th_arrow = $arrow;
+        thisbox.th_button = $button;
+        thisbox.th_scroll = $scroll;
+        thisbox.v_content = $content;
+        thisbox.v_textbox = false; // flags to ignore text-related
+        thisbox.v_popbox = $popbox;
+        
+        // assign static functions
+        thisbox.popup   ++= static.popupWrite;
+        thisbox.popdown ++= static.popdownWrite;
+        thisbox.text    ++= static.textWrite;
+        
+        // pointer back to thisbox for static traps
+        $popbox.p_option = thisbox;
+        
+        /** grow content scrollpane */
+        $content.height ++= function(v) {
+            // FIXME: this is all a bit of a hack really - do it properly
+            if (!popped) {
+                cascade = v;
+                return;
+            }
+            var surf = 
surface.frame.height-surface.frame.distanceto($popbox).y;
+            surf = maxlistheight>surf ? surf : maxlistheight;
+            $scroll.minheight = v>surf ? surf : v;
+            cascade = v;
+        }
+        
+        thisbox.surfaceWidth = function(dx, sw) {
+            v_popbox.surface_x = vexi.math.max(0, dx-v_popbox.width+width-3);
+        }
+        
+        thisbox.surfaceHeight = function(dy, sh) {
+            v_popbox.surface_y = vexi.math.min(dy+height-3, 
sh-v_popbox.height);
+        }
+        
+        v_popbox.width ++= function(v) {
+            cascade = v;
+            var s = surface;
+            if (s!=null) {
+                surfaceWidth(s.frame.distanceto(thisbox).x, s.frame.width);
+            }
+        }
+        
+    </lay:margin>
+    <lay:container />
+    
+    /** ignore text writes */
+    static.textWrite = function(v) { return; }
+    
+    /** use button focus effect */
+    static.focusWrite = function(v) {
+        cascade = v;
+        trapee.th_button.focused = v;
+    }
+    
+    /** change button on popup */
+    static.popupWrite = function(v) {
+        cascade = v;
+        trapee.value = null;
+        trapee.th_arrow.fill = .image.arrowup;
+    }
+    
+    /** change button on popdown */
+    static.popdownWrite = function(v) {
+        cascade = v;
+        trapee.th_arrow.fill = .image.arrowdown;
+    }
+    
+</vexi>

Deleted: 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tablist.t
===================================================================
--- 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tablist.t  
    2013-11-21 19:44:02 UTC (rev 4597)
+++ 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tablist.t  
    2013-11-21 22:06:41 UTC (rev 4598)
@@ -1,95 +0,0 @@
-<!-- Copyright 2011 - see COPYING for details [LGPL] -->
-
-<vexi xmlns:ui="vexi://ui" xmlns:meta="vexi://meta" xmlns="vexi.theme"
-    xmlns:lay="org.vexi.lib.layout"
-    xmlns:lib="org.vexi.lib.widget"
-    xmlns:wi="vexi.widget"> 
-    <meta:doc>
-        <author>Charles Goodwin</author>
-    </meta:doc>
-    
-    <lib:option />
-    <lay:margin redirect=":$content" margin="3" maxlistheight="160" 
shrink="true">
-        <button id="button" width="18" minheight="18">
-            <ui:box fill="#d4d0c8" layout="layer"> 
-                <ui:box id="arrow" fill=":.image.arrowdown" shrink="true" />
-            </ui:box>
-        </button>
-        <!-- our popox -->
-        <lay:border id="popbox" border="black" depth="1">
-            <scrollpane id="scroll" autohide="true" 
fill=":.settings..surfacefill" hshrink="true" scrollhorizontal="false">
-                <ui:box id="content" align="left" fill="white" 
orient="vertical" shrink="true" />
-            </scrollpane>
-        </lay:border>
-        
-        // assign theme variables
-        thisbox.th_arrow = $arrow;
-        thisbox.th_button = $button;
-        thisbox.th_scroll = $scroll;
-        thisbox.v_content = $content;
-        thisbox.v_textbox = false; // flags to ignore text-related
-        thisbox.v_popbox = $popbox;
-        
-        // assign static functions
-        thisbox.popup   ++= static.popupWrite;
-        thisbox.popdown ++= static.popdownWrite;
-        thisbox.text    ++= static.textWrite;
-        
-        // pointer back to thisbox for static traps
-        $popbox.p_option = thisbox;
-        
-        /** grow content scrollpane */
-        $content.height ++= function(v) {
-            // FIXME: this is all a bit of a hack really - do it properly
-            if (!popped) {
-                cascade = v;
-                return;
-            }
-            var surf = 
surface.frame.height-surface.frame.distanceto($popbox).y;
-            surf = maxlistheight>surf ? surf : maxlistheight;
-            $scroll.minheight = v>surf ? surf : v;
-            cascade = v;
-        }
-        
-        thisbox.surfaceWidth = function(dx, sw) {
-            v_popbox.surface_x = vexi.math.max(0, dx-v_popbox.width+width-3);
-        }
-        
-        thisbox.surfaceHeight = function(dy, sh) {
-            v_popbox.surface_y = vexi.math.min(dy+height-3, 
sh-v_popbox.height);
-        }
-        
-        v_popbox.width ++= function(v) {
-            cascade = v;
-            var s = surface;
-            if (s!=null) {
-                surfaceWidth(s.frame.distanceto(thisbox).x, s.frame.width);
-            }
-        }
-        
-    </lay:margin>
-    <lay:container />
-    
-    /** ignore text writes */
-    static.textWrite = function(v) { return; }
-    
-    /** use button focus effect */
-    static.focusWrite = function(v) {
-        cascade = v;
-        trapee.th_button.focused = v;
-    }
-    
-    /** change button on popup */
-    static.popupWrite = function(v) {
-        cascade = v;
-        trapee.value = null;
-        trapee.th_arrow.fill = .image.arrowup;
-    }
-    
-    /** change button on popdown */
-    static.popdownWrite = function(v) {
-        cascade = v;
-        trapee.th_arrow.fill = .image.arrowdown;
-    }
-    
-</vexi>

Modified: 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t
===================================================================
--- 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t  
    2013-11-21 19:44:02 UTC (rev 4597)
+++ 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/tabpane.t  
    2013-11-21 22:06:41 UTC (rev 4598)
@@ -1,24 +1,19 @@
-<!-- Copyright 2012 - see COPYING for details [LGPL] -->
+<!-- Copyright 2013 - see COPYING for details [LGPL] -->
 
 <vexi xmlns:ui="vexi://ui"
-      xmlns:meta="vexi://meta"
       xmlns:role="org.vexi.lib.role"
       xmlns:lib="org.vexi.lib.widget"
       xmlns:wi="vexi.widget"
       xmlns="vexi.theme">
 
-    <meta:doc>
-        <author>Charles Goodwin</author>
-    </meta:doc>
-
     <lib:tabpane />
     <ui:box redirect=":$content">
         <ui:box align="topleft" layout="place" minwidth="100" minheight="100">
             <bevel id="content" form="up" y="30" />
             <ui:box id="wrap" minheight="32" vshrink="true">
-                <button id="prev" display="false">
+                <lib.button id="prev" display="false">
                     <ui:box fill=":.image.arrowleft" />
-                </button>
+                </lib.button>
                 <ui:box id="headwrap" align="topleft" layout="place">
                     <ui:box vshrink="true" align="top">
                         <ui:box id="head" shrink="true" />
@@ -28,10 +23,10 @@
                         <ui:box />
                     </ui:box>
                 </ui:box>
-                <button id="next" display="false">
+                <lib.button id="next" display="false">
                     <ui:box fill=":.image.arrowright" />
-                </button>
-                <tablist id="tablist" display="false" />
+                </lib.button>
+                <lib.tablist id="tablist" display="false" />
             </ui:box>
         </ui:box>
         

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


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to