blob: 742cdcce011d01803187e71f34bf4594e095838d (
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
|
---@meta
---@class ccui.Helper
local Helper={ }
ccui.Helper=Helper
---* brief Get a UTF8 substring from a std::string with a given start position and length<br>
---* Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国"<br>
---* param str The source string.<br>
---* param start The start position of the substring.<br>
---* param length The length of the substring in UTF8 count<br>
---* return a UTF8 substring<br>
---* js NA
---@param str string
---@param start unsigned_int
---@param length unsigned_int
---@return string
function Helper:getSubStringOfUTF8String (str,start,length) end
---* brief Convert a node's boundingBox rect into screen coordinates.<br>
---* param node Any node pointer.<br>
---* return A Rect in screen coordinates.
---@param node cc.Node
---@return rect_table
function Helper:convertBoundingBoxToScreen (node) end
---* Change the active property of Layout's @see `LayoutComponent`<br>
---* param active A boolean value.
---@param active boolean
---@return self
function Helper:changeLayoutSystemActiveState (active) end
---* Find a widget with a specific action tag from root widget<br>
---* This search will be recursive through all child widgets.<br>
---* param root The be searched root widget.<br>
---* param tag The widget action's tag.<br>
---* return Widget instance pointer.
---@param root ccui.Widget
---@param tag int
---@return ccui.Widget
function Helper:seekActionWidgetByActionTag (root,tag) end
---* Find a widget with a specific name from root widget.<br>
---* This search will be recursive through all child widgets.<br>
---* param root The be searched root widget.<br>
---* param name The widget name.<br>
---* return Widget instance pointer.
---@param root ccui.Widget
---@param name string
---@return ccui.Widget
function Helper:seekWidgetByName (root,name) end
---* Find a widget with a specific tag from root widget.<br>
---* This search will be recursive through all child widgets.<br>
---* param root The be searched root widget.<br>
---* param tag The widget tag.<br>
---* return Widget instance pointer.
---@param root ccui.Widget
---@param tag int
---@return ccui.Widget
function Helper:seekWidgetByTag (root,tag) end
---* brief restrict capInsetSize, when the capInsets's width is larger than the textureSize, it will restrict to 0,<br>
---* the height goes the same way as width.<br>
---* param capInsets A user defined capInsets.<br>
---* param textureSize The size of a scale9enabled texture<br>
---* return a restricted capInset.
---@param capInsets rect_table
---@param textureSize size_table
---@return rect_table
function Helper:restrictCapInsetRect (capInsets,textureSize) end
---* Refresh object and it's children layout state<br>
---* param rootNode A Node* or Node* descendant instance pointer.
---@param rootNode cc.Node
---@return self
function Helper:doLayout (rootNode) end
|