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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
|
---@class ccui.ScrollView :ccui.Layout
local ScrollView={ }
ccui.ScrollView=ScrollView
---* Scroll inner container to top boundary of scrollview.<br>
---* param timeInSec Time in seconds.<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToTop (timeInSec,attenuated) end
---* Scroll inner container to horizontal percent position of scrollview.<br>
---* param percent A value between 0 and 100.<br>
---* param timeInSec Time in seconds.<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param percent float
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToPercentHorizontal (percent,timeInSec,attenuated) end
---* brief Set the scroll bar's opacity<br>
---* param the scroll bar's opacity
---@param opacity unsigned_char
---@return self
function ScrollView:setScrollBarOpacity (opacity) end
---* brief Toggle scroll bar enabled.<br>
---* param enabled True if enable scroll bar, false otherwise.
---@param enabled boolean
---@return self
function ScrollView:setScrollBarEnabled (enabled) end
---* brief Query inertia scroll state.<br>
---* return True if inertia is enabled, false otherwise.
---@return boolean
function ScrollView:isInertiaScrollEnabled () end
---* Scroll inner container to bottom boundary of scrollview.<br>
---* param timeInSec Time in seconds.<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToBottom (timeInSec,attenuated) end
---* return How far the scroll view is scrolled in both axes, combined as a Vec2
---@return vec2_table
function ScrollView:getScrolledPercentBothDirection () end
---* Query scroll direction of scrollview.<br>
---* see `Direction` Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll<br>
---* return Scrollview scroll direction.
---@return int
function ScrollView:getDirection () end
---* brief Set the scroll bar's color<br>
---* param the scroll bar's color
---@param color color3b_table
---@return self
function ScrollView:setScrollBarColor (color) end
---* Scroll inner container to bottom and left boundary of scrollview.<br>
---* param timeInSec Time in seconds.<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToBottomLeft (timeInSec,attenuated) end
---* Get inner container of scrollview.<br>
---* Inner container is a child of scrollview.<br>
---* return Inner container pointer.
---@return ccui.Layout
function ScrollView:getInnerContainer () end
---* Move inner container to bottom boundary of scrollview.
---@return self
function ScrollView:jumpToBottom () end
---* Set inner container position<br>
---* param pos Inner container position.
---@param pos vec2_table
---@return self
function ScrollView:setInnerContainerPosition (pos) end
---* Changes scroll direction of scrollview.<br>
---* see `Direction`<br>
---* param dir Scroll direction enum.
---@param dir int
---@return self
function ScrollView:setDirection (dir) end
---* Scroll inner container to top and left boundary of scrollview.<br>
---* param timeInSec Time in seconds.<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToTopLeft (timeInSec,attenuated) end
---* Move inner container to top and right boundary of scrollview.
---@return self
function ScrollView:jumpToTopRight () end
---* Scroll inner container to both direction percent position of scrollview.<br>
---* param percent A value between 0 and 100.<br>
---* param timeInSec Time in seconds.<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param percent vec2_table
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToPercentBothDirection (percent,timeInSec,attenuated) end
---* Change inner container size of scrollview.<br>
---* Inner container size must be larger than or equal scrollview's size.<br>
---* param size Inner container size.
---@param size size_table
---@return self
function ScrollView:setInnerContainerSize (size) end
---* Get inner container position<br>
---* return The inner container position.
---@return vec2_table
function ScrollView:getInnerContainerPosition () end
---* Move inner container to top boundary of scrollview.
---@return self
function ScrollView:jumpToTop () end
---* return How far the scroll view is scrolled in the vertical axis
---@return float
function ScrollView:getScrolledPercentVertical () end
---* brief Query bounce state.<br>
---* return True if bounce is enabled, false otherwise.
---@return boolean
function ScrollView:isBounceEnabled () end
---* Move inner container to vertical percent position of scrollview.<br>
---* param percent A value between 0 and 100.
---@param percent float
---@return self
function ScrollView:jumpToPercentVertical (percent) end
---* Add callback function which will be called when scrollview event triggered.<br>
---* param callback A callback function with type of `ccScrollViewCallback`.
---@param callback function
---@return self
function ScrollView:addEventListener (callback) end
---* brief Set scroll bar auto hide time<br>
---* param scroll bar auto hide time
---@param autoHideTime float
---@return self
function ScrollView:setScrollBarAutoHideTime (autoHideTime) end
---* Immediately stops inner container scroll (auto scrolling is not affected).
---@return self
function ScrollView:stopScroll () end
---* brief Set the horizontal scroll bar position from left-bottom corner.<br>
---* param positionFromCorner The position from left-bottom corner
---@param positionFromCorner vec2_table
---@return self
function ScrollView:setScrollBarPositionFromCornerForHorizontal (positionFromCorner) end
---* brief Toggle whether enable scroll inertia while scrolling.<br>
---* param enabled True if enable inertia, false otherwise.
---@param enabled boolean
---@return self
function ScrollView:setInertiaScrollEnabled (enabled) end
---* brief Set scroll bar auto hide state<br>
---* param scroll bar auto hide state
---@param autoHideEnabled boolean
---@return self
function ScrollView:setScrollBarAutoHideEnabled (autoHideEnabled) end
---* brief Get the scroll bar's color<br>
---* return the scroll bar's color
---@return color3b_table
function ScrollView:getScrollBarColor () end
---* Move inner container to top and left boundary of scrollview.
---@return self
function ScrollView:jumpToTopLeft () end
---* brief Query scroll bar state.<br>
---* return True if scroll bar is enabled, false otherwise.
---@return boolean
function ScrollView:isScrollBarEnabled () end
---* return Whether the ScrollView is currently scrolling because of a bounceback or inertia slowdown.
---@return boolean
function ScrollView:isAutoScrolling () end
---* Move inner container to bottom and right boundary of scrollview.
---@return self
function ScrollView:jumpToBottomRight () end
---* brief Set the touch total time threshold<br>
---* param the touch total time threshold
---@param touchTotalTimeThreshold float
---@return self
function ScrollView:setTouchTotalTimeThreshold (touchTotalTimeThreshold) end
---* brief Get the touch total time threshold<br>
---* return the touch total time threshold
---@return float
function ScrollView:getTouchTotalTimeThreshold () end
---* brief Get the horizontal scroll bar's position from right-top corner.<br>
---* return positionFromCorner
---@return vec2_table
function ScrollView:getScrollBarPositionFromCornerForHorizontal () end
---* return How far the scroll view is scrolled in the horizontal axis
---@return float
function ScrollView:getScrolledPercentHorizontal () end
---* brief Toggle bounce enabled when scroll to the edge.<br>
---* param enabled True if enable bounce, false otherwise.
---@param enabled boolean
---@return self
function ScrollView:setBounceEnabled (enabled) end
---* Immediately stops inner container scroll initiated by any of the "scrollTo*" member functions
---@return self
function ScrollView:stopAutoScroll () end
---* Scroll inner container to top and right boundary of scrollview.<br>
---* param timeInSec Time in seconds.<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToTopRight (timeInSec,attenuated) end
---* return Whether the user is currently dragging the ScrollView to scroll it
---@return boolean
function ScrollView:isScrolling () end
---* Scroll inner container to left boundary of scrollview.<br>
---* param timeInSec Time in seconds.<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToLeft (timeInSec,attenuated) end
---* Move inner container to both direction percent position of scrollview.<br>
---* param percent A value between 0 and 100.
---@param percent vec2_table
---@return self
function ScrollView:jumpToPercentBothDirection (percent) end
---* Immediately stops inner container scroll if any.
---@return self
function ScrollView:stopOverallScroll () end
---* Scroll inner container to vertical percent position of scrollview.<br>
---* param percent A value between 0 and 100.<br>
---* param timeInSec Time in seconds.<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param percent float
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToPercentVertical (percent,timeInSec,attenuated) end
---* brief Set the scroll bar's width<br>
---* param width The scroll bar's width
---@param width float
---@return self
function ScrollView:setScrollBarWidth (width) end
---* brief Get the scroll bar's opacity<br>
---* return the scroll bar's opacity
---@return unsigned_char
function ScrollView:getScrollBarOpacity () end
---* Scroll inner container to bottom and right boundary of scrollview.<br>
---* param timeInSec Time in seconds<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToBottomRight (timeInSec,attenuated) end
---* brief Set the scroll bar positions from the left-bottom corner (horizontal) and right-top corner (vertical).<br>
---* param positionFromCorner The position from the left-bottom corner (horizontal) and right-top corner (vertical).
---@param positionFromCorner vec2_table
---@return self
function ScrollView:setScrollBarPositionFromCorner (positionFromCorner) end
---* brief Set the vertical scroll bar position from right-top corner.<br>
---* param positionFromCorner The position from right-top corner
---@param positionFromCorner vec2_table
---@return self
function ScrollView:setScrollBarPositionFromCornerForVertical (positionFromCorner) end
---* brief Get the scroll bar's auto hide time<br>
---* return the scroll bar's auto hide time
---@return float
function ScrollView:getScrollBarAutoHideTime () end
---* Move inner container to left boundary of scrollview.
---@return self
function ScrollView:jumpToLeft () end
---* Scroll inner container to right boundary of scrollview.<br>
---* param timeInSec Time in seconds.<br>
---* param attenuated Whether scroll speed attenuate or not.
---@param timeInSec float
---@param attenuated boolean
---@return self
function ScrollView:scrollToRight (timeInSec,attenuated) end
---* brief Get the vertical scroll bar's position from right-top corner.<br>
---* return positionFromCorner
---@return vec2_table
function ScrollView:getScrollBarPositionFromCornerForVertical () end
---* brief Get the scroll bar's width<br>
---* return the scroll bar's width
---@return float
function ScrollView:getScrollBarWidth () end
---* brief Query scroll bar auto hide state<br>
---* return True if scroll bar auto hide is enabled, false otherwise.
---@return boolean
function ScrollView:isScrollBarAutoHideEnabled () end
---* Move inner container to bottom and left boundary of scrollview.
---@return self
function ScrollView:jumpToBottomLeft () end
---* Move inner container to right boundary of scrollview.
---@return self
function ScrollView:jumpToRight () end
---* Get inner container size of scrollview.<br>
---* Inner container size must be larger than or equal scrollview's size.<br>
---* return The inner container size.
---@return size_table
function ScrollView:getInnerContainerSize () end
---* Move inner container to horizontal percent position of scrollview.<br>
---* param percent A value between 0 and 100.
---@param percent float
---@return self
function ScrollView:jumpToPercentHorizontal (percent) end
---* Create an empty ScrollView.<br>
---* return A ScrollView instance.
---@return self
function ScrollView:create () end
---*
---@return cc.Ref
function ScrollView:createInstance () end
---@overload fun(cc.Node:cc.Node,int:int):self
---@overload fun(cc.Node:cc.Node):self
---@overload fun(cc.Node:cc.Node,int:int,string2:int):self
---@overload fun(cc.Node:cc.Node,int:int,string:string):self
---@param child cc.Node
---@param localZOrder int
---@param name string
---@return self
function ScrollView:addChild (child,localZOrder,name) end
---*
---@return boolean
function ScrollView:init () end
---*
---@param name string
---@return cc.Node
function ScrollView:getChildByName (name) end
---* Return the "class name" of widget.
---@return string
function ScrollView:getDescription () end
---*
---@param dt float
---@return self
function ScrollView:update (dt) end
---* Get the layout type for scrollview.<br>
---* see `Layout::Type`<br>
---* return LayoutType
---@return int
function ScrollView:getLayoutType () end
---*
---@param cleanup boolean
---@return self
function ScrollView:removeAllChildrenWithCleanup (cleanup) end
---*
---@return self
function ScrollView:removeAllChildren () end
---* When a widget is in a layout, you could call this method to get the next focused widget within a specified direction.<br>
---* If the widget is not in a layout, it will return itself<br>
---* param direction the direction to look for the next focused widget in a layout<br>
---* param current the current focused widget<br>
---* return the next focused widget in a layout
---@param direction int
---@param current ccui.Widget
---@return ccui.Widget
function ScrollView:findNextFocusedWidget (direction,current) end
---*
---@param child cc.Node
---@param cleanup boolean
---@return self
function ScrollView:removeChild (child,cleanup) end
---@overload fun():self
---@overload fun():self
---@return array_table
function ScrollView:getChildren () end
---*
---@param tag int
---@return cc.Node
function ScrollView:getChildByTag (tag) end
---*
---@return int
function ScrollView:getChildrenCount () end
---* Set layout type for scrollview.<br>
---* see `Layout::Type`<br>
---* param type Layout type enum.
---@param type int
---@return self
function ScrollView:setLayoutType (type) end
---* Default constructor<br>
---* js ctor<br>
---* lua new
---@return self
function ScrollView:ScrollView () end
|