Helper class for traversing children in widget tree. More...
Static Public Member Functions | |
| static Widget * | seekWidgetByTag (Widget *root, int tag) |
| Find a widget with a specific tag from root widget. More... | |
| var | seekWidgetByTag ( var root, var tag) |
| Find a widget with a specific tag from root widget. More... | |
| local | seekWidgetByTag ( local root, local tag) |
| Find a widget with a specific tag from root widget. More... | |
| static Widget * | seekWidgetByName (Widget *root, const std::string &name) |
| Find a widget with a specific name from root widget. More... | |
| local | seekWidgetByName ( local root, local name) |
| Find a widget with a specific name from root widget. More... | |
| static Widget * | seekActionWidgetByActionTag (Widget *root, int tag) |
| Find a widget with a specific action tag from root widget This search will be recursive throught all child widgets. More... | |
| var | seekActionWidgetByActionTag ( var root, var tag) |
| Find a widget with a specific action tag from root widget This search will be recursive throught all child widgets. More... | |
| local | seekActionWidgetByActionTag ( local root, local tag) |
| Find a widget with a specific action tag from root widget This search will be recursive throught all child widgets. More... | |
| static std::string | getSubStringOfUTF8String (const std::string &str, std::string::size_type start, std::string::size_type length) |
| Get a UTF8 substring from a std::string with a given start position and length Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国". More... | |
| static void | doLayout (Node *rootNode) |
| Refresh object and it's children layout state. More... | |
| var | doLayout ( var rootNode) |
| Refresh object and it's children layout state. More... | |
| local | doLayout ( local rootNode) |
| Refresh object and it's children layout state. More... | |
| static void | changeLayoutSystemActiveState (bool active) |
| Change the active property of Layout's. More... | |
| var | changeLayoutSystemActiveState ( var active) |
| Change the active property of Layout's. More... | |
| local | changeLayoutSystemActiveState ( local active) |
| Change the active property of Layout's. More... | |
| static Rect | restrictCapInsetRect (const Rect &capInsets, const Size &textureSize) |
| restrict capInsetSize, when the capInsets's width is larger than the textureSize, it will restrict to 0, the height goes the same way as width. More... | |
| var | restrictCapInsetRect ( var capInsets, var textureSize) |
| restrict capInsetSize, when the capInsets's width is larger than the textureSize, it will restrict to 0, the height goes the same way as width. More... | |
| local | restrictCapInsetRect ( local capInsets, local textureSize) |
| restrict capInsetSize, when the capInsets's width is larger than the textureSize, it will restrict to 0, the height goes the same way as width. More... | |
Helper class for traversing children in widget tree.
It also provides some helper functions for layout.
Find a widget with a specific tag from root widget.
This search will be recursive throught all child widgets.
| root | The be seached root widget. |
| tag | The widget tag. |
|
static |
Find a widget with a specific tag from root widget.
This search will be recursive throught all child widgets.
| root | The be seached root widget. |
| tag | The widget tag. |
|
static |
Find a widget with a specific tag from root widget.
This search will be recursive throught all child widgets.
| root | The be seached root widget. |
| tag | The widget tag. |
Find a widget with a specific name from root widget.
This search will be recursive throught all child widgets.
| root | The be searched root widget. |
| name | The widget name. |
|
static |
Find a widget with a specific name from root widget.
This search will be recursive throught all child widgets.
| root | The be searched root widget. |
| name | The widget name. |
|
static |
Find a widget with a specific name from root widget.
This search will be recursive throught all child widgets.
| root | The be searched root widget. |
| name | The widget name. |
Find a widget with a specific action tag from root widget This search will be recursive throught all child widgets.
| root | The be searched root widget. |
| tag | The widget action's tag. |
|
static |
Find a widget with a specific action tag from root widget This search will be recursive throught all child widgets.
| root | The be searched root widget. |
| tag | The widget action's tag. |
|
static |
Find a widget with a specific action tag from root widget This search will be recursive throught all child widgets.
| root | The be searched root widget. |
| tag | The widget action's tag. |
|
static |
Get a UTF8 substring from a std::string with a given start position and length Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国".
| str | The source string. |
| start | The start position of the substring. |
| length | The length of the substring in UTF8 count |
|
static |
Get a UTF8 substring from a std::string with a given start position and length Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国".
| str | The source string. |
| start | The start position of the substring. |
| length | The length of the substring in UTF8 count |
|
static |
Refresh object and it's children layout state.
| rootNode | A Node* or Node* descendant instance pointer. |
|
static |
Refresh object and it's children layout state.
| rootNode | A Node* or Node* descendant instance pointer. |
|
static |
Refresh object and it's children layout state.
| rootNode | A Node* or Node* descendant instance pointer. |
|
static |
|
static |
|
static |
restrict capInsetSize, when the capInsets's width is larger than the textureSize, it will restrict to 0, the height goes the same way as width.
| capInsets | A user defined capInsets. |
| textureSize | The size of a scale9enabled texture |
|
static |
restrict capInsetSize, when the capInsets's width is larger than the textureSize, it will restrict to 0, the height goes the same way as width.
| capInsets | A user defined capInsets. |
| textureSize | The size of a scale9enabled texture |
|
static |
restrict capInsetSize, when the capInsets's width is larger than the textureSize, it will restrict to 0, the height goes the same way as width.
| capInsets | A user defined capInsets. |
| textureSize | The size of a scale9enabled texture |