blob: 98f6b6a3ad610a91a62209615a4f5b6557af0628 (
plain)
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
|
---@meta
---@class ccui.PageView :ccui.ListView
local PageView={ }
ccui.PageView=PageView
---* brief Set space between page indicator's index nodes.<br>
---* param spaceBetweenIndexNodes Space between nodes in pixel.
---@param spaceBetweenIndexNodes float
---@return self
function PageView:setIndicatorSpaceBetweenIndexNodes (spaceBetweenIndexNodes) end
---* Insert a page into PageView at a given index.<br>
---* param page Page to be inserted.<br>
---* param idx A given index.
---@param page ccui.Widget
---@param idx int
---@return self
function PageView:insertPage (page,idx) end
---* brief Set opacity of page indicator's index nodes.<br>
---* param opacity New indicator node opacity.
---@param opacity unsigned_char
---@return self
function PageView:setIndicatorIndexNodesOpacity (opacity) end
---* brief Set opacity of page indicator's selected index.<br>
---* param color New opacity for selected (current) index.
---@param opacity unsigned_char
---@return self
function PageView:setIndicatorSelectedIndexOpacity (opacity) end
---* brief Remove all pages of the PageView.
---@return self
function PageView:removeAllPages () end
---*
---@param epsilon float
---@return self
function PageView:setAutoScrollStopEpsilon (epsilon) end
---* brief Set scale of page indicator's index nodes.<br>
---* param indexNodesScale Scale of index nodes.
---@param indexNodesScale float
---@return self
function PageView:setIndicatorIndexNodesScale (indexNodesScale) end
---* brief Toggle page indicator enabled.<br>
---* param enabled True if enable page indicator, false otherwise.
---@param enabled boolean
---@return self
function PageView:setIndicatorEnabled (enabled) end
---* brief Set color of page indicator's selected index.<br>
---* param color New color for selected (current) index.
---@param color color3b_table
---@return self
function PageView:setIndicatorSelectedIndexColor (color) end
---* brief Add a page turn callback to PageView, then when one page is turning, the callback will be called.<br>
---* param callback A page turning callback.
---@param callback function
---@return self
function PageView:addEventListener (callback) end
---* brief Get the page indicator's position.<br>
---* return positionAsAnchorPoint
---@return vec2_table
function PageView:getIndicatorPosition () end
---* Jump to a page with a given index without scrolling.<br>
---* This is the different between scrollToPage.<br>
---* param index A given index in PageView. Index start from 0 to pageCount -1.
---@param index int
---@return self
function PageView:setCurrentPageIndex (index) end
---* brief Get the color of page indicator's index nodes.<br>
---* return color
---@return color3b_table
function PageView:getIndicatorIndexNodesColor () end
---* brief Get the color of page indicator's selected index.<br>
---* return color
---@return color3b_table
function PageView:getIndicatorSelectedIndexColor () end
---* brief Get scale of page indicator's index nodes.<br>
---* return indexNodesScale
---@return float
function PageView:getIndicatorIndexNodesScale () end
---* brief Set the page indicator's position in page view.<br>
---* param position The position in page view
---@param position vec2_table
---@return self
function PageView:setIndicatorPosition (position) end
---* brief Get the opacity of page indicator's selected index.<br>
---* return opacity
---@return unsigned_char
function PageView:getIndicatorSelectedIndexOpacity () end
---@overload fun(int:int,float:float):self
---@overload fun(int:int):self
---@param idx int
---@param time float
---@return self
function PageView:scrollToPage (idx,time) end
---* brief Set the page indicator's position using anchor point.<br>
---* param positionAsAnchorPoint The position as anchor point.
---@param positionAsAnchorPoint vec2_table
---@return self
function PageView:setIndicatorPositionAsAnchorPoint (positionAsAnchorPoint) end
---@overload fun(int:int,float:float):self
---@overload fun(int:int):self
---@param idx int
---@param time float
---@return self
function PageView:scrollToItem (idx,time) end
---* brief Set color of page indicator's index nodes.<br>
---* param color New indicator node color.
---@param color color3b_table
---@return self
function PageView:setIndicatorIndexNodesColor (color) end
---* brief Get the opacity of page indicator's index nodes.<br>
---* return opacity
---@return unsigned_char
function PageView:getIndicatorIndexNodesOpacity () end
---* brief Get the page indicator's position as anchor point.<br>
---* return positionAsAnchorPoint
---@return vec2_table
function PageView:getIndicatorPositionAsAnchorPoint () end
---* Gets current displayed page index.<br>
---* return current page index.
---@return int
function PageView:getCurrentPageIndex () end
---* Remove a page of PageView.<br>
---* param page Page to be removed.
---@param page ccui.Widget
---@return self
function PageView:removePage (page) end
---* sets texture for index nodes.<br>
---* param fileName File name of texture.<br>
---* param resType @see TextureResType .
---@param texName string
---@param texType int
---@return self
function PageView:setIndicatorIndexNodesTexture (texName,texType) end
---* brief Query page indicator state.<br>
---* return True if page indicator is enabled, false otherwise.
---@return boolean
function PageView:getIndicatorEnabled () end
---* Remove a page at a given index of PageView.<br>
---* param index A given index.
---@param index int
---@return self
function PageView:removePageAtIndex (index) end
---* brief Get the space between page indicator's index nodes.<br>
---* return spaceBetweenIndexNodes
---@return float
function PageView:getIndicatorSpaceBetweenIndexNodes () end
---* Insert a page into the end of PageView.<br>
---* param page Page to be inserted.
---@param page ccui.Widget
---@return self
function PageView:addPage (page) end
---* Create an empty PageView.<br>
---* return A PageView instance.
---@return self
function PageView:create () end
---*
---@return cc.Ref
function PageView:createInstance () end
---*
---@return self
function PageView:doLayout () end
---*
---@return boolean
function PageView:init () end
---*
---@return string
function PageView:getDescription () end
---* Changes direction<br>
---* Direction Direction::VERTICAL means vertical scroll, Direction::HORIZONTAL means horizontal scroll.<br>
---* param direction Set the page view's scroll direction.
---@param direction int
---@return self
function PageView:setDirection (direction) end
---* Default constructor<br>
---* js ctor<br>
---* lua new
---@return self
function PageView:PageView () end
|