/
Tabs.hx
259 lines (215 loc) · 7.55 KB
/
Tabs.hx
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
// Automatically generated Godot externs: DO NOT EDIT
// MIT licensed, see LICENSE.md
package godot;
import cs.system.*;
/**
Simple tabs control, similar to `godot.TabContainer` but is only in charge of drawing tabs, not interacting with children.
**/
@:libType
@:csNative
@:native("Godot.Tabs")
@:autoBuild(godot.Godot.buildUserClass())
extern class Tabs extends godot.Control {
/**
`reposition_active_tab_request` signal.
**/
public var onRepositionActiveTabRequest(get, never):Signal<(idxTo:Int)->Void>;
@:dox(hide) @:noCompletion inline function get_onRepositionActiveTabRequest():Signal<(idxTo:Int)->Void> {
return new Signal(this, "reposition_active_tab_request", Signal.SignalHandlerIntVoid.connectSignal, Signal.SignalHandlerIntVoid.disconnectSignal, Signal.SignalHandlerIntVoid.isSignalConnected);
}
/**
`right_button_pressed` signal.
**/
public var onRightButtonPressed(get, never):Signal<(tab:Int)->Void>;
@:dox(hide) @:noCompletion inline function get_onRightButtonPressed():Signal<(tab:Int)->Void> {
return new Signal(this, "right_button_pressed", Signal.SignalHandlerIntVoid.connectSignal, Signal.SignalHandlerIntVoid.disconnectSignal, Signal.SignalHandlerIntVoid.isSignalConnected);
}
/**
`tab_changed` signal.
**/
public var onTabChanged(get, never):Signal<(tab:Int)->Void>;
@:dox(hide) @:noCompletion inline function get_onTabChanged():Signal<(tab:Int)->Void> {
return new Signal(this, "tab_changed", Signal.SignalHandlerIntVoid.connectSignal, Signal.SignalHandlerIntVoid.disconnectSignal, Signal.SignalHandlerIntVoid.isSignalConnected);
}
/**
`tab_clicked` signal.
**/
public var onTabClicked(get, never):Signal<(tab:Int)->Void>;
@:dox(hide) @:noCompletion inline function get_onTabClicked():Signal<(tab:Int)->Void> {
return new Signal(this, "tab_clicked", Signal.SignalHandlerIntVoid.connectSignal, Signal.SignalHandlerIntVoid.disconnectSignal, Signal.SignalHandlerIntVoid.isSignalConnected);
}
/**
`tab_close` signal.
**/
public var onTabClose(get, never):Signal<(tab:Int)->Void>;
@:dox(hide) @:noCompletion inline function get_onTabClose():Signal<(tab:Int)->Void> {
return new Signal(this, "tab_close", Signal.SignalHandlerIntVoid.connectSignal, Signal.SignalHandlerIntVoid.disconnectSignal, Signal.SignalHandlerIntVoid.isSignalConnected);
}
/**
`tab_hover` signal.
**/
public var onTabHover(get, never):Signal<(tab:Int)->Void>;
@:dox(hide) @:noCompletion inline function get_onTabHover():Signal<(tab:Int)->Void> {
return new Signal(this, "tab_hover", Signal.SignalHandlerIntVoid.connectSignal, Signal.SignalHandlerIntVoid.disconnectSignal, Signal.SignalHandlerIntVoid.isSignalConnected);
}
/**
If `true`, tabs can be rearranged with mouse drag.
**/
@:native("DragToRearrangeEnabled")
public var dragToRearrangeEnabled:Bool;
/**
if `true`, the mouse's scroll wheel can be used to navigate the scroll view.
**/
@:native("ScrollingEnabled")
public var scrollingEnabled:Bool;
/**
Sets when the close button will appear on the tabs. See `godot.Tabs_CloseButtonDisplayPolicy` for details.
**/
@:native("TabCloseDisplayPolicy")
public var tabCloseDisplayPolicy:godot.Tabs_CloseButtonDisplayPolicy;
/**
The alignment of all tabs. See `godot.Tabs_TabAlignEnum` for details.
**/
@:native("TabAlign")
public var tabAlign:godot.Tabs_TabAlignEnum;
/**
Select tab at index `tab_idx`.
**/
@:native("CurrentTab")
public var currentTab:Int;
@:native("new")
public function new():Void;
/**
Returns the number of tabs.
**/
@:native("GetTabCount")
public function getTabCount():Int;
@:native("SetCurrentTab")
public function setCurrentTab(tabIdx:Int):Void;
@:native("GetCurrentTab")
public function getCurrentTab():Int;
/**
Returns the previously active tab index.
**/
@:native("GetPreviousTab")
public function getPreviousTab():Int;
/**
Sets a `title` for the tab at index `tab_idx`.
**/
@:native("SetTabTitle")
public function setTabTitle(tabIdx:Int, title:std.String):Void;
/**
Returns the title of the tab at index `tab_idx`.
**/
@:native("GetTabTitle")
public function getTabTitle(tabIdx:Int):std.String;
/**
Sets an `icon` for the tab at index `tab_idx`.
**/
@:native("SetTabIcon")
public function setTabIcon(tabIdx:Int, icon:godot.Texture):Void;
/**
Returns the `godot.Texture` for the tab at index `tab_idx` or `null` if the tab has no `godot.Texture`.
**/
@:native("GetTabIcon")
public function getTabIcon(tabIdx:Int):godot.Texture;
/**
If `disabled` is `true`, disables the tab at index `tab_idx`, making it non-interactable.
**/
@:native("SetTabDisabled")
public function setTabDisabled(tabIdx:Int, disabled:Bool):Void;
/**
Returns `true` if the tab at index `tab_idx` is disabled.
**/
@:native("GetTabDisabled")
public function getTabDisabled(tabIdx:Int):Bool;
/**
Removes the tab at index `tab_idx`.
**/
@:native("RemoveTab")
public function removeTab(tabIdx:Int):Void;
#if doc_gen
/**
Adds a new tab.
**/
@:native("AddTab")
public function addTab(?title:std.String, ?icon:godot.Texture):Void;
#else
/**
Adds a new tab.
**/
@:native("AddTab")
public overload function addTab():Void;
/**
Adds a new tab.
**/
@:native("AddTab")
public overload function addTab(title:std.String):Void;
/**
Adds a new tab.
**/
@:native("AddTab")
public overload function addTab(title:std.String, icon:godot.Texture):Void;
#end
@:native("SetTabAlign")
public function setTabAlign(align:godot.Tabs_TabAlignEnum):Void;
@:native("GetTabAlign")
public function getTabAlign():godot.Tabs_TabAlignEnum;
/**
Returns the number of hidden tabs offsetted to the left.
**/
@:native("GetTabOffset")
public function getTabOffset():Int;
/**
Returns `true` if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible.
**/
@:native("GetOffsetButtonsVisible")
public function getOffsetButtonsVisible():Bool;
/**
Moves the scroll view to make the tab visible.
**/
@:native("EnsureTabVisible")
public function ensureTabVisible(idx:Int):Void;
/**
Returns tab `godot.Rect2` with local position and size.
**/
@:native("GetTabRect")
public function getTabRect(tabIdx:Int):godot.Rect2;
/**
Moves a tab from `from` to `to`.
**/
@:native("MoveTab")
public function moveTab(from:Int, to:Int):Void;
@:native("SetTabCloseDisplayPolicy")
public function setTabCloseDisplayPolicy(policy:godot.Tabs_CloseButtonDisplayPolicy):Void;
@:native("GetTabCloseDisplayPolicy")
public function getTabCloseDisplayPolicy():godot.Tabs_CloseButtonDisplayPolicy;
@:native("SetScrollingEnabled")
public function setScrollingEnabled(enabled:Bool):Void;
@:native("GetScrollingEnabled")
public function getScrollingEnabled():Bool;
@:native("SetDragToRearrangeEnabled")
public function setDragToRearrangeEnabled(enabled:Bool):Void;
@:native("GetDragToRearrangeEnabled")
public function getDragToRearrangeEnabled():Bool;
/**
Defines the rearrange group ID. Choose for each `godot.Tabs` the same value to dragging tabs between `godot.Tabs`. Enable drag with `godot.Tabs.dragToRearrangeEnabled`.
**/
@:native("SetTabsRearrangeGroup")
public function setTabsRearrangeGroup(groupId:Int):Void;
/**
Returns the `godot.Tabs`' rearrange group ID.
**/
@:native("GetTabsRearrangeGroup")
public function getTabsRearrangeGroup():Int;
/**
If `true`, enables selecting a tab with the right mouse button.
**/
@:native("SetSelectWithRmb")
public function setSelectWithRmb(enabled:Bool):Void;
/**
Returns `true` if select with right mouse button is enabled.
**/
@:native("GetSelectWithRmb")
public function getSelectWithRmb():Bool;
}