initial checkin
[org.ibex.widgets.git] / src / org / ibex / theme / win2k / radio.t
1 <!-- Copyleft 2004 - see COPYING for details [LGPL] -->
2
3 <ibex xmlns="org.ibex.theme.win2k">
4     <ui:box redirect="$content" align="center" padding="0 5">
5
6         var fill1 = .image.radiobg;
7         var fill2 = .image.radiobg_active;
8
9         active ++= function(v) { if ($bg.fill != fill2) $bg.fill = fill2; }
10
11         enabled ++= function(v) {
12             $bg.fill = v ? fill1 : fill2;
13             textcolor = v ? "#000000" : "#888888";
14         }
15
16         focused ++= function(v) { cascade = v; fill = focused ? "#aaa" : null; }
17
18         var normal_fun = function(v) { if ($bg.fill != fill1) $bg.fill = fill1; }
19         hover ++= normal_fun;
20         normal ++= normal_fun;
21
22         mixed ++= function(v) { $radio.fill = v ? .image.radio_mixed : .image.radio; }
23
24         selected ++= function(v) { cascade = v; $radio.visible = selected; }
25
26         <ui:box id="bg" shrink="true">
27             <ui:box id="radio" fill=".image.radio" shrink="true" visible="false" />
28         </ui:box>
29         <ui:box id="content" />
30
31     </ui:box>
32 </ibex>