initial checkin
[org.ibex.widgets.git] / src / ibex / widget / check.t
1 <!-- Copyleft 2004 - see COPYING for details [LGPL] -->
2
3 <ibex xmlns="org.ibex.theme.win2k">
4     <meta:doc>
5         <name>Check Box</name>
6         <desc>Creates a check box widget</desc>
7         <usage>
8             Put to the text property of a check for a basic label,
9             or simply wrap the check around more complex content
10         </usage>
11     </meta:doc>
12
13     <redirect />
14     <margin redirect="$content" shrink="true">
15         <check id="widget">
16             .clickable(thisbox);
17             .focusable(thisbox);
18             <pad id="pad">
19                 <ui:box id="content" />
20             </pad>
21         </check>
22
23         // glue code
24
25         redirectTo($content, "text", "textcolor");
26         redirectTo($pad, "padding", "padding-left", "padding-right", "padding-top", "padding-bottom");
27         redirectTo($widget, "enabled", "fill", "group", "selected");
28
29         if ($widget.margin) thisbox.margin = $widget.margin;
30         if ($widget.padding) $pad.padding = $widget.padding;
31
32         $widget.textcolor ++= function(v) { $content.textcolor = v; }
33
34     </margin>
35 </ibex>