initial checkin
[org.ibex.widgets.git] / src / org / ibex / theme / win2k / tabpane.t
1 <!-- Copyleft 2004 - see COPYING for details [LGPL] -->
2
3 <ibex xmlns="org.ibex.theme.win2k" xmlns:lib="ibex.lib">
4     <meta:doc>
5         Author: Charles Goodwin
6     </meta:doc>
7
8     <lib:tabpane />
9     <ui:box redirect="$content" margin="10" padding="10">
10
11         th_head = $header;
12
13         var syncshadow = function(v) {
14                 if (typeof(v) != "object" and th_content.show) v = th_content.show.tab;
15                 $shadow.width = v.width - 3;
16                 $shadow.x = v.x + 1;
17                 $shadow.y = $header.height;
18         }
19
20         th_content ++= function(v) {
21             v.show ++= function(c) {
22                 if (c and c.tab) {
23                     //if (v.show) v.show.tab.SizeChange --= syncshadow;
24                     if (cascade) cascade.tab.SizeChange --= syncshadow;
25                     c.tab.SizeChange ++= syncshadow;
26                     syncshadow(c.tab);
27                 }
28             }
29         }
30
31         <ui:box id="body" cols="1">
32             <ui:box align="topleft" id="header" height="27" shrink="true" />
33             <bevel form="up" thickness="2">
34                 <ui:box id="content" />
35             </bevel>
36             <ui:box id="shadow" align="topleft" height="2" packed="false" fill="#d4d0c8" />
37         </ui:box>
38     </ui:box>
39 </ibex>