2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Helper
|
2014-07-02 10:15:26 +08:00
|
|
|
-- @parent_module ccui
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-07-31 13:49:25 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- brief Get a UTF8 substring from a std::string with a given start position and length<br>
|
2014-10-11 16:12:44 +08:00
|
|
|
-- Sample: std::string str = "中国中国中国"; substr = getSubStringOfUTF8String(str,0,2) will = "中国"<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- param start The start position of the substring.<br>
|
|
|
|
-- param length The length of the substring in UTF8 count<br>
|
|
|
|
-- return a UTF8 substring
|
2014-07-31 13:49:25 +08:00
|
|
|
-- @function [parent=#Helper] getSubStringOfUTF8String
|
|
|
|
-- @param self
|
|
|
|
-- @param #string str
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #unsigned long start
|
|
|
|
-- @param #unsigned long length
|
2014-07-31 13:49:25 +08:00
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
2014-10-14 14:32:12 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Change the active property of Layout's @see `LayoutComponent`<br>
|
|
|
|
-- param active A boolean value.
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @function [parent=#Helper] changeLayoutSystemActiveState
|
2014-10-14 14:32:12 +08:00
|
|
|
-- @param self
|
2015-03-26 10:44:28 +08:00
|
|
|
-- @param #bool active
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Helper#Helper self (return value: ccui.Helper)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Find a widget with a specific action tag from root widget<br>
|
|
|
|
-- This search will be recursive throught all child widgets.<br>
|
|
|
|
-- param root The be searched root widget.<br>
|
|
|
|
-- param tag The widget action's tag.<br>
|
|
|
|
-- return Widget instance pointer.
|
2014-03-26 18:42:58 +08:00
|
|
|
-- @function [parent=#Helper] seekActionWidgetByActionTag
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #ccui.Widget root
|
|
|
|
-- @param #int tag
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return Widget#Widget ret (return value: ccui.Widget)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Find a widget with a specific name from root widget.<br>
|
|
|
|
-- This search will be recursive throught all child widgets.<br>
|
|
|
|
-- param root The be searched root widget.<br>
|
|
|
|
-- param name The widget name.<br>
|
|
|
|
-- return Widget isntance pointer.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Helper] seekWidgetByName
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #ccui.Widget root
|
|
|
|
-- @param #string name
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return Widget#Widget ret (return value: ccui.Widget)
|
|
|
|
|
2014-10-17 22:56:22 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Find a widget with a specific tag from root widget.<br>
|
|
|
|
-- This search will be recursive throught all child widgets.<br>
|
|
|
|
-- param root The be seached root widget.<br>
|
|
|
|
-- param tag The widget tag.<br>
|
|
|
|
-- return Widget instance pointer.
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @function [parent=#Helper] seekWidgetByTag
|
|
|
|
-- @param self
|
|
|
|
-- @param #ccui.Widget root
|
|
|
|
-- @param #int tag
|
|
|
|
-- @return Widget#Widget ret (return value: ccui.Widget)
|
|
|
|
|
2014-12-23 14:49:30 +08:00
|
|
|
--------------------------------
|
|
|
|
-- 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.
|
|
|
|
-- @function [parent=#Helper] restrictCapInsetRect
|
|
|
|
-- @param self
|
|
|
|
-- @param #rect_table capInsets
|
|
|
|
-- @param #size_table textureSize
|
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
|
|
|
|
2014-10-17 22:56:22 +08:00
|
|
|
--------------------------------
|
2014-12-24 14:42:09 +08:00
|
|
|
-- Refresh object and it's children layout state<br>
|
2015-03-26 10:44:28 +08:00
|
|
|
-- param rootNode A Node* or Node* descendant instance pointer.
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @function [parent=#Helper] doLayout
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Node rootNode
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Helper#Helper self (return value: ccui.Helper)
|
2014-10-17 22:56:22 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
return nil
|