2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module CheckBox
|
2014-03-20 10:21:28 +08:00
|
|
|
-- @extend Widget
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module ccui
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Load background selected state texture for checkbox.<br>
|
|
|
|
-- param backGroundSelected The background selected state image name.<br>
|
|
|
|
-- param texType @see `Widget::TextureResType`
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#CheckBox] loadTextureBackGroundSelected
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string backGroundSelected
|
|
|
|
-- @param #int texType
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return CheckBox#CheckBox self (return value: ccui.CheckBox)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Load background disabled state texture for checkbox.<br>
|
|
|
|
-- param backGroundDisabled The background disabled state texture name.<br>
|
|
|
|
-- param texType @see `Widget::TextureResType`
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#CheckBox] loadTextureBackGroundDisabled
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string backGroundDisabled
|
|
|
|
-- @param #int texType
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return CheckBox#CheckBox self (return value: ccui.CheckBox)
|
2014-05-12 16:14:14 +08:00
|
|
|
|
2014-08-18 23:26:32 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Change CheckBox state.<br>
|
|
|
|
-- Set to true will cause the CheckBox's state to "selected", false otherwise.<br>
|
|
|
|
-- param selected Set to true will change CheckBox to selected state, false otherwise.
|
2014-08-18 23:26:32 +08:00
|
|
|
-- @function [parent=#CheckBox] setSelected
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool selected
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return CheckBox#CheckBox self (return value: ccui.CheckBox)
|
2014-08-18 23:26:32 +08:00
|
|
|
|
2014-05-12 16:14:14 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Add a callback function which would be called when checkbox is selected or unselected.<br>
|
|
|
|
-- param callback A std::function with type @see `ccCheckBoxCallback`
|
2014-05-12 16:14:14 +08:00
|
|
|
-- @function [parent=#CheckBox] addEventListener
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #function callback
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return CheckBox#CheckBox self (return value: ccui.CheckBox)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Load cross texture for checkbox.<br>
|
2015-03-26 10:44:28 +08:00
|
|
|
-- param cross The cross texture name.<br>
|
|
|
|
-- param texType @see `Widget::TextureResType`
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#CheckBox] loadTextureFrontCross
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string
|
|
|
|
-- @param #int texType
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return CheckBox#CheckBox self (return value: ccui.CheckBox)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-08-18 23:26:32 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Query whether CheckBox is selected or not.<br>
|
|
|
|
-- return true means "selected", false otherwise.
|
2014-08-18 23:26:32 +08:00
|
|
|
-- @function [parent=#CheckBox] isSelected
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Load all textures for initializing a checkbox.<br>
|
|
|
|
-- param backGround The background image name.<br>
|
|
|
|
-- param backGroundSelected The background selected image name.<br>
|
|
|
|
-- param cross The cross image name.<br>
|
|
|
|
-- param frontCrossDisabled The front cross disabled state image name.<br>
|
|
|
|
-- param texType @see `Widget::TextureResType`
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#CheckBox] loadTextures
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string backGround
|
|
|
|
-- @param #string backGroundSelected
|
|
|
|
-- @param #string cross
|
|
|
|
-- @param #string backGroundDisabled
|
|
|
|
-- @param #string frontCrossDisabled
|
|
|
|
-- @param #int texType
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return CheckBox#CheckBox self (return value: ccui.CheckBox)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-12-26 09:32:36 +08:00
|
|
|
--------------------------------
|
|
|
|
-- brief Return a zoom scale<br>
|
2015-03-26 10:44:28 +08:00
|
|
|
-- return A zoom scale of Checkbox.<br>
|
2014-12-26 09:32:36 +08:00
|
|
|
-- since v3.3
|
|
|
|
-- @function [parent=#CheckBox] getZoomScale
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Load background texture for checkbox.<br>
|
|
|
|
-- param backGround The background image name.<br>
|
|
|
|
-- param texType @see `Widget::TextureResType`
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#CheckBox] loadTextureBackGround
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string backGround
|
|
|
|
-- @param #int type
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return CheckBox#CheckBox self (return value: ccui.CheckBox)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-12-26 09:32:36 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- When user pressed the CheckBox, the button will zoom to a scale.<br>
|
|
|
|
-- The final scale of the CheckBox equals (CheckBox original scale + _zoomScale)<br>
|
2014-12-26 09:32:36 +08:00
|
|
|
-- since v3.3
|
|
|
|
-- @function [parent=#CheckBox] setZoomScale
|
|
|
|
-- @param self
|
|
|
|
-- @param #float scale
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return CheckBox#CheckBox self (return value: ccui.CheckBox)
|
2014-12-26 09:32:36 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Load frontcross disabled texture for checkbox.<br>
|
|
|
|
-- param frontCrossDisabled The front cross disabled state texture name.<br>
|
|
|
|
-- param texType @see `Widget::TextureResType`
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#CheckBox] loadTextureFrontCrossDisabled
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string frontCrossDisabled
|
|
|
|
-- @param #int texType
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return CheckBox#CheckBox self (return value: ccui.CheckBox)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @overload self, string, string, string, string, string, int
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self
|
2014-12-26 09:32:36 +08:00
|
|
|
-- @overload self, string, string, int
|
2014-04-04 18:45:34 +08:00
|
|
|
-- @function [parent=#CheckBox] create
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string backGround
|
|
|
|
-- @param #string backGroundSeleted
|
|
|
|
-- @param #string cross
|
|
|
|
-- @param #string backGroundDisabled
|
|
|
|
-- @param #string frontCrossDisabled
|
|
|
|
-- @param #int texType
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @return CheckBox#CheckBox ret (return value: ccui.CheckBox)
|
2014-04-04 18:45:34 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#CheckBox] createInstance
|
|
|
|
-- @param self
|
|
|
|
-- @return Ref#Ref ret (return value: cc.Ref)
|
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#CheckBox] getVirtualRenderer
|
|
|
|
-- @param self
|
|
|
|
-- @return Node#Node ret (return value: cc.Node)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#CheckBox] getDescription
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-04-18 10:51:14 +08:00
|
|
|
-- @function [parent=#CheckBox] getVirtualRendererSize
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-26 10:44:28 +08:00
|
|
|
-- Default constructor.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#CheckBox] CheckBox
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return CheckBox#CheckBox self (return value: ccui.CheckBox)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
return nil
|