Revision: 1918
http://svn.sourceforge.net/vexi/?rev=1918&view=rev
Author: clrg
Date: 2007-07-03 23:00:43 -0700 (Tue, 03 Jul 2007)
Log Message:
-----------
Vexi3 updates for option & spin
Modified Paths:
--------------
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/list.t
widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/focusborder.t
widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/item.t
widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/option.t
widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/spin.t
widgets/trunk/org.vexi.widgets/src/vexi/widget/option.t
widgets/trunk/org.vexi.widgets/src/vexi/widget/spin.t
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/list.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/list.t
2007-07-04 05:54:12 UTC (rev 1917)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/list.t
2007-07-04 06:00:43 UTC (rev 1918)
@@ -105,6 +105,8 @@
if (c.selected) c.selected = true;
}
+
+ v.orient = "vertical";
cascade = v;
}
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/focusborder.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/focusborder.t
2007-07-04 05:54:12 UTC (rev 1917)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/focusborder.t
2007-07-04 06:00:43 UTC (rev 1918)
@@ -25,6 +25,8 @@
$w.display = v;
}
+ vexi..vexi.util.redirect..addRedirect(thisbox, $content, "orient",
"layout");
+
</ui:box>
/** reusable function covering common usage */
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/item.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/item.t
2007-07-04 05:54:12 UTC (rev 1917)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/item.t
2007-07-04 06:00:43 UTC (rev 1918)
@@ -13,7 +13,11 @@
</ui:box>
- static.contentFunc = function(v) { v.align = "left"; }
+ static.contentFunc = function(v)
+ {
+ cascade = v;
+ v.align = "left";
+ }
static.selectedFunc = function(v)
{
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/option.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/option.t
2007-07-04 05:54:12 UTC (rev 1917)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/option.t
2007-07-04 06:00:43 UTC (rev 1918)
@@ -7,14 +7,14 @@
<lib:option redirect="$proxy" fill="white" margin="3" maxlistheight="160">
<bevel form="down">
- <focusborder id="focus" align="topleft" display="false">
- <pad id="pad" fill="white" layout="absolute" minwidth="0"
padding="1 3">
+ <focusborder id="focus" layout="absolute">
+ <pad id="pad" minwidth="0" padding="3">
<ui:box id="output" align="left" shrink="true" />
</pad>
</focusborder>
- <button id="button" width="19" minheight="19">
- <ui:box fill="#d4d0c8">
- <ui:box id="arrow" align="center" fill=".image.arrowdown"
shrink="true" />
+ <button id="button" width="19" minheight="19" shrink="true">
+ <ui:box fill="#d4d0c8">
+ <ui:box id="arrow" align="center" fill=".image.arrowdown"
width="8" height="8" />
</ui:box>
</button>
</bevel>
@@ -46,12 +46,7 @@
thisbox.popup ++= static.popupFunc;
thisbox.popdown ++= static.popdownFunc;
thisbox.width ++= static.widthFunc;
- thisbox.x ++= static.hFunc;
- thisbox.y ++= static.vFunc;
- thisbox.height ++= static.vFunc;
- $popbox.width ++= static.hPopFunc;
- $popbox.height ++= static.vPopFunc;
-
+
// pointer back to thisbox for static traps
$popbox.p_option = thisbox;
@@ -66,9 +61,6 @@
cascade = v;
}
- /** keep focusborder in sync with content */
- $pad.width ++= function(v) { $focus.width = v; }
-
/** move proxy children to $popbox children */
$proxy.Children ++= function(v) { $content[arguments.trapname] = v; }
$proxy.Children ++= function() { return $content[arguments.trapname]; }
@@ -85,10 +77,14 @@
/** change button on popup */
static.popupFunc = function(v)
{
- trapee.x = trapee.x;
- trapee.y = trapee.y;
- trapee.th_arrow.fill = vexi..org.vexi.theme.win2k.image.arrowup;
cascade = v;
+ trapee.th_popbox.surface_x =
+ vexi.math.min(trapee.surface.distanceto(trapee).x+2,
+ trapee.surface.width-trapee.th_popbox.width);
+ trapee.th_popbox.surface_y =
+ vexi.math.min(trapee.surface.distanceto(trapee).y+trapee.height-2,
+ trapee.surface.height - trapee.th_popbox.height);
+ trapee.th_arrow.fill = vexi..org.vexi.theme.win2k.image.arrowup;
}
/** change button on popdown */
@@ -101,32 +97,8 @@
/** keep content at least same width as widget */
static.widthFunc = function(v)
{
- trapee.th_content.minwidth = v-22;
cascade = v;
+ trapee.th_content.minwidth = v-22;
}
- /** sync popbox horizontally */
- static.hFunc = function(v)
- {
- cascade = v;
- trapee.th_popbox.surface_x =
- vexi.math.min(trapee.surface.distanceto(trapee).x+2,
- trapee.surface.width-trapee.th_popbox.width);
- }
-
- /** forcibly invoke x traps */
- static.hPopFunc = function(v) { cascade = v; trapee.p_option.x =
trapee.p_option.x; }
-
- /** sync popbox vertically */
- static.vFunc = function(v)
- {
- cascade = v;
- trapee.th_popbox.surface_y =
- vexi.math.min(trapee.surface.distanceto(trapee).y+trapee.height-2,
- trapee.surface.height - trapee.th_popbox.height);
- }
-
- /** forcibly invoke x traps */
- static.vPopFunc = function(v) { cascade = v; trapee.p_option.y =
trapee.p_option.y; }
-
</vexi>
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/spin.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/spin.t
2007-07-04 05:54:12 UTC (rev 1917)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/spin.t
2007-07-04 06:00:43 UTC (rev 1918)
@@ -6,24 +6,21 @@
</meta:doc>
<lib:spin />
- <ui:box redirect="$content" margin="3" padding="3" vshrink="true">
+ <ui:box redirect="$content" fill="white" margin="3" padding="3"
vshrink="true">
<bevel form="down">
- <ui:box id="bg" fill="white">
- <focusborder id="focus">
- <ui:box id="content" />
- </focusborder>
- </ui:box>
+ <focusborder id="focus" layout="absolute">
+ <ui:box id="content" align="right" shrink="true" />
+ </focusborder>
<ui:box orient="vertical" width="15">
<button id="more" repeats="true">
- <ui:box align="center" fill=".image.arrowup_small"
shrink="true" />
+ <ui:box align="center" fill=".image.arrowup_small"
width="5" height="4" />
</button>
<button id="less" repeats="true">
- <ui:box align="center" fill=".image.arrowdown_small"
shrink="true" />
+ <ui:box align="center" fill=".image.arrowdown_small"
width="5" height="4" />
</button>
</ui:box>
</bevel>
- thisbox.th_bg = $bg;
thisbox.th_content = $content;
thisbox.th_focus = $focus;
thisbox.th_more = $more;
@@ -39,15 +36,14 @@
static.enableFunc = function(v)
{
cascade = v;
- trapee.th_bg.fill = v ? "white" : "#d4d0c8";
+ trapee.fill = v ? "white" : "#d4d0c8";
}
static.widthFunc = function(v)
{
cascade = v;
var l = (""+trapee.max).length > (""+trapee.min).length ?
(""+trapee.max).length : (""+trapee.min).length;
- trapee.th_output.align = "right";
- trapee.th_output.minwidth =
l*vexi.ui.font.width(trapee.font,trapee.fontsize,"0");
+ trapee.th_focus.width =
l*vexi.ui.font.width(trapee.font,trapee.fontsize,"0")+6;
}
</vexi>
Modified: widgets/trunk/org.vexi.widgets/src/vexi/widget/option.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/vexi/widget/option.t 2007-07-04
05:54:12 UTC (rev 1917)
+++ widgets/trunk/org.vexi.widgets/src/vexi/widget/option.t 2007-07-04
06:00:43 UTC (rev 1918)
@@ -22,12 +22,11 @@
// glue code
rdrt..addRedirect(thisbox, $margin, "margin", "marginleft",
"marginright", "margintop", "marginbottom");
- rdrt..addRedirect(thisbox, $content, "orient", "padding",
"paddingleft", "paddingright", "paddingtop", "paddingbottom");
+ rdrt..addRedirect(thisbox, $widget, "padding", "paddingleft",
"paddingright", "paddingtop", "paddingbottom");
rdrt..addRedirect(thisbox, $widget, "enabled", "fill", "focusable",
"focused", "maxlistheight", "popdown", "popup", "showvalue",
"font", "fontsize", "text", "textcolor",
"value", "KeyPressed", "KeyReleased");
if ($widget.margin) $margin.margin = $widget.margin;
- if ($widget.padding) $content.padding = $widget.padding;
</ui:box>
<role:focusable />
Modified: widgets/trunk/org.vexi.widgets/src/vexi/widget/spin.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/vexi/widget/spin.t 2007-07-04
05:54:12 UTC (rev 1917)
+++ widgets/trunk/org.vexi.widgets/src/vexi/widget/spin.t 2007-07-04
06:00:43 UTC (rev 1918)
@@ -11,16 +11,16 @@
<ui:box redirect="null">
<pad id="margin">
<spin id="widget">
- th_output = $content;
+ th_output = $output;
<pad id="pad">
- <ui:box id="content" />
+ <ui:box id="output" />
</pad>
</spin>
</pad>
// glue code
- rdrt..addRedirect(thisbox, $content, "orient", "layout", "font",
"fontsize", "text", "textcolor");
+ rdrt..addRedirect(thisbox, $output, "orient", "layout", "font",
"fontsize", "text", "textcolor");
rdrt..addRedirect(thisbox, $margin, "margin", "marginleft",
"marginright", "margintop", "marginbottom");
rdrt..addRedirect(thisbox, $pad, "fill", "padding", "paddingleft",
"paddingright", "paddingtop", "paddingbottom");
rdrt..addRedirect(thisbox, $widget, "enabled", "focusable", "focused",
"interval", "max", "min", "value", "KeyPressed", "KeyReleased");
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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn