1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
use rdxl::{xtype,xrender};
xtype!(
<!InputButton name:String/>
);
xtype!(
<!InputButtonGroup><?InputButton/></InputButtonGroup>
);
xtype!(
<!InputCheckbox name:String/>
);
xtype!(
<!InputColor name:String/>
);
xtype!(
<!InputDate name:String/>
);
xtype!(
<!InputDatetime name:String/>
);
xtype!(
<!InputEmail name:String/>
);
xtype!(
<!InputFile name:String/>
);
xtype!(
<!InputImage name:String/>
);
xtype!(
<!InputMonth name:String/>
);
xtype!(
<!InputNumber name:String/>
);
xtype!(
<!InputPassword name:String/>
);
xtype!(
<!InputRadio name:String><!InputRadioOption value:String/></InputRadio>
);
xtype!(
<!InputRange name:String min:u64 max:u64/>
);
xtype!(
<!InputSearch name:String/>
);
xtype!(
<!InputSubmit/>
);
xtype!(
<!InputTelephoneNumber name:String/>
);
xtype!(
<!InputText name:String/>
);
xtype!(
<!InputTime name:String/>
);
xtype!(
<!InputUrl name:String/>
);
xtype!(
<!InputWeek name:String/>
);
xrender!(InputButton, <input type="button" name={{ format!("'{}'",self.name) }} value={{ format!("'{}'",self.name) }}/>);
xrender!(InputCheckbox, <input type="checkbox" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputButtonGroup, <span style="background-color:#CCCCCC;">
{{ for bc in self.children.iter() {{
{{ let InputButtonGroupChildren::InputButton(b) = bc; }}
{{ b }}
}} }}
</span>);
xrender!(InputRadio, <span style="background-color:#CCCCCC;">
{{ for rc in self.children.iter() {{
{{ let InputRadioChildren::InputRadioOption(r) = rc; }}
<input type="radio" name={{ format!(r#""{}""#, self.name) }} value={{ format!(r#""{}""#, r.value) }}/>
}} }}
</span>);
xrender!(InputText, <input type="text" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputEmail, <input type="email" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputSearch, <input type="search" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputPassword, <input type="password" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputNumber, <input type="number" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputTelephoneNumber, <input type="tel" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputUrl, <input type="url" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputRange, <input type="range" name={{ format!("'{}'",self.name) }} min={{self.min}} max={{self.max}}/>);
xrender!(InputColor, <input type="color" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputDate, <input type="date" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputDatetime, <input type="datetime-local" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputMonth, <input type="month" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputWeek, <input type="week" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputTime, <input type="time" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputFile, <input type="file" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputImage, <input type="image" name={{ format!("'{}'",self.name) }}/>);
xrender!(InputSubmit, <input type="submit"/>);