1 module uim.html.mixins; 2 3 import uim.html; 4 5 template H5Calls(const char[] left, const char[] right = "") { 6 const char[] r = (right.length > 0 ? right : "D"~left); 7 const char[] H5Calls = " 8 auto "~left~"(string content) { return new "~r~"(content); } 9 auto "~left~"(DH5Obj[] content...) { return new "~r~"(content); } 10 auto "~left~"(DH5Obj[] content) { return new "~r~"(content); } 11 auto "~left~"(DH5 content) { return new "~r~"(content); } 12 13 auto "~left~"(string id, string content) { return new "~r~"(id, content); } 14 auto "~left~"(string id, DH5Obj[] content...) { return new "~r~"(id, content); } 15 auto "~left~"(string id, DH5Obj[] content) { return new "~r~"(id, content); } 16 auto "~left~"(string id, DH5 content) { return new "~r~"(id, content); } 17 18 auto "~left~"(string id, string[] classes) { return new "~r~"(id, classes); } 19 auto "~left~"(string id, string[] classes, string content) { return new "~r~"(id, classes, content); } 20 auto "~left~"(string id, string[] classes, DH5Obj[] content...) { return new "~r~"(id, classes, content); } 21 auto "~left~"(string id, string[] classes, DH5Obj[] content) { return new "~r~"(id, classes, content); } 22 auto "~left~"(string id, string[] classes, DH5 content) { return new "~r~"(id, classes, content); } 23 24 auto "~left~"(string id, string[string] attributes) { return new "~r~"(id, attributes); } 25 auto "~left~"(string id, string[string] attributes, string content) { return new "~r~"(id, attributes, content); } 26 auto "~left~"(string id, string[string] attributes, DH5Obj[] content...) { return new "~r~"(id, attributes, content); } 27 auto "~left~"(string id, string[string] attributes, DH5Obj[] content) { return new "~r~"(id, attributes, content); } 28 auto "~left~"(string id, string[string] attributes, DH5 content) { return new "~r~"(id, attributes, content); } 29 30 auto "~left~"(string id, string[] classes, string[string] attributes) { return new "~r~"(id, classes, attributes); } 31 auto "~left~"(string id, string[] classes, string[string] attributes, string content) { return new "~r~"(id, classes, attributes, content); } 32 auto "~left~"(string id, string[] classes, string[string] attributes, DH5Obj[] content...) { return new "~r~"(id, classes, attributes, content); } 33 auto "~left~"(string id, string[] classes, string[string] attributes, DH5Obj[] content) { return new "~r~"(id, classes, attributes, content); } 34 auto "~left~"(string id, string[] classes, string[string] attributes, DH5 content) { return new "~r~"(id, classes, attributes, content); } 35 36 auto "~left~"(string[] classes) { return new "~r~"(classes); } 37 auto "~left~"(string[] classes, string content) { return new "~r~"(classes, content); } 38 auto "~left~"(string[] classes, DH5Obj[] content...) { return new "~r~"(classes, content); } 39 auto "~left~"(string[] classes, DH5Obj[] content) { return new "~r~"(classes, content); } 40 auto "~left~"(string[] classes, DH5 content) { return new "~r~"(classes, content); } 41 42 auto "~left~"(string[string] attributes) { return new "~r~"(attributes); } 43 auto "~left~"(string[string] attributes, string content) { return new "~r~"(attributes, content); } 44 auto "~left~"(string[string] attributes, DH5Obj[] content...) { return new "~r~"(attributes, content); } 45 auto "~left~"(string[string] attributes, DH5Obj[] content) { return new "~r~"(attributes, content); } 46 auto "~left~"(string[string] attributes, DH5 content) { return new "~r~"(attributes, content); } 47 48 auto "~left~"(string[] classes, string[string] attributes) { return new "~r~"(classes, attributes); } 49 auto "~left~"(string[] classes, string[string] attributes, string content) { return new "~r~"(classes, attributes, content); } 50 auto "~left~"(string[] classes, string[string] attributes, DH5Obj[] content...) { return new "~r~"(classes, attributes, content); } 51 auto "~left~"(string[] classes, string[string] attributes, DH5Obj[] content) { return new "~r~"(classes, attributes, content); } 52 auto "~left~"(string[] classes, string[string] attributes, DH5 content) { return new "~r~"(classes, attributes, content); }"; 53 } 54 55 auto h5Methods(const char[] left, const char[] right) { 56 return " 57 "~left~"(string content) { "~right~"(content); } 58 "~left~"(DH5Obj[] content...) { "~right~"(content); } 59 "~left~"(DH5Obj[] content) { "~right~"(content); } 60 "~left~"(DH5 content) { "~right~"(content); } 61 62 "~left~"(string id, string content) { "~right~"(id, content); } 63 "~left~"(string id, DH5Obj[] content...) { "~right~"(id, content); } 64 "~left~"(string id, DH5Obj[] content) { "~right~"(id, content); } 65 "~left~"(string id, DH5 content) { "~right~"(id, content); } 66 67 "~left~"(string id, string[] classes) { "~right~"(id, classes); } 68 "~left~"(string id, string[] classes, string content) { "~right~"(id, classes, content); } 69 "~left~"(string id, string[] classes, DH5Obj[] content...) { "~right~"(id, classes, content); } 70 "~left~"(string id, string[] classes, DH5Obj[] content) { "~right~"(id, classes, content); } 71 "~left~"(string id, string[] classes, DH5 content) { "~right~"(id, classes, content); } 72 73 "~left~"(string id, string[string] attributes) { "~right~"(id, attributes); } 74 "~left~"(string id, string[string] attributes, string content) { "~right~"(id, attributes, content); } 75 "~left~"(string id, string[string] attributes, DH5Obj[] content...) { "~right~"(id, attributes, content); } 76 "~left~"(string id, string[string] attributes, DH5Obj[] content) { "~right~"(id, attributes, content); } 77 "~left~"(string id, string[string] attributes, DH5 content) { "~right~"(id, attributes, content); } 78 79 "~left~"(string id, string[] classes, string[string] attributes) { "~right~"(id, classes, attributes); } 80 "~left~"(string id, string[] classes, string[string] attributes, string content) { "~right~"(id, classes, attributes, content); } 81 "~left~"(string id, string[] classes, string[string] attributes, DH5Obj[] content...) { "~right~"(id, classes, attributes, content); } 82 "~left~"(string id, string[] classes, string[string] attributes, DH5Obj[] content) { "~right~"(id, classes, attributes, content); } 83 "~left~"(string id, string[] classes, string[string] attributes, DH5 content) { "~right~"(id, classes, attributes, content); } 84 85 "~left~"(string[] classes) { "~right~"(classes); } 86 "~left~"(string[] classes, string content) { "~right~"(classes, content); } 87 "~left~"(string[] classes, DH5Obj[] content...) { "~right~"(classes, content); } 88 "~left~"(string[] classes, DH5Obj[] content) { "~right~"(classes, content); } 89 "~left~"(string[] classes, DH5 content) { "~right~"(classes, content); } 90 91 "~left~"(string[string] attributes) { "~right~"(attributes); } 92 "~left~"(string[string] attributes, string content) { "~right~"(attributes, content); } 93 "~left~"(string[string] attributes, DH5Obj[] content...) { "~right~"(attributes, content); } 94 "~left~"(string[string] attributes, DH5Obj[] content) { "~right~"(attributes, content); } 95 "~left~"(string[string] attributes, DH5 content) { "~right~"(attributes, content); } 96 97 "~left~"(string[] classes, string[string] attributes) { "~right~"(classes, attributes); } 98 "~left~"(string[] classes, string[string] attributes, string content) { "~right~"(classes, attributes, content); } 99 "~left~"(string[] classes, string[string] attributes, DH5Obj[] content...) { "~right~"(classes, attributes, content); } 100 "~left~"(string[] classes, string[string] attributes, DH5Obj[] content) { "~right~"(classes, attributes, content); } 101 "~left~"(string[] classes, string[string] attributes, DH5 content) { "~right~"(classes, attributes, content); }"; 102 } 103 104 template H5This(string tag, string[] classes = null, string attributes = null, bool single = false) { 105 const char[] strTag = (tag.length > 0) ? `this.tag("`~tag.toLower~`");` : ""; 106 const char[] strSingle = (single) ? "this.single(true);" : ""; 107 const char[] strClasses = (classes) ? "this.classes(["~classes.map!(a => `"`~a~`"`).join(",")~"]);" : ""; 108 const char[] strAttributes = (attributes) ? "this.attributes("~attributes~");" : ""; 109 const char[] initial = strTag~strSingle~strClasses~strAttributes; 110 111 const char[] H5This = ` 112 this() { super(); `~initial~` } 113 114 this(string someContent) { super(); `~initial~`this.content(someContent); } 115 this(DH5Obj[] someContent...) { super(); `~initial~`this.content(someContent); } 116 this(DH5 someContent) { super(); `~initial~`this.content(someContent); } 117 118 this(string id, string someContent) { super(); `~initial~`this.id(id).content(someContent); } 119 this(string id, DH5Obj[] someContent...) { super(); `~initial~`this.id(id).content(someContent); } 120 this(string id, DH5Obj[] someContent) { super(); `~initial~`this.id(id).content(someContent); } 121 this(string id, DH5 someContent) { super(); `~initial~`this.id(id).content(someContent); } 122 123 this(string id, string[] someClasses) { super(); `~initial~`this.id(id).classes(someClasses); } 124 this(string id, string[] someClasses, string someContent) { super(); `~initial~`this.id(id).classes(someClasses).content(someContent); } 125 this(string id, string[] someClasses, DH5Obj[] someContent...) { super(); `~initial~`this.id(id).classes(someClasses).content(someContent); } 126 this(string id, string[] someClasses, DH5Obj[] someContent) { super(); `~initial~`this.id(id).classes(someClasses).content(someContent); } 127 this(string id, string[] someClasses, DH5 someContent) { super(); `~initial~`this.id(id).classes(someClasses).content(someContent); } 128 129 this(string id, string[string] someAttributes) { super(); `~initial~`this.id(id).attributes(someAttributes); } 130 this(string id, string[string] someAttributes, string someContent) { super(); `~initial~`this.id(id).attributes(someAttributes).content(someContent); } 131 this(string id, string[string] someAttributes, DH5Obj[] someContent...) { super(); `~initial~`this.id(id).attributes(someAttributes).content(someContent); } 132 this(string id, string[string] someAttributes, DH5Obj[] someContent) { super(); `~initial~`this.id(id).attributes(someAttributes).content(someContent); } 133 this(string id, string[string] someAttributes, DH5 someContent) { super(); `~initial~`this.id(id).attributes(someAttributes).content(someContent); } 134 135 this(string id, string[] someClasses, string[string] someAttributes) { super(); `~initial~`this.id(id).classes(someClasses).attributes(someAttributes); } 136 this(string id, string[] someClasses, string[string] someAttributes, string someContent) { super(); `~initial~`this.id(id).classes(someClasses).attributes(someAttributes).content(someContent); } 137 this(string id, string[] someClasses, string[string] someAttributes, DH5Obj[] someContent...) { super(); `~initial~`this.id(id).classes(someClasses).attributes(someAttributes).content(someContent); } 138 this(string id, string[] someClasses, string[string] someAttributes, DH5Obj[] someContent) { super(); `~initial~`this.id(id).classes(someClasses).attributes(someAttributes).content(someContent); } 139 this(string id, string[] someClasses, string[string] someAttributes, DH5 someContent) { super(); `~initial~`this.id(id).classes(someClasses).attributes(someAttributes).content(someContent); } 140 141 this(string[] someClasses) { super(); `~initial~`this.classes(someClasses); } 142 this(string[] someClasses, string someContent) { super(); `~initial~`this.classes(someClasses).content(someContent); } 143 this(string[] someClasses, DH5Obj[] someContent...) { super(); `~initial~`this.classes(someClasses).content(someContent); } 144 this(string[] someClasses, DH5Obj[] someContent) { super(); `~initial~`this.classes(someClasses).content(someContent); } 145 this(string[] someClasses, DH5 someContent) { super(); `~initial~`this.classes(someClasses).content(someContent); } 146 147 this(string[string] someAttributes) { super();`~initial~`this.attributes(someAttributes); } 148 this(string[string] someAttributes, string someContent) { super(); `~initial~`this.attributes(someAttributes).content(someContent); } 149 this(string[string] someAttributes, DH5Obj[] someContent...) { super(); `~initial~`this.attributes(someAttributes).content(someContent); } 150 this(string[string] someAttributes, DH5Obj[] someContent) { super(); `~initial~`this.attributes(someAttributes).content(someContent); } 151 this(string[string] someAttributes, DH5 someContent) { super(); `~initial~`this.attributes(someAttributes).content(someContent); } 152 153 this(string[] someClasses, string[string] someAttributes) { super(); `~initial~`this.classes(someClasses).attributes(someAttributes); } 154 this(string[] someClasses, string[string] someAttributes, string someContent) { super(); `~initial~`this.classes(someClasses).attributes(someAttributes).content(someContent); } 155 this(string[] someClasses, string[string] someAttributes, DH5Obj[] someContent...) { super(); `~initial~`this.classes(someClasses).attributes(someAttributes).content(someContent); } 156 this(string[] someClasses, string[string] someAttributes, DH5Obj[] someContent) { super(); `~initial~`this.classes(someClasses).attributes(someAttributes).content(someContent); } 157 this(string[] someClasses, string[string] someAttributes, DH5 someContent) { super(); `~initial~`this.classes(someClasses).attributes(someAttributes).content(someContent); } 158 `; 159 } 160 161 template H5Short(string name) { const char[] H5Short = h5Methods("auto H5"~name, "return new DH5"~name); } 162 163 template MyClassAttribute(string name, string clname = null) { 164 const char[] cl = (clname) ? clname : name; 165 const char[] MyClassAttribute = " 166 @property O "~name~"(this O)(bool value = true) { if (value) _classes = _classes.add(\""~cl~"\"); else _classes = _classes.sub(\""~cl~"\"); return cast(O)this; } 167 "; 168 } 169 170 template ClassBoolean(string name, string clname = null) { 171 const char[] cl = (clname.length > 0) ? clname : name; 172 const char[] ClassBoolean = " 173 bool _"~name~"; 174 @safe @property auto is"~name.capitalize~"() { return _"~name~"; } 175 @safe @property O "~name~"(this O)(bool value = true) { _"~name~" = value; if (value) _classes = _classes.add(\""~cl~"\"); else _classes = _classes.sub(\""~cl~"\", true); return cast(O)this; } 176 "; 177 } 178 179 template ClassString(string name) { 180 const char[] ClassString = " 181 string _"~name~"; 182 @safe @property auto "~name~"() { return _"~name~"; } 183 @safe @property O "~name~"(this O)(string value) { _"~name~" = value; _classes = _classes.add(value); return cast(O)this; } 184 @safe O remove"~name.capitalize~"(this O)(string value = _"~name~") { _classes = _classes.sub(_"~name~"); return cast(O)this; } 185 "; 186 } 187 188 template ClassArray(string name) { 189 const char[] ClassArray = " 190 string[] _"~name~"; 191 @safe @property auto "~name~"() { return _"~name~"; } 192 @safe @property O "~name~"(this O)(string[] values...) { _"~name~" ~= values; foreach(cl; values) _classes = _classes.add(cl); return cast(O)this; } 193 @safe @property O "~name~"(this O)(string[] values) { _"~name~" ~= values; foreach(cl; values) _classes = _classes.add(cl); return cast(O)this; } 194 @safe O remove"~name.capitalize~"(this O)(string[] values...) { foreach(cl; values) { _classes = _classes.sub(cl); _"~name~".sub(cl); } return cast(O)this; } 195 @safe O remove"~name.capitalize~"(this O)(string[] values) { foreach(cl; values) { _classes = _classes.sub(cl); _"~name~".sub(cl); } return cast(O)this; } 196 "; 197 } 198 199 template MyAttribute(string name, string h5name = null) { 200 const char[] h5 = (h5name) ? h5name : name; 201 const char[] MyAttribute = " 202 @safe @property string "~name~"() { return _attributes[\""~h5~"\"]; } 203 @safe @property O "~name~"(this O)(string value) { if (value.length > 0) _attributes[\""~h5~"\"] = value; return cast(O)this; } 204 @safe @property O "~name~"(this O)(bool value) { if (value) _attributes[\""~h5~"\"] = \"true\"; return cast(O)this; } 205 @safe @property O "~name~"(this O)(int value) { if (value) _attributes[\""~h5~"\"] = to!string(value); return cast(O)this; } 206 @safe @property O "~name~"(this O)(double value) { if (value) _attributes[\""~h5~"\"] = to!string(value); return cast(O)this; } 207 "; 208 } 209 210 template AttributeBoolean(string name, string clname = null) { 211 const char[] cl = (clname) ? clname : name; 212 const char[] AttributeBoolean = ` 213 @safe @property auto is`~name.capitalize~`( { return ("`~cl~`" in _attributes); } 214 @safe @property O `~name~`(this O)(bool value = true) { if (value) _attributes["`~cl~`"]= "`~cl~`"; else _attributes.remove("`~cl~`"); return cast(O)this; } 215 `; 216 } 217 218 template AttributeString(string name) { 219 const char[] AttributeString = ` 220 @safe @property auto `~name~`() { return ("`~name~`" in _attributes ? _attributes["`~name~`"] : null); } 221 @safe @property O `~name~`(this O)(string value) { if (value) _attributes["`~name~`"] = value; else _attributes.remove("`~name~`"); return cast(O)this; } 222 `; 223 } 224 225 auto h5Content(const char[] name, const char[] middle, const char[] right) { 226 return " 227 O "~name~"(this O)() { "~middle~"("~right~"()); return cast(O)this; } 228 229 O "~name~"(this O)(string content) { "~middle~"("~right~"(content)); return cast(O)this; } 230 O "~name~"(this O)(DH5Obj[] content...) { "~middle~"("~right~"(content)); return cast(O)this; } 231 O "~name~"(this O)(DH5Obj[] content) { "~middle~"("~right~"(content)); return cast(O)this; } 232 O "~name~"(this O)(DH5 content) { "~middle~"("~right~"(content)); return cast(O)this; } 233 234 O "~name~"(this O)(string id, string content) { "~middle~"("~right~"(id, content)); return cast(O)this; } 235 O "~name~"(this O)(string id, DH5Obj[] content...) { "~middle~"("~right~"(id, content)); return cast(O)this; } 236 O "~name~"(this O)(string id, DH5Obj[] content) { "~middle~"("~right~"(id, content)); return cast(O)this; } 237 O "~name~"(this O)(string id, DH5 content) { "~middle~"("~right~"(id, content)); return cast(O)this; } 238 239 O "~name~"(this O)(string id, string[] classes) { "~middle~"("~right~"(id, classes)); return cast(O)this; } 240 O "~name~"(this O)(string id, string[] classes, string content) { "~middle~"("~right~"(id, classes, content)); return cast(O)this; } 241 O "~name~"(this O)(string id, string[] classes, DH5Obj[] content...) { "~middle~"("~right~"(id, classes, content)); return cast(O)this; } 242 O "~name~"(this O)(string id, string[] classes, DH5Obj[] content) { "~middle~"("~right~"(id, classes, content)); return cast(O)this; } 243 O "~name~"(this O)(string id, string[] classes, DH5 content) { "~middle~"("~right~"(id, classes, content)); return cast(O)this; } 244 245 O "~name~"(this O)(string id, string[string] attributes) { "~middle~"("~right~"(id, attributes)); return cast(O)this; } 246 O "~name~"(this O)(string id, string[string] attributes, string content) { "~middle~"("~right~"(id, attributes, content)); return cast(O)this; } 247 O "~name~"(this O)(string id, string[string] attributes, DH5Obj[] content...) { "~middle~"("~right~"(id, attributes, content)); return cast(O)this; } 248 O "~name~"(this O)(string id, string[string] attributes, DH5Obj[] content) { "~middle~"("~right~"(id, attributes, content)); return cast(O)this; } 249 O "~name~"(this O)(string id, string[string] attributes, DH5 content) { "~middle~"("~right~"(id, attributes, content)); return cast(O)this; } 250 251 O "~name~"(this O)(string id, string[] classes, string[string] attributes) { "~middle~"("~right~"(id, classes, attributes)); return cast(O)this; } 252 O "~name~"(this O)(string id, string[] classes, string[string] attributes, string content) { "~middle~"("~right~"(id, classes, attributes, content)); return cast(O)this; } 253 O "~name~"(this O)(string id, string[] classes, string[string] attributes, DH5Obj[] content...) { "~middle~"("~right~"(id, classes, attributes, content)); return cast(O)this; } 254 O "~name~"(this O)(string id, string[] classes, string[string] attributes, DH5Obj[] content) { "~middle~"("~right~"(id, classes, attributes, content)); return cast(O)this; } 255 O "~name~"(this O)(string id, string[] classes, string[string] attributes, DH5 content) { "~middle~"("~right~"(id, classes, attributes, content)); return cast(O)this; } 256 257 O "~name~"(this O)(string[] classes) { "~middle~"("~right~"(classes)); return cast(O)this; } 258 O "~name~"(this O)(string[] classes, string content) { "~middle~"("~right~"(classes, content)); return cast(O)this; } 259 O "~name~"(this O)(string[] classes, DH5Obj[] content...) { "~middle~"("~right~"(classes, content)); return cast(O)this; } 260 O "~name~"(this O)(string[] classes, DH5Obj[] content) { "~middle~"("~right~"(classes, content)); return cast(O)this; } 261 O "~name~"(this O)(string[] classes, DH5 content) { "~middle~"("~right~"(classes, content)); return cast(O)this; } 262 263 O "~name~"(this O)(string[string] attributes) { "~middle~"("~right~"(attributes)); return cast(O)this; } 264 O "~name~"(this O)(string[string] attributes, string content) { "~middle~"("~right~"(attributes, content)); return cast(O)this; } 265 O "~name~"(this O)(string[string] attributes, DH5Obj[] content...) { "~middle~"("~right~"(attributes, content)); return cast(O)this; } 266 O "~name~"(this O)(string[string] attributes, DH5Obj[] content) { "~middle~"("~right~"(attributes, content)); return cast(O)this; } 267 O "~name~"(this O)(string[string] attributes, DH5 content) { "~middle~"("~right~"(attributes, content)); return cast(O)this; } 268 269 O "~name~"(this O)(string[] classes, string[string] attributes) { "~middle~"("~right~"(classes, attributes)); return cast(O)this; } 270 O "~name~"(this O)(string[] classes, string[string] attributes, string content) { "~middle~"("~right~"(classes, attributes, content)); return cast(O)this; } 271 O "~name~"(this O)(string[] classes, string[string] attributes, DH5Obj[] content...) { "~middle~"("~right~"(classes, attributes, content)); return cast(O)this; } 272 O "~name~"(this O)(string[] classes, string[string] attributes, DH5Obj[] content) { "~middle~"("~right~"(classes, attributes, content)); return cast(O)this; } 273 O "~name~"(this O)(string[] classes, string[string] attributes, DH5 content) { "~middle~"("~right~"(classes, attributes, content)); return cast(O)this; } 274 "; 275 } 276 277 template MyContent(string name, string className) { 278 const char[] MyContent = h5Content(name, "this.content", className); } 279 template MyContent(string name, string middle, string className) { 280 const char[] MyContent = h5Content(name, middle, className); } 281 282 template MyH5Obj(string className, string name) { 283 const char[] MyH5Obj = " 284 "~className~" _"~name~"; 285 "~className~" "~name~"() { return _"~name~"; } 286 287 O "~name~"(this O)("~className~" obj) { _"~name~" = obj; return cast(O)this; } 288 289 O "~name~"(this O)(DH5Obj[] content...) { _"~name~" = new "~className~"(content); return cast(O)this; } 290 O "~name~"(this O)(DH5Obj[] content) { _"~name~" = new "~className~"(content); return cast(O)this; } 291 O "~name~"(this O)(DH5 content) { _"~name~" = new "~className~"(content); return cast(O)this; } 292 293 O "~name~"(this O)(string id) { _"~name~" = new "~className~"(id); return cast(O)this; } 294 O "~name~"(this O)(string id, string content) { _"~name~" = new "~className~"(id, content); return cast(O)this; } 295 O "~name~"(this O)(string id, DH5Obj[] content...) { _"~name~" = new "~className~"(id, content); return cast(O)this; } 296 O "~name~"(this O)(string id, DH5Obj[] content) { _"~name~" = new "~className~"(id, content); return cast(O)this; } 297 O "~name~"(this O)(string id, DH5 content) { _"~name~" = new "~className~"(id, content); return cast(O)this; } 298 299 O "~name~"(this O)(string id, string[] classes) { _"~name~" = new "~className~"(id, classes); return cast(O)this; } 300 O "~name~"(this O)(string id, string[] classes, string content) { _"~name~" = new "~className~"(id, classes, content); return cast(O)this; } 301 O "~name~"(this O)(string id, string[] classes, DH5Obj[] content...) { _"~name~" = new "~className~"(id, classes, content); return cast(O)this; } 302 O "~name~"(this O)(string id, string[] classes, DH5Obj[] content) { _"~name~" = new "~className~"(id, classes, content); return cast(O)this; } 303 O "~name~"(this O)(string id, string[] classes, DH5 content) { _"~name~" = new "~className~"(id, classes, content); return cast(O)this; } 304 305 O "~name~"(this O)(string id, string[string] attributes) { _"~name~" = new "~className~"(id, attributes); return cast(O)this; } 306 O "~name~"(this O)(string id, string[string] attributes, string content) { _"~name~" = new "~className~"(id, attributes, content); return cast(O)this; } 307 O "~name~"(this O)(string id, string[string] attributes, DH5Obj[] content...) { _"~name~" = new "~className~"(id, attributes, content); return cast(O)this; } 308 O "~name~"(this O)(string id, string[string] attributes, DH5Obj[] content) { _"~name~" = new "~className~"(id, attributes, content); return cast(O)this; } 309 O "~name~"(this O)(string id, string[string] attributes, DH5 content) { _"~name~" = new "~className~"(id, attributes, content); return cast(O)this; } 310 311 O "~name~"(this O)(string id, string[] classes, string[string] attributes) { _"~name~" = new "~className~"(id, classes, attributes); return cast(O)this; } 312 O "~name~"(this O)(string id, string[] classes, string[string] attributes, string content) { _"~name~" = new "~className~"(id, classes, attributes, content); return cast(O)this; } 313 O "~name~"(this O)(string id, string[] classes, string[string] attributes, DH5Obj[] content...) { _"~name~" = new "~className~"(id, classes, attributes, content); return cast(O)this; } 314 O "~name~"(this O)(string id, string[] classes, string[string] attributes, DH5Obj[] content) { _"~name~" = new "~className~"(id, classes, attributes, content); return cast(O)this; } 315 O "~name~"(this O)(string id, string[] classes, string[string] attributes, DH5 content) { _"~name~" = new "~className~"(id, classes, attributes, content); return cast(O)this; } 316 317 O "~name~"(this O)(string[] classes) { _"~name~" = new "~className~"(classes); return cast(O)this; } 318 O "~name~"(this O)(string[] classes, string content) { _"~name~" = new "~className~"(classes, content); return cast(O)this; } 319 O "~name~"(this O)(string[] classes, DH5Obj[] content...) { _"~name~" = new "~className~"(classes, content); return cast(O)this; } 320 O "~name~"(this O)(string[] classes, DH5Obj[] content) { _"~name~" = new "~className~"(classes, content); return cast(O)this; } 321 O "~name~"(this O)(string[] classes, DH5 content) { _"~name~" = new "~className~"(classes, content); return cast(O)this; } 322 323 O "~name~"(this O)(string[string] attributes) { _"~name~" = new "~className~"(attributes); return cast(O)this; } 324 O "~name~"(this O)(string[string] attributes, string content) { _"~name~" = new "~className~"(attributes, content); return cast(O)this; } 325 O "~name~"(this O)(string[string] attributes, DH5Obj[] content...) { _"~name~" = new "~className~"(attributes, content); return cast(O)this; } 326 O "~name~"(this O)(string[string] attributes, DH5Obj[] content) { _"~name~" = new "~className~"(attributes, content); return cast(O)this; } 327 O "~name~"(this O)(string[string] attributes, DH5 content) { _"~name~" = new "~className~"(attributes, content); return cast(O)this; } 328 329 O "~name~"(this O)(string[] classes, string[string] attributes) { _"~name~" = new "~className~"(classes, attributes); return cast(O)this; } 330 O "~name~"(this O)(string[] classes, string[string] attributes, string content) { _"~name~" = new "~className~"(classes, attributes, content); return cast(O)this; } 331 O "~name~"(this O)(string[] classes, string[string] attributes, DH5Obj[] content...) { _"~name~" = new "~className~"(classes, attributes, content); return cast(O)this; } 332 O "~name~"(this O)(string[] classes, string[string] attributes, DH5Obj[] content) { _"~name~" = new "~className~"(classes, attributes, content); return cast(O)this; } 333 O "~name~"(this O)(string[] classes, string[string] attributes, DH5 content) { _"~name~" = new "~className~"(classes, attributes, content); return cast(O)this; } 334 "; 335 } 336