Revision: 1885
http://svn.sourceforge.net/vexi/?rev=1885&view=rev
Author: clrg
Date: 2007-06-27 11:38:55 -0700 (Wed, 27 Jun 2007)
Log Message:
-----------
More new layout related fixes
- nicer implementation of focusborder
- tweaked radio layout to match check
- use surface._Release1 in clickable
- throw exceptions by default on redirect collisions
Modified Paths:
--------------
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/role/clickable.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/role/popupmanager.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/toolbar.t
widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/focusborder.t
widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/radio.t
widgets/trunk/org.vexi.widgets/src/vexi/util/redirect.t
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/role/clickable.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/role/clickable.t
2007-06-27 18:37:07 UTC (rev 1884)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/role/clickable.t
2007-06-27 18:38:55 UTC (rev 1885)
@@ -81,7 +81,7 @@
// deprime widget
primed = false;
// clean up trap
- trapee.Release1 --= callee;
+ trapee._Release1 --= callee;
}
}
@@ -204,7 +204,7 @@
trapee.primed = true;
// apply surface trap
if (trapee.surface)
- trapee.surface.Release1 ++= trapee.surfaceReleaseFunc;
+ trapee.surface._Release1 ++= trapee.surfaceReleaseFunc;
}
cascade = v;
}
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/role/popupmanager.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/role/popupmanager.t
2007-06-27 18:37:07 UTC (rev 1884)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/role/popupmanager.t
2007-06-27 18:38:55 UTC (rev 1885)
@@ -10,9 +10,6 @@
<ui:box id="content" />
</ui:box>
- // redirect cols and rows to $content
- vexi..vexi.util.redirect..addRedirect(thisbox, $content, "layout",
"orient");
-
var interval = 50; // sleep interval for pop thread
var popgroups = {}; // track pop groups
var popforegs = {}; // popgroup foregrounds
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/toolbar.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/toolbar.t
2007-06-27 18:37:07 UTC (rev 1884)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/toolbar.t
2007-06-27 18:38:55 UTC (rev 1885)
@@ -12,9 +12,10 @@
th_content ++= function(v)
{
- v.ChildAdded ++= function(c)
+ v.Children ++= function(c)
{
- if (group) c.group = group;
+ if (c == null) th_content[arguments.index].group = null;
+ else if (group) c.group = group;
else group = c.group;
}
}
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-06-27 18:37:07 UTC (rev 1884)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/focusborder.t
2007-06-27 18:38:55 UTC (rev 1885)
@@ -5,29 +5,26 @@
<author>Charles Goodwin</author>
</meta:doc>
- <ui:box redirect="$content" layout="absolute">
- <ui:box id="content" shrink="true" />
- <ui:box id="focus" display="false">
- <ui:box id="w" fill=".image.dash_v" hshrink="true" />
- <ui:box orient="vertical">
- <ui:box id="n" fill=".image.dash_h" vshrink="true" />
- <ui:box />
- <ui:box id="s" fill=".image.dash_h" vshrink="true" />
- </ui:box>
- <ui:box id="e" fill=".image.dash_v" hshrink="true" />
+ <ui:box redirect="$content">
+ <ui:box hshrink="true" width="1"><ui:box id="w" fill=".image.dash_v"
display="false" hshrink="true" /></ui:box>
+ <ui:box orient="vertical">
+ <ui:box vshrink="true" height="1"><ui:box id="n"
fill=".image.dash_h" display="false" vshrink="true" /></ui:box>
+ <ui:box id="content" />
+ <ui:box vshrink="true" height="1"><ui:box id="s"
fill=".image.dash_h" display="false" vshrink="true" /></ui:box>
</ui:box>
+ <ui:box hshrink="true" width="1"><ui:box id="e" fill=".image.dash_v"
display="false" hshrink="true" /></ui:box>
thisbox.showfocus = false;
thisbox.showfocus ++= function(v)
{
cascade = v;
- $focus.display = v;
+ $n.display = v;
+ $e.display = v;
+ $s.display = v;
+ $w.display = v;
}
- $content.width ++= function(v) { minwidth = v; cascade = v; }
- $content.height ++= function(v) { minheight = v; cascade = v; }
-
</ui:box>
/** reusable function covering common usage */
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/radio.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/radio.t
2007-06-27 18:37:07 UTC (rev 1884)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/radio.t
2007-06-27 18:38:55 UTC (rev 1885)
@@ -4,7 +4,8 @@
<lib:radio />
<ui:box redirect="$content" padding="0 5">
<focusborder id="focus">
- <ui:box id="bg" align="center" layout="absolute" shrink="true">
+ <ui:box width="14" height="14" layout="absolute" shrink="true">
+ <ui:box id="bg" align="center" shrink="true" />
<ui:box id="radio" align="center" fill=".image.radio"
shrink="true" display="false" />
</ui:box>
<ui:box id="content" />
Modified: widgets/trunk/org.vexi.widgets/src/vexi/util/redirect.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/vexi/util/redirect.t 2007-06-27
18:37:07 UTC (rev 1884)
+++ widgets/trunk/org.vexi.widgets/src/vexi/util/redirect.t 2007-06-27
18:38:55 UTC (rev 1885)
@@ -5,6 +5,9 @@
<author>Charles Goodwin</author>
</meta:doc>
+ // whether to throw exceptions or handle collisions
+ static.collisionsThrowExceptions = true;
+
/** write function for the main box of a full redirect */
var mainWriteFunc = function(v)
{
@@ -45,10 +48,9 @@
// create box reference from b1 to b2
if (b1.redirect_to and b1.redirect_to[p])
{
- // do not warn about cols/rows
- if (p != "cols" and p != "rows")
- vexi.log.warn("Redirected property '"+p+"' more than once from
a particular box");
- static.drop(b1, p);
+ if (!collisionsThrowExceptions) static.drop(b1, p);
+ else throw "Redirected property '"+p+"' more than once from a
particular box";
+
}
if (!b1.redirect_to) b1.redirect_to = {};
b1.redirect_to[p] = b2;
@@ -59,8 +61,8 @@
// create box reference from b2 to b1
if (b2.redirect_from and b2.redirect_from[p])
{
- vexi.log.warn("Redirected property '"+p+"' to same destination box
more than once");
- static.drop(b2.redirect_from[p], p);
+ if (!static.collisionsThrowExceptions)
static.drop(b2.redirect_from[p], p);
+ else throw "Redirected property '"+p+"' to same destination box
more than once";
}
if (!b2.redirect_from) b2.redirect_from = {};
b2.redirect_from[p] = b1;
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