1 module libwasm.bindings.HTMLSelectElement;
2 
3 import libwasm.types;
4 
5 import memutils.ct: tuple;
6 import libwasm.bindings.AutocompleteInfo;
7 import libwasm.bindings.Element;
8 import libwasm.bindings.HTMLCollection;
9 import libwasm.bindings.HTMLElement;
10 import libwasm.bindings.HTMLFormElement;
11 import libwasm.bindings.HTMLOptGroupElement;
12 import libwasm.bindings.HTMLOptionElement;
13 import libwasm.bindings.HTMLOptionsCollection;
14 import libwasm.bindings.NodeList;
15 import libwasm.bindings.ValidityState;
16 
17 @safe:
18 nothrow:
19 
20 struct HTMLSelectElement {
21   nothrow:
22   libwasm.bindings.HTMLElement.HTMLElement _parent;
23   alias _parent this;
24   this(Handle h) {
25     _parent = .HTMLElement(h);
26   }
27   void autofocus()(bool autofocus) {
28     Object_Call_bool__void(this._parent, "autofocus", autofocus);
29   }
30   bool autofocus()() {
31     return Object_Getter__bool(this._parent, "autofocus");
32   }
33   void autocomplete()(string autocomplete) {
34     Object_Call_string__void(this._parent, "autocomplete", autocomplete);
35   }
36   string autocomplete()() {
37     return Object_Getter__string(this._parent, "autocomplete");
38   }
39   void disabled()(bool disabled) {
40     Object_Call_bool__void(this._parent, "disabled", disabled);
41   }
42   bool disabled()() {
43     return Object_Getter__bool(this._parent, "disabled");
44   }
45   auto form()() {
46     return recastOpt!(HTMLFormElement)(Object_Getter__OptionalHandle(this._parent, "form"));
47   }
48   void multiple()(bool multiple) {
49     Object_Call_bool__void(this._parent, "multiple", multiple);
50   }
51   bool multiple()() {
52     return Object_Getter__bool(this._parent, "multiple");
53   }
54   void name()(string name) {
55     Object_Call_string__void(this._parent, "name", name);
56   }
57   string name()() {
58     return Object_Getter__string(this._parent, "name");
59   }
60   void required()(bool required) {
61     Object_Call_bool__void(this._parent, "required", required);
62   }
63   bool required()() {
64     return Object_Getter__bool(this._parent, "required");
65   }
66   void size()(uint size) {
67     Object_Call_uint__void(this._parent, "size", size);
68   }
69   uint size()() {
70     return Object_Getter__uint(this._parent, "size");
71   }
72   string type()() {
73     return Object_Getter__string(this._parent, "type");
74   }
75   auto options()() {
76     return HTMLOptionsCollection(Object_Getter__Handle(this._parent, "options"));
77   }
78   void length()(uint length) {
79     Object_Call_uint__void(this._parent, "length", length);
80   }
81   uint length()() {
82     return Object_Getter__uint(this._parent, "length");
83   }
84   auto item()(uint index) {
85     return recastOpt!(Element)(Object_Call_uint__OptionalHandle(this._parent, "item", index));
86   }
87   auto namedItem()(string name) {
88     return recastOpt!(HTMLOptionElement)(Object_Call_string__OptionalHandle(this._parent, "namedItem", name));
89   }
90   void add(T1)(scope ref SumType!(HTMLOptionElement, HTMLOptGroupElement) element, scope auto ref Optional!(T1) before /* = no!(SumType!(HTMLElement, int)) */) if (isTOrPointer!(T1, SumType!(HTMLElement, int))) {
91     Serialize_Object_VarArgCall!void(this._parent, "add", "SumType!(Handle,Handle);Optional!SumType!(Handle,int)", tuple(libwasm.sumtype.match!(((ref element.Types[0] v) => 0),((ref element.Types[1] v) => 1))(element),tuple(libwasm.sumtype.match!(((ref element.Types[0] v) => cast(Handle)v.handle),((ref element.Types[1] v) => Handle.init))(element),libwasm.sumtype.match!(((ref element.Types[0] v) => Handle.init),((ref element.Types[1] v) => cast(Handle)v.handle))(element)), !before.empty, libwasm.sumtype.match!(((ref before.Types[0] v) => 0),((int v) => 1))(before),tuple(libwasm.sumtype.match!(((ref before.Types[0] v) => cast(Handle)v.handle),((int v) => Handle.init))(before),libwasm.sumtype.match!(((ref before.Types[0] v) => int.init),((int v) => v))(before))));
92   }
93   void add()(scope ref SumType!(HTMLOptionElement, HTMLOptGroupElement) element) {
94     Serialize_Object_VarArgCall!void(this._parent, "add", "SumType!(Handle,Handle)", tuple(libwasm.sumtype.match!(((ref element.Types[0] v) => 0),((ref element.Types[1] v) => 1))(element),tuple(libwasm.sumtype.match!(((ref element.Types[0] v) => cast(Handle)v.handle),((ref element.Types[1] v) => Handle.init))(element),libwasm.sumtype.match!(((ref element.Types[0] v) => Handle.init),((ref element.Types[1] v) => cast(Handle)v.handle))(element))));
95   }
96   void remove()(int index) {
97     Object_Call_int__void(this._parent, "remove", index);
98   }
99   void opIndexAssign(T1)(scope auto ref Optional!(T0) option, uint index) if (isTOrPointer!(T1, HTMLOptionElement)) {
100     Serialize_Object_VarArgCall!void(this._parent, "setter", "uint;Optional!Handle", tuple(index, !option.empty, cast(Handle)option.front._parent));
101   }
102   void opDispatch(uint index)(scope auto ref Optional!(T0) option) if (isTOrPointer!(T1, HTMLOptionElement)) {
103     Serialize_Object_VarArgCall!void(this._parent, "setter", "Optional!Handle", tuple(index, !option.empty, cast(Handle)option.front._parent));
104   }
105   auto selectedOptions()() {
106     return HTMLCollection(Object_Getter__Handle(this._parent, "selectedOptions"));
107   }
108   void selectedIndex()(int selectedIndex) {
109     Object_Call_int__void(this._parent, "selectedIndex", selectedIndex);
110   }
111   int selectedIndex()() {
112     return Object_Getter__int(this._parent, "selectedIndex");
113   }
114   void value()(string value) {
115     Object_Call_string__void(this._parent, "value", value);
116   }
117   string value()() {
118     return Object_Getter__string(this._parent, "value");
119   }
120   bool willValidate()() {
121     return Object_Getter__bool(this._parent, "willValidate");
122   }
123   auto validity()() {
124     return ValidityState(Object_Getter__Handle(this._parent, "validity"));
125   }
126   string validationMessage()() {
127     return Object_Getter__string(this._parent, "validationMessage");
128   }
129   bool checkValidity()() {
130     return Object_Getter__bool(this._parent, "checkValidity");
131   }
132   bool reportValidity()() {
133     return Object_Getter__bool(this._parent, "reportValidity");
134   }
135   void setCustomValidity()(string error) {
136     Object_Call_string__void(this._parent, "setCustomValidity", error);
137   }
138   auto labels()() {
139     return NodeList(Object_Getter__Handle(this._parent, "labels"));
140   }
141   void remove()() {
142     Object_Call__void(this._parent, "remove");
143   }
144   void openInParentProcess()(bool openInParentProcess) {
145     Object_Call_bool__void(this._parent, "openInParentProcess", openInParentProcess);
146   }
147   bool openInParentProcess()() {
148     return Object_Getter__bool(this._parent, "openInParentProcess");
149   }
150   auto getAutocompleteInfo()() {
151     return AutocompleteInfo(Object_Getter__Handle(this._parent, "getAutocompleteInfo"));
152   }
153   void previewValue()(string previewValue) {
154     Object_Call_string__void(this._parent, "previewValue", previewValue);
155   }
156   string previewValue()() {
157     return Object_Getter__string(this._parent, "previewValue");
158   }
159 }
160 
161