1 <!-- Copyleft 2004 see COPYING for details [LGPL] -->
5 Author: Charles Goodwin
8 - ? differentiate between pt and px
9 - ? proper child and property redirection
12 <ui:box redirect="$content">
15 thisbox["padding-top"] = 0;
16 thisbox["padding-right"] = 0;
17 thisbox["padding-bottom"] = 0;
18 thisbox["padding-left"] = 0;
20 padding ++= function(v) {
24 thisbox["padding-top"] = v;
25 thisbox["padding-right"] = v;
26 thisbox["padding-bottom"] = v;
27 thisbox["padding-left"] = v;
29 else if (p.length == 2) {
30 thisbox["padding-top"] = p[0];
31 thisbox["padding-right"] = p[1];
32 thisbox["padding-bottom"] = p[0];
33 thisbox["padding-left"] = p[1];
35 else if (p.length == 4) {
36 thisbox["padding-top"] = p[0];
37 thisbox["padding-right"] = p[1];
38 thisbox["padding-bottom"] = p[2];
39 thisbox["padding-left"] = p[3];
41 else ibex.log.warn("Invalid number of values for padding: " + p.length);
44 thisbox["padding-top"] ++= function(v) { $top.height = v; }
45 thisbox["padding-right"] ++= function(v) { $right.width = v; }
46 thisbox["padding-bottom"] ++= function(v) { $bottom.height = v; }
47 thisbox["padding-left"] ++= function(v) { $left.width = v; }
49 <ui:box id="left" width="0" />
51 <ui:box id="top" height="0" />
52 <ui:box id="content" />
53 <ui:box id="bottom" height="0" />
55 <ui:box id="right" width="0" />