cocos2d-x  3.0alpha1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
UIWidget Class Reference

#include <UIWidget.h>

Inheritance diagram for UIWidget:
Object UIButton UICheckBox UIImageView UILabel UILabelAtlas UILabelBMFont UILayout UILoadingBar UISlider UITextField

Public Member Functions

 UIWidget (void)
 ctor ()
virtual ~UIWidget ()
 Default destructor. More...
 
virtual void setEnabled (bool enabled)
 Sets whether the widget is enabled. More...
 
local setEnabled ( local enabled)
 Sets whether the widget is enabled. More...
 
bool isEnabled () const
 Determines if the widget is enabled. More...
 
void setVisible (bool visible)
 Sets whether the widget is visible. More...
 
var setVisible ( var visible)
 Sets whether the widget is visible. More...
 
local setVisible ( local visible)
 Sets whether the widget is visible. More...
 
bool isVisible () const
 Determines if the widget is visible. More...
 
void setBright (bool bright)
 Sets whether the widget is bright. More...
 
bool isBright () const
 Determines if the widget is bright. More...
 
virtual void setTouchEnabled (bool enabled)
 Sets whether the widget is touch enabled. More...
 
local setTouchEnabled ( local enabled)
 Sets whether the widget is touch enabled. More...
 
void setBrightStyle (BrightStyle style)
 To set the bright style of widget. More...
 
var setBrightStyle ( var style)
 To set the bright style of widget. More...
 
local setBrightStyle ( local style)
 To set the bright style of widget. More...
 
bool isTouchEnabled () const
 Determines if the widget is touch enabled. More...
 
bool isFocused () const
 Determines if the widget is on focused. More...
 
void setFocused (bool fucosed)
 Sets whether the widget is on focused. More...
 
void setZOrder (int z)
 Sets the Z order which stands for the drawing order, and reorder this widget in its parent's children array. More...
 
int getZOrder ()
 Gets the Z order of this widget. More...
 
float getLeftInParent ()
 Gets the left boundary position of this widget. More...
 
var getLeftInParent ()
 Gets the left boundary position of this widget. More...
 
local getLeftInParent ()
 Gets the left boundary position of this widget. More...
 
float getBottomInParent ()
 Gets the bottom boundary position of this widget. More...
 
var getBottomInParent ()
 Gets the bottom boundary position of this widget. More...
 
local getBottomInParent ()
 Gets the bottom boundary position of this widget. More...
 
float getRightInParent ()
 Gets the right boundary position of this widget. More...
 
var getRightInParent ()
 Gets the right boundary position of this widget. More...
 
local getRightInParent ()
 Gets the right boundary position of this widget. More...
 
float getTopInParent ()
 Gets the top boundary position of this widget. More...
 
var getTopInParent ()
 Gets the top boundary position of this widget. More...
 
local getTopInParent ()
 Gets the top boundary position of this widget. More...
 
virtual bool addChild (UIWidget *child)
 Adds a child to the container. More...
 
var addChild ( var child)
 Adds a child to the container. More...
 
local addChild ( local child)
 Adds a child to the container. More...
 
virtual bool removeChild (UIWidget *child)
 Removes a child from the container with a cleanup. More...
 
local removeChild ( local child)
 Removes a child from the container with a cleanup. More...
 
virtual void removeFromParent ()
 Removes this widget itself from its parent widget. More...
 
local removeFromParent ()
 Removes this widget itself from its parent widget. More...
 
virtual void removeAllChildren ()
 Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter. More...
 
var removeAllChildren ()
 Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter. More...
 
local removeAllChildren ()
 Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter. More...
 
virtual void reorderChild (UIWidget *child)
 Reorders a child according to a new z value. More...
 
local reorderChild ( local child)
 Reorders a child according to a new z value. More...
 
UIWidgetgetChildByName (const char *name)
 Gets a child from the container with its name. More...
 
UIWidgetgetChildByTag (int tag)
 Gets a child from the container with its tag. More...
 
virtual cocos2d::ArraygetChildren ()
 Return an array of children. More...
 
local getChildren ()
 Return an array of children. More...
 
cocos2d::NodegetRenderer ()
 Gets the renderer of widget. More...
 
void addRenderer (cocos2d::Node *renderer, int zOrder)
 Add a Node for rendering. More...
 
var addRenderer ( var renderer, var zOrder)
 Add a Node for rendering. More...
 
local addRenderer ( local renderer, local zOrder)
 Add a Node for rendering. More...
 
void removeRenderer (cocos2d::Node *renderer, bool cleanup)
 Remove a Node from widget. More...
 
local removeRenderer ( local renderer, local cleanup)
 Remove a Node from widget. More...
 
void setParent (UIWidget *parent)
 Sets the parent widget. More...
 
local setParent ( local parent)
 Sets the parent widget. More...
 
UIWidgetgetParent ()
 Returns a pointer to the parent widget. More...
 
void addTouchEventListener (cocos2d::Object *target, SEL_TouchEvent selector)
 Sets the touch event target/selector of the menu item. More...
 
var addTouchEventListener ( var target, var selector)
 Sets the touch event target/selector of the menu item. More...
 
local addTouchEventListener ( local target, local selector)
 Sets the touch event target/selector of the menu item. More...
 
void setPosition (const cocos2d::Point &pos)
 Changes the position (x,y) of the widget in OpenGL coordinates. More...
 
void setPositionPercent (const cocos2d::Point &percent)
 Changes the position (x,y) of the widget in OpenGL coordinates. More...
 
var setPositionPercent ( var percent)
 Changes the position (x,y) of the widget in OpenGL coordinates. More...
 
local setPositionPercent ( local percent)
 Changes the position (x,y) of the widget in OpenGL coordinates. More...
 
const cocos2d::PointgetPosition ()
 Gets the position (x,y) of the widget in OpenGL coordinates. More...
 
const cocos2d::PointgetPositionPercent ()
 Gets the percent (x,y) of the widget in OpenGL coordinates. More...
 
var getPositionPercent ()
 Gets the percent (x,y) of the widget in OpenGL coordinates. More...
 
local getPositionPercent ()
 Gets the percent (x,y) of the widget in OpenGL coordinates. More...
 
void setPositionType (PositionType type)
 Changes the position type of the widget. More...
 
PositionType getPositionType () const
 Gets the position type of the widget. More...
 
var getPositionType ()
 Gets the position type of the widget. More...
 
local getPositionType ()
 Gets the position type of the widget. More...
 
virtual void setAnchorPoint (const cocos2d::Point &pt)
 Sets the anchor point in percent. More...
 
local setAnchorPoint ( local pt)
 Sets the anchor point in percent. More...
 
const cocos2d::PointgetAnchorPoint ()
 Returns the anchor point in percent. More...
 
local getAnchorPoint ()
 Returns the anchor point in percent. More...
 
virtual void setScale (float fScale)
 Changes both X and Y scale factor of the widget. More...
 
local setScale ( local fScale)
 Changes both X and Y scale factor of the widget. More...
 
float getScale ()
 Gets the scale factor of the widget, when X and Y have the same scale factor. More...
 
virtual void setScaleX (float fScaleX)
 Changes the scale factor on X axis of this widget. More...
 
var setScaleX ( var fScaleX)
 Changes the scale factor on X axis of this widget. More...
 
local setScaleX ( local fScaleX)
 Changes the scale factor on X axis of this widget. More...
 
float getScaleX ()
 Returns the scale factor on X axis of this widget. More...
 
virtual void setScaleY (float fScaleY)
 Changes the scale factor on Y axis of this widget. More...
 
local setScaleY ( local fScaleY)
 Changes the scale factor on Y axis of this widget. More...
 
float getScaleY ()
 Returns the scale factor on Y axis of this widget. More...
 
var getScaleY ()
 Returns the scale factor on Y axis of this widget. More...
 
local getScaleY ()
 Returns the scale factor on Y axis of this widget. More...
 
void setRotation (float rotation)
 Sets the rotation (angle) of the widget in degrees. More...
 
float getRotation ()
 Returns the rotation of the widget in degrees. More...
 
void setRotationX (float rotationX)
 Sets the X rotation (angle) of the widget in degrees which performs a horizontal rotational skew. More...
 
float getRotationX ()
 Gets the X rotation (angle) of the widget in degrees which performs a horizontal rotation skew. More...
 
void setRotationY (float rotationY)
 Sets the Y rotation (angle) of the widget in degrees which performs a vertical rotational skew. More...
 
float getRotationY ()
 Gets the Y rotation (angle) of the widget in degrees which performs a vertical rotational skew. More...
 
var getRotationY ()
 Gets the Y rotation (angle) of the widget in degrees which performs a vertical rotational skew. More...
 
local getRotationY ()
 Gets the Y rotation (angle) of the widget in degrees which performs a vertical rotational skew. More...
 
virtual void setFlipX (bool flipX)
 Sets whether the widget should be flipped horizontally or not. More...
 
local setFlipX ( local flipX)
 Sets whether the widget should be flipped horizontally or not. More...
 
virtual bool isFlipX ()
 Returns the flag which indicates whether the widget is flipped horizontally or not. More...
 
virtual void setFlipY (bool flipY)
 Sets whether the widget should be flipped vertically or not. More...
 
local setFlipY ( local flipY)
 Sets whether the widget should be flipped vertically or not. More...
 
virtual bool isFlipY ()
 Return the flag which indicates whether the widget is flipped vertically or not. More...
 
virtual void setColor (const cocos2d::Color3B &color)
 Sets color to widget. More...
 
local setColor ( local color)
 Sets color to widget. More...
 
virtual const cocos2d::Color3BgetColor ()
 Gets color of widget. More...
 
local getColor ()
 Gets color of widget. More...
 
virtual void setOpacity (int opacity)
 Sets opacity to widget. More...
 
var setOpacity ( var opacity)
 Sets opacity to widget. More...
 
local setOpacity ( local opacity)
 Sets opacity to widget. More...
 
virtual int getOpacity ()
 Gets opacity of widget. More...
 
virtual bool isCascadeOpacityEnabled ()
var isCascadeOpacityEnabled ()
local isCascadeOpacityEnabled ()
virtual void setCascadeOpacityEnabled (bool cascadeOpacityEnabled)
virtual bool isCascadeColorEnabled ()
var isCascadeColorEnabled ()
local isCascadeColorEnabled ()
virtual void setCascadeColorEnabled (bool cascadeColorEnabled)
void setBlendFunc (cocos2d::BlendFunc blendFunc)
virtual void setActionManager (cocos2d::ActionManager *actionManager)
local setActionManager ( local actionManager)
virtual cocos2d::ActionManagergetActionManager ()
local getActionManager ()
cocos2d::ActionrunAction (cocos2d::Action *action)
var runAction ( var action)
local runAction ( local action)
void stopAllActions (void)
var stopAllActions ()
local stopAllActions ()
void stopAction (cocos2d::Action *action)
var stopAction ( var action)
local stopAction ( local action)
void stopActionByTag (int tag)
var stopActionByTag ( var tag)
local stopActionByTag ( local tag)
cocos2d::ActiongetActionByTag (int tag)
var getActionByTag ( var tag)
local getActionByTag ( local tag)
void didNotSelectSelf ()
 A call back function when widget lost of focus. More...
 
var didNotSelectSelf ()
 A call back function when widget lost of focus. More...
 
local didNotSelectSelf ()
 A call back function when widget lost of focus. More...
 
bool clippingParentAreaContainPoint (const cocos2d::Point &pt)
var clippingParentAreaContainPoint ( var pt)
local clippingParentAreaContainPoint ( local pt)
virtual void checkChildInfo (int handleState, UIWidget *sender, const cocos2d::Point &touchPoint)
local checkChildInfo ( local handleState, local sender, local touchPoint)
const cocos2d::PointgetTouchStartPos ()
var getTouchStartPos ()
local getTouchStartPos ()
const cocos2d::PointgetTouchMovePos ()
local getTouchMovePos ()
const cocos2d::PointgetTouchEndPos ()
void setTag (int tag)
 Changes the tag that is used to identify the widget easily. More...
 
local setTag ( local tag)
 Changes the tag that is used to identify the widget easily. More...
 
int getTag () const
 Returns a tag that is used to identify the widget easily. More...
 
var getTag ()
 Returns a tag that is used to identify the widget easily. More...
 
local getTag ()
 Returns a tag that is used to identify the widget easily. More...
 
void setName (const char *name)
 Changes the name that is used to identify the widget easily. More...
 
var setName ( var name)
 Changes the name that is used to identify the widget easily. More...
 
local setName ( local name)
 Changes the name that is used to identify the widget easily. More...
 
const char * getName () const
 Returns a name that is used to identify the widget easily. More...
 
WidgetType getWidgetType () const
 Returns a type that is widget's type. More...
 
virtual void setSize (const cocos2d::Size &size)
 Changes the size that is widget's size. More...
 
virtual void setSizePercent (const cocos2d::Point &percent)
 Changes the percent that is widget's percent size. More...
 
local setSizePercent ( local percent)
 Changes the percent that is widget's percent size. More...
 
void setSizeType (SizeType type)
 Changes the size type of widget. More...
 
var setSizeType ( var type)
 Changes the size type of widget. More...
 
local setSizeType ( local type)
 Changes the size type of widget. More...
 
SizeType getSizeType () const
 Gets the size type of widget. More...
 
var getSizeType ()
 Gets the size type of widget. More...
 
local getSizeType ()
 Gets the size type of widget. More...
 
const cocos2d::SizegetSize () const
 Returns size of widget. More...
 
const cocos2d::PointgetSizePercent () const
 Returns size percent of widget. More...
 
local getSizePercent ()
 Returns size percent of widget. More...
 
virtual bool hitTest (const cocos2d::Point &pt)
 Checks a point if is in widget's space. More...
 
var hitTest ( var pt)
 Checks a point if is in widget's space. More...
 
local hitTest ( local pt)
 Checks a point if is in widget's space. More...
 
virtual bool onTouchBegan (const cocos2d::Point &touchPoint)
 A call back function called when widget is selected, and on touch began. More...
 
var onTouchBegan ( var touchPoint)
 A call back function called when widget is selected, and on touch began. More...
 
local onTouchBegan ( local touchPoint)
 A call back function called when widget is selected, and on touch began. More...
 
virtual void onTouchMoved (const cocos2d::Point &touchPoint)
 A call back function called when widget is selected, and on touch moved. More...
 
var onTouchMoved ( var touchPoint)
 A call back function called when widget is selected, and on touch moved. More...
 
local onTouchMoved ( local touchPoint)
 A call back function called when widget is selected, and on touch moved. More...
 
virtual void onTouchEnded (const cocos2d::Point &touchPoint)
 A call back function called when widget is selected, and on touch ended. More...
 
local onTouchEnded ( local touchPoint)
 A call back function called when widget is selected, and on touch ended. More...
 
virtual void onTouchCancelled (const cocos2d::Point &touchPoint)
 A call back function called when widget is selected, and on touch canceled. More...
 
var onTouchCancelled ( var touchPoint)
 A call back function called when widget is selected, and on touch canceled. More...
 
local onTouchCancelled ( local touchPoint)
 A call back function called when widget is selected, and on touch canceled. More...
 
virtual void onTouchLongClicked (const cocos2d::Point &touchPoint)
 A call back function called when widget is selected, and on touch long clicked. More...
 
var onTouchLongClicked ( var touchPoint)
 A call back function called when widget is selected, and on touch long clicked. More...
 
local onTouchLongClicked ( local touchPoint)
 A call back function called when widget is selected, and on touch long clicked. More...
 
void setLayoutParameter (UILayoutParameter *parameter)
 Sets a LayoutParameter to widget. More...
 
UILayoutParametergetLayoutParameter (LayoutParameterType type)
 Gets LayoutParameter of widget. More...
 
virtual void ignoreContentAdaptWithSize (bool ignore)
 Ignore the widget size. More...
 
var ignoreContentAdaptWithSize ( var ignore)
 Ignore the widget size. More...
 
local ignoreContentAdaptWithSize ( local ignore)
 Ignore the widget size. More...
 
bool isIgnoreContentAdaptWithSize () const
 Gets the widget if is ignore it's size. More...
 
var isIgnoreContentAdaptWithSize ()
 Gets the widget if is ignore it's size. More...
 
local isIgnoreContentAdaptWithSize ()
 Gets the widget if is ignore it's size. More...
 
cocos2d::Point getWorldPosition ()
 Gets world position of widget. More...
 
local getWorldPosition ()
 Gets world position of widget. More...
 
cocos2d::Point convertToWorldSpace (const cocos2d::Point &pt)
 Converts a Point to world space coordinates. More...
 
local convertToWorldSpace ( local pt)
 Converts a Point to world space coordinates. More...
 
virtual cocos2d::NodegetVirtualRenderer ()
 Gets the Virtual Renderer of widget. More...
 
local getVirtualRenderer ()
 Gets the Virtual Renderer of widget. More...
 
void setUpdateEnabled (bool enable)
 Schedules the "update" method. More...
 
bool isUpdateEnabled ()
 is the "update" method scheduled. More...
 
virtual const cocos2d::SizegetContentSize () const
 Gets the content size of widget. More...
 
local getContentSize ()
 Gets the content size of widget. More...
 
virtual const char * getDescription () const
 Returns the "class name" of widget. More...
 
UIWidgetclone ()
var clone ()
local clone ()
virtual void onEnter ()
virtual void onExit ()
void updateSizeAndPosition ()
var updateSizeAndPosition ()
local updateSizeAndPosition ()
virtual ObjectgetUserObject ()
virtual const ObjectgetUserObject () const
virtual void setUserObject (Object *userObject)
 Returns a user assigned Object. More...
 
void setActionTag (int tag)
var setActionTag ( var tag)
local setActionTag ( local tag)
int getActionTag ()
var getActionTag ()
local getActionTag ()
- Public Member Functions inherited from Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
void release ()
 Release the ownership immediately. More...
 
void retain ()
 Retains the ownership. More...
 
Objectautorelease ()
 Release the ownership sometime soon automatically. More...
 
bool isSingleReference () const
 Returns a boolean value that indicates whether there is only one reference to the object. More...
 
unsigned int retainCount () const
 Returns the object's current reference count. More...
 
virtual bool isEqual (const Object *object)
 Returns a boolean value that indicates whether this object and a given object are equal. More...
 
virtual void acceptVisitor (DataVisitor &visitor)
virtual void update (float dt)

Static Public Member Functions

static UIWidgetcreate ()
 Allocates and initializes a widget. More...
 
local create ()
 Allocates and initializes a widget. More...
 

Protected Member Functions

virtual void onSizeChanged ()
local onSizeChanged ()
virtual bool init ()
local init ()
virtual void initRenderer ()
local initRenderer ()
virtual void onPressStateChangedToNormal ()
var onPressStateChangedToNormal ()
local onPressStateChangedToNormal ()
virtual void onPressStateChangedToPressed ()
var onPressStateChangedToPressed ()
local onPressStateChangedToPressed ()
virtual void onPressStateChangedToDisabled ()
local onPressStateChangedToDisabled ()
void pushDownEvent ()
var pushDownEvent ()
local pushDownEvent ()
void moveEvent ()
var moveEvent ()
local moveEvent ()
void releaseUpEvent ()
var releaseUpEvent ()
local releaseUpEvent ()
void cancelUpEvent ()
var cancelUpEvent ()
local cancelUpEvent ()
void longClickEvent ()
var longClickEvent ()
local longClickEvent ()
void updateAnchorPoint ()
var updateAnchorPoint ()
local updateAnchorPoint ()
void copyProperties (UIWidget *model)
var copyProperties ( var model)
local copyProperties ( local model)
virtual UIWidgetcreateCloneInstance ()
local createCloneInstance ()
virtual void copySpecialProperties (UIWidget *model)
local copySpecialProperties ( local model)
virtual void copyClonedWidgetChildren (UIWidget *model)

Protected Attributes

bool _enabled
 Highest control of widget. More...
 
bool _visible
 is this widget visible More...
 
var _visible
 is this widget visible More...
 
local _visible
 is this widget visible More...
 
bool _bright
 is this widget bright More...
 
var _bright
 is this widget bright More...
 
local _bright
 is this widget bright More...
 
bool _touchEnabled
 is this widget touch endabled More...
 
var _touchEnabled
 is this widget touch endabled More...
 
local _touchEnabled
 is this widget touch endabled More...
 
bool _touchPassedEnabled
 is the touch event should be passed More...
 
var _touchPassedEnabled
 is the touch event should be passed More...
 
local _touchPassedEnabled
 is the touch event should be passed More...
 
bool _focus
 is the widget on focus More...
 
int _widgetZOrder
 z-order value that affects the draw order and touch order More...
 
var _widgetZOrder
 z-order value that affects the draw order and touch order More...
 
local _widgetZOrder
 z-order value that affects the draw order and touch order More...
 
cocos2d::Point _anchorPoint
 anchor point normalized More...
 
var _anchorPoint
 anchor point normalized More...
 
local _anchorPoint
 anchor point normalized More...
 
UIWidget_widgetParent
 parent of widget More...
 
local _widgetParent
 parent of widget More...
 
BrightStyle _brightStyle
 bright style More...
 
var _brightStyle
 bright style More...
 
local _brightStyle
 bright style More...
 
bool _updateEnabled
 is "update" method scheduled More...
 
var _updateEnabled
 is "update" method scheduled More...
 
local _updateEnabled
 is "update" method scheduled More...
 
cocos2d::Node_renderer
 base renderer More...
 
var _renderer
 base renderer More...
 
local _renderer
 base renderer More...
 
cocos2d::Point _touchStartPos
 touch began point More...
 
var _touchStartPos
 touch began point More...
 
local _touchStartPos
 touch began point More...
 
cocos2d::Point _touchMovePos
 touch moved point More...
 
var _touchMovePos
 touch moved point More...
 
local _touchMovePos
 touch moved point More...
 
cocos2d::Point _touchEndPos
 touch ended point More...
 
var _touchEndPos
 touch ended point More...
 
local _touchEndPos
 touch ended point More...
 
Object_touchEventListener
local _touchEventListener
SEL_TouchEvent _touchEventSelector
var _touchEventSelector
local _touchEventSelector
int _widgetTag
var _widgetTag
local _widgetTag
std::string _name
var _name
local _name
WidgetType _widgetType
var _widgetType
local _widgetType
int _actionTag
var _actionTag
local _actionTag
cocos2d::Size _size
var _size
local _size
cocos2d::Size _customSize
var _customSize
local _customSize
cocos2d::Dictionary_layoutParameterDictionary
var _layoutParameterDictionary
local _layoutParameterDictionary
bool _ignoreSize
var _ignoreSize
local _ignoreSize
cocos2d::Array_children
var _children
local _children
bool _affectByClipping
var _affectByClipping
local _affectByClipping
cocos2d::Scheduler_scheduler
var _scheduler
local _scheduler
SizeType _sizeType
var _sizeType
local _sizeType
cocos2d::Point _sizePercent
var _sizePercent
local _sizePercent
PositionType _positionType
var _positionType
local _positionType
cocos2d::Point _positionPercent
var _positionPercent
local _positionPercent
bool _isRunning
var _isRunning
local _isRunning
cocos2d::Object_userObject
var _userObject
local _userObject
- Protected Attributes inherited from Object
unsigned int _reference
 count of references More...
 
unsigned int _autoReleaseCount
 count of autorelease More...
 

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID More...
 
int _luaID
 Lua reference id. More...
 

Constructor & Destructor Documentation

UIWidget ( void  )
var ctor (   )
virtual ~UIWidget ( )
virtual

Default destructor.

Member Function Documentation

virtual bool addChild ( UIWidget child)
virtual

Adds a child to the container.

Parameters
childA child widget

Reimplemented in UIScrollView, UILayout, UIPageView, and UIListView.

var addChild ( var  child)
virtual

Adds a child to the container.

Parameters
childA child widget

Reimplemented in UIScrollView, UILayout, UIPageView, and UIListView.

local addChild ( local  child)
virtual

Adds a child to the container.

Parameters
childA child widget

Reimplemented in UIScrollView, UILayout, UIPageView, and UIListView.

void addRenderer ( cocos2d::Node renderer,
int  zOrder 
)

Add a Node for rendering.

renderer is a Node, it's for drawing

Parameters
rendererA render node
zOrderZ order for drawing priority. Please refer to Node::setZOrder(int)
var addRenderer ( var  renderer,
var  zOrder 
)

Add a Node for rendering.

renderer is a Node, it's for drawing

Parameters
rendererA render node
zOrderZ order for drawing priority. Please refer to Node::setZOrder(int)
local addRenderer ( local  renderer,
local  zOrder 
)

Add a Node for rendering.

renderer is a Node, it's for drawing

Parameters
rendererA render node
zOrderZ order for drawing priority. Please refer to Node::setZOrder(int)
void addTouchEventListener ( cocos2d::Object target,
SEL_TouchEvent  selector 
)

Sets the touch event target/selector of the menu item.

var addTouchEventListener ( var  target,
var  selector 
)

Sets the touch event target/selector of the menu item.

local addTouchEventListener ( local  target,
local  selector 
)

Sets the touch event target/selector of the menu item.

void cancelUpEvent ( )
protected
var cancelUpEvent ( )
protected
local cancelUpEvent ( )
protected
virtual void checkChildInfo ( int  handleState,
UIWidget sender,
const cocos2d::Point touchPoint 
)
virtual

Reimplemented in UIScrollView, and UIPageView.

var checkChildInfo ( var  handleState,
var  sender,
var  touchPoint 
)
virtual

Reimplemented in UIScrollView, and UIPageView.

local checkChildInfo ( local  handleState,
local  sender,
local  touchPoint 
)
virtual

Reimplemented in UIScrollView, and UIPageView.

bool clippingParentAreaContainPoint ( const cocos2d::Point pt)
var clippingParentAreaContainPoint ( var  pt)
local
clippingParentAreaContainPoint
( local  pt)
UIWidget* clone ( )
var clone ( )
local clone ( )
cocos2d::Point convertToWorldSpace ( const cocos2d::Point pt)

Converts a Point to world space coordinates.

The result is in Points.

var convertToWorldSpace ( var  pt)

Converts a Point to world space coordinates.

The result is in Points.

local convertToWorldSpace ( local  pt)

Converts a Point to world space coordinates.

The result is in Points.

virtual void
copyClonedWidgetChildren
( UIWidget model)
protectedvirtual

Reimplemented in UIScrollView, UILayout, UIPageView, and UIListView.

var copyClonedWidgetChildren ( var  model)
protectedvirtual

Reimplemented in UIScrollView, UILayout, UIPageView, and UIListView.

local copyClonedWidgetChildren ( local  model)
protectedvirtual

Reimplemented in UIScrollView, UILayout, UIPageView, and UIListView.

void copyProperties ( UIWidget model)
protected
var copyProperties ( var  model)
protected
local copyProperties ( local  model)
protected
virtual void copySpecialProperties ( UIWidget model)
protectedvirtual
var copySpecialProperties ( var  model)
protectedvirtual
local copySpecialProperties ( local  model)
protectedvirtual
static UIWidget* create ( )
static

Allocates and initializes a widget.

var create ( )
static

Allocates and initializes a widget.

local create ( )
static

Allocates and initializes a widget.

virtual UIWidget*
createCloneInstance
( )
protectedvirtual
var createCloneInstance ( )
protectedvirtual
local createCloneInstance ( )
protectedvirtual
void didNotSelectSelf ( )

A call back function when widget lost of focus.

var didNotSelectSelf ( )

A call back function when widget lost of focus.

local didNotSelectSelf ( )

A call back function when widget lost of focus.

cocos2d::Action* getActionByTag ( int  tag)
var getActionByTag ( var  tag)
local getActionByTag ( local  tag)
virtual cocos2d::ActionManager*
getActionManager
( )
virtual
var getActionManager ( )
virtual
local getActionManager ( )
virtual
int getActionTag ( )
var getActionTag ( )
local getActionTag ( )
const cocos2d::Point&
getAnchorPoint
( )

Returns the anchor point in percent.

See Also
setAnchorPoint(const Point&)
Returns
The anchor point of widget.
var getAnchorPoint ( )

Returns the anchor point in percent.

See Also
setAnchorPoint(const Point&)
Returns
The anchor point of widget.
local getAnchorPoint ( )

Returns the anchor point in percent.

See Also
setAnchorPoint(const Point&)
Returns
The anchor point of widget.
float getBottomInParent ( )

Gets the bottom boundary position of this widget.

Returns
The bottom boundary position of this widget.
var getBottomInParent ( )

Gets the bottom boundary position of this widget.

Returns
The bottom boundary position of this widget.
local getBottomInParent ( )

Gets the bottom boundary position of this widget.

Returns
The bottom boundary position of this widget.
UIWidget* getChildByName ( const char *  name)

Gets a child from the container with its name.

Parameters
nameAn key to find the child widget.
Returns
a UIWidget object whose name equals to the input parameter
var getChildByName ( var  name)

Gets a child from the container with its name.

Parameters
nameAn key to find the child widget.
Returns
a UIWidget object whose name equals to the input parameter
local getChildByName ( local  name)

Gets a child from the container with its name.

Parameters
nameAn key to find the child widget.
Returns
a UIWidget object whose name equals to the input parameter
UIWidget* getChildByTag ( int  tag)

Gets a child from the container with its tag.

Parameters
tagAn identifier to find the child widget.
Returns
a UIWidget object whose tag equals to the input parameter
var getChildByTag ( var  tag)

Gets a child from the container with its tag.

Parameters
tagAn identifier to find the child widget.
Returns
a UIWidget object whose tag equals to the input parameter
local getChildByTag ( local  tag)

Gets a child from the container with its tag.

Parameters
tagAn identifier to find the child widget.
Returns
a UIWidget object whose tag equals to the input parameter
virtual cocos2d::Array* getChildren ( )
virtual

Return an array of children.

Composing a "tree" structure is a very important feature of UIWidget

Returns
An array of children

Reimplemented in UIScrollView, UIPageView, and UIListView.

var getChildren ( )
virtual

Return an array of children.

Composing a "tree" structure is a very important feature of UIWidget

Returns
An array of children

Reimplemented in UIScrollView, UIPageView, and UIListView.

local getChildren ( )
virtual

Return an array of children.

Composing a "tree" structure is a very important feature of UIWidget

Returns
An array of children

Reimplemented in UIScrollView, UIPageView, and UIListView.

virtual const cocos2d::Color3B&
getColor
( )
virtual

Gets color of widget.

Returns
color
var getColor ( )
virtual

Gets color of widget.

Returns
color
local getColor ( )
virtual

Gets color of widget.

Returns
color
virtual const cocos2d::Size&
getContentSize
( ) const
virtual

Gets the content size of widget.

Content size is widget's texture size.

Reimplemented in UISlider, UILayout, UICheckBox, UITextField, UIButton, UILabel, UIImageView, UILoadingBar, UILabelAtlas, and UILabelBMFont.

var getContentSize ( )
virtual

Gets the content size of widget.

Content size is widget's texture size.

Reimplemented in UISlider, UILayout, UICheckBox, UITextField, UIButton, UILabel, UIImageView, UILoadingBar, UILabelAtlas, and UILabelBMFont.

local getContentSize ( )
virtual

Gets the content size of widget.

Content size is widget's texture size.

Reimplemented in UISlider, UILayout, UICheckBox, UITextField, UIButton, UILabel, UIImageView, UILoadingBar, UILabelAtlas, and UILabelBMFont.

virtual const char* getDescription ( ) const
virtual
var getDescription ( )
virtual
local getDescription ( )
virtual
UILayoutParameter*
getLayoutParameter
( LayoutParameterType  type)

Gets LayoutParameter of widget.

See Also
LayoutParameter
Parameters
typeRelative or Linear
Returns
LayoutParameter
var getLayoutParameter ( var  type)

Gets LayoutParameter of widget.

See Also
LayoutParameter
Parameters
typeRelative or Linear
Returns
LayoutParameter
local getLayoutParameter ( local  type)

Gets LayoutParameter of widget.

See Also
LayoutParameter
Parameters
typeRelative or Linear
Returns
LayoutParameter
float getLeftInParent ( )

Gets the left boundary position of this widget.

Returns
The left boundary position of this widget.
var getLeftInParent ( )

Gets the left boundary position of this widget.

Returns
The left boundary position of this widget.
local getLeftInParent ( )

Gets the left boundary position of this widget.

Returns
The left boundary position of this widget.
const char* getName ( ) const

Returns a name that is used to identify the widget easily.

You can set tags to widget then identify them easily.

Returns
A const char* that identifies the widget.
var getName ( )

Returns a name that is used to identify the widget easily.

You can set tags to widget then identify them easily.

Returns
A const char* that identifies the widget.
local getName ( )

Returns a name that is used to identify the widget easily.

You can set tags to widget then identify them easily.

Returns
A const char* that identifies the widget.
virtual int getOpacity ( )
virtual

Gets opacity of widget.

Returns
opacity
var getOpacity ( )
virtual

Gets opacity of widget.

Returns
opacity
local getOpacity ( )
virtual

Gets opacity of widget.

Returns
opacity
UIWidget* getParent ( )

Returns a pointer to the parent widget.

See Also
setParent(UIWidget*)
Returns
A pointer to the parnet widget
var getParent ( )

Returns a pointer to the parent widget.

See Also
setParent(UIWidget*)
Returns
A pointer to the parnet widget
local getParent ( )

Returns a pointer to the parent widget.

See Also
setParent(UIWidget*)
Returns
A pointer to the parnet widget
const cocos2d::Point& getPosition ( )

Gets the position (x,y) of the widget in OpenGL coordinates.

See Also
setPosition(const Point&)
Returns
The position (x,y) of the widget in OpenGL coordinates
var getPosition ( )

Gets the position (x,y) of the widget in OpenGL coordinates.

See Also
setPosition(const Point&)
Returns
The position (x,y) of the widget in OpenGL coordinates
local getPosition ( )

Gets the position (x,y) of the widget in OpenGL coordinates.

See Also
setPosition(const Point&)
Returns
The position (x,y) of the widget in OpenGL coordinates
const cocos2d::Point&
getPositionPercent
( )

Gets the percent (x,y) of the widget in OpenGL coordinates.

See Also
setPosition(const Point&)
Returns
The percent (x,y) of the widget in OpenGL coordinates
var getPositionPercent ( )

Gets the percent (x,y) of the widget in OpenGL coordinates.

See Also
setPosition(const Point&)
Returns
The percent (x,y) of the widget in OpenGL coordinates
local getPositionPercent ( )

Gets the percent (x,y) of the widget in OpenGL coordinates.

See Also
setPosition(const Point&)
Returns
The percent (x,y) of the widget in OpenGL coordinates
PositionType getPositionType ( ) const

Gets the position type of the widget.

See Also
PositionType
Returns
type the position type of widget
var getPositionType ( )

Gets the position type of the widget.

See Also
PositionType
Returns
type the position type of widget
local getPositionType ( )

Gets the position type of the widget.

See Also
PositionType
Returns
type the position type of widget
cocos2d::Node* getRenderer ( )

Gets the renderer of widget.

renderer is a Node, it's for drawing

Returns
a Node object
var getRenderer ( )

Gets the renderer of widget.

renderer is a Node, it's for drawing

Returns
a Node object
local getRenderer ( )

Gets the renderer of widget.

renderer is a Node, it's for drawing

Returns
a Node object
float getRightInParent ( )

Gets the right boundary position of this widget.

Returns
The right boundary position of this widget.
var getRightInParent ( )

Gets the right boundary position of this widget.

Returns
The right boundary position of this widget.
local getRightInParent ( )

Gets the right boundary position of this widget.

Returns
The right boundary position of this widget.
float getRotation ( )

Returns the rotation of the widget in degrees.

See Also
setRotation(float)
Returns
The rotation of the widget in degrees.
var getRotation ( )

Returns the rotation of the widget in degrees.

See Also
setRotation(float)
Returns
The rotation of the widget in degrees.
local getRotation ( )

Returns the rotation of the widget in degrees.

See Also
setRotation(float)
Returns
The rotation of the widget in degrees.
float getRotationX ( )

Gets the X rotation (angle) of the widget in degrees which performs a horizontal rotation skew.

See Also
setRotationX(float)
Returns
The X rotation in degrees.
var getRotationX ( )

Gets the X rotation (angle) of the widget in degrees which performs a horizontal rotation skew.

See Also
setRotationX(float)
Returns
The X rotation in degrees.
local getRotationX ( )

Gets the X rotation (angle) of the widget in degrees which performs a horizontal rotation skew.

See Also
setRotationX(float)
Returns
The X rotation in degrees.
float getRotationY ( )

Gets the Y rotation (angle) of the widget in degrees which performs a vertical rotational skew.

See Also
setRotationY(float)
Returns
The Y rotation in degrees.
var getRotationY ( )

Gets the Y rotation (angle) of the widget in degrees which performs a vertical rotational skew.

See Also
setRotationY(float)
Returns
The Y rotation in degrees.
local getRotationY ( )

Gets the Y rotation (angle) of the widget in degrees which performs a vertical rotational skew.

See Also
setRotationY(float)
Returns
The Y rotation in degrees.
float getScale ( )

Gets the scale factor of the widget, when X and Y have the same scale factor.

Warning
Assert when m_fScaleX != m_fScaleY.
See Also
setScale(float)
Returns
The scale factor of the widget.
var getScale ( )

Gets the scale factor of the widget, when X and Y have the same scale factor.

Warning
Assert when m_fScaleX != m_fScaleY.
See Also
setScale(float)
Returns
The scale factor of the widget.
local getScale ( )

Gets the scale factor of the widget, when X and Y have the same scale factor.

Warning
Assert when m_fScaleX != m_fScaleY.
See Also
setScale(float)
Returns
The scale factor of the widget.
float getScaleX ( )

Returns the scale factor on X axis of this widget.

See Also
setScaleX(float)
Returns
The scale factor on X axis.
var getScaleX ( )

Returns the scale factor on X axis of this widget.

See Also
setScaleX(float)
Returns
The scale factor on X axis.
local getScaleX ( )

Returns the scale factor on X axis of this widget.

See Also
setScaleX(float)
Returns
The scale factor on X axis.
float getScaleY ( )

Returns the scale factor on Y axis of this widget.

See Also
setScaleY(float)
Returns
The scale factor on Y axis.
var getScaleY ( )

Returns the scale factor on Y axis of this widget.

See Also
setScaleY(float)
Returns
The scale factor on Y axis.
local getScaleY ( )

Returns the scale factor on Y axis of this widget.

See Also
setScaleY(float)
Returns
The scale factor on Y axis.
const cocos2d::Size& getSize ( ) const

Returns size of widget.

Returns
size
var getSize ( )

Returns size of widget.

Returns
size
local getSize ( )

Returns size of widget.

Returns
size
const cocos2d::Point&
getSizePercent
( ) const

Returns size percent of widget.

Returns
size percent
var getSizePercent ( )

Returns size percent of widget.

Returns
size percent
local getSizePercent ( )

Returns size percent of widget.

Returns
size percent
SizeType getSizeType ( ) const

Gets the size type of widget.

See Also
SizeType
Parameters
typethat is widget's size type
var getSizeType ( )

Gets the size type of widget.

See Also
SizeType
Parameters
typethat is widget's size type
local getSizeType ( )

Gets the size type of widget.

See Also
SizeType
Parameters
typethat is widget's size type
int getTag ( ) const

Returns a tag that is used to identify the widget easily.

You can set tags to widget then identify them easily.

Returns
A interger that identifies the widget.
var getTag ( )

Returns a tag that is used to identify the widget easily.

You can set tags to widget then identify them easily.

Returns
A interger that identifies the widget.
local getTag ( )

Returns a tag that is used to identify the widget easily.

You can set tags to widget then identify them easily.

Returns
A interger that identifies the widget.
float getTopInParent ( )

Gets the top boundary position of this widget.

Returns
The top boundary position of this widget.
var getTopInParent ( )

Gets the top boundary position of this widget.

Returns
The top boundary position of this widget.
local getTopInParent ( )

Gets the top boundary position of this widget.

Returns
The top boundary position of this widget.
const cocos2d::Point&
getTouchEndPos
( )
var getTouchEndPos ( )
local getTouchEndPos ( )
const cocos2d::Point&
getTouchMovePos
( )
var getTouchMovePos ( )
local getTouchMovePos ( )
const cocos2d::Point&
getTouchStartPos
( )
var getTouchStartPos ( )
local getTouchStartPos ( )
virtual Object* getUserObject ( )
inlinevirtual
virtual const Object* getUserObject ( ) const
inlinevirtual
virtual cocos2d::Node*
getVirtualRenderer
( )
virtual

Gets the Virtual Renderer of widget.

For example, a button's Virtual Renderer is it's texture renderer.

Returns
Node pointer.

Reimplemented in UISlider, UICheckBox, UIButton, UITextField, UILabel, UIImageView, UILoadingBar, UILabelAtlas, and UILabelBMFont.

var getVirtualRenderer ( )
virtual

Gets the Virtual Renderer of widget.

For example, a button's Virtual Renderer is it's texture renderer.

Returns
Node pointer.

Reimplemented in UISlider, UICheckBox, UIButton, UITextField, UILabel, UIImageView, UILoadingBar, UILabelAtlas, and UILabelBMFont.

local getVirtualRenderer ( )
virtual

Gets the Virtual Renderer of widget.

For example, a button's Virtual Renderer is it's texture renderer.

Returns
Node pointer.

Reimplemented in UISlider, UICheckBox, UIButton, UITextField, UILabel, UIImageView, UILoadingBar, UILabelAtlas, and UILabelBMFont.

WidgetType getWidgetType ( ) const

Returns a type that is widget's type.

See Also
WidgetType
Returns
A WidgetType
var getWidgetType ( )

Returns a type that is widget's type.

See Also
WidgetType
Returns
A WidgetType
local getWidgetType ( )

Returns a type that is widget's type.

See Also
WidgetType
Returns
A WidgetType
cocos2d::Point getWorldPosition ( )

Gets world position of widget.

Returns
world position of widget.
var getWorldPosition ( )

Gets world position of widget.

Returns
world position of widget.
local getWorldPosition ( )

Gets world position of widget.

Returns
world position of widget.
int getZOrder ( )

Gets the Z order of this widget.

See Also
setZOrder(int)
Returns
The Z order.
var getZOrder ( )

Gets the Z order of this widget.

See Also
setZOrder(int)
Returns
The Z order.
local getZOrder ( )

Gets the Z order of this widget.

See Also
setZOrder(int)
Returns
The Z order.
virtual bool hitTest ( const cocos2d::Point pt)
virtual

Checks a point if is in widget's space.

Parameters
point
Returns
true if the point is in widget's space, flase otherwise.

Reimplemented in UILayout.

var hitTest ( var  pt)
virtual

Checks a point if is in widget's space.

Parameters
point
Returns
true if the point is in widget's space, flase otherwise.

Reimplemented in UILayout.

local hitTest ( local  pt)
virtual

Checks a point if is in widget's space.

Parameters
point
Returns
true if the point is in widget's space, flase otherwise.

Reimplemented in UILayout.

virtual void
ignoreContentAdaptWithSize
( bool  ignore)
virtual

Ignore the widget size.

Parameters
ignore,truethat widget will ignore it's size, use texture size, false otherwise. Default value is true.

Reimplemented in UISlider, UIButton, UILoadingBar, and UIImageView.

var ignoreContentAdaptWithSize ( var  ignore)
virtual

Ignore the widget size.

Parameters
ignore,truethat widget will ignore it's size, use texture size, false otherwise. Default value is true.

Reimplemented in UISlider, UIButton, UILoadingBar, and UIImageView.

local ignoreContentAdaptWithSize ( local  ignore)
virtual

Ignore the widget size.

Parameters
ignore,truethat widget will ignore it's size, use texture size, false otherwise. Default value is true.

Reimplemented in UISlider, UIButton, UILoadingBar, and UIImageView.

virtual bool init ( )
protectedvirtual
var init ( )
protectedvirtual
local init ( )
protectedvirtual
virtual void initRenderer ( )
protectedvirtual
var initRenderer ( )
protectedvirtual
local initRenderer ( )
protectedvirtual
bool isBright ( ) const

Determines if the widget is bright.

Returns
true if the widget is bright, false if the widget is dark.
var isBright ( )

Determines if the widget is bright.

Returns
true if the widget is bright, false if the widget is dark.
local isBright ( )

Determines if the widget is bright.

Returns
true if the widget is bright, false if the widget is dark.
virtual bool isCascadeColorEnabled ( )
virtual
var isCascadeColorEnabled ( )
virtual
local isCascadeColorEnabled ( )
virtual
virtual bool
isCascadeOpacityEnabled
( )
virtual
var isCascadeOpacityEnabled ( )
virtual
local isCascadeOpacityEnabled ( )
virtual
bool isEnabled ( ) const

Determines if the widget is enabled.

Returns
true if the widget is enabled, false if the widget is disabled.
var isEnabled ( )

Determines if the widget is enabled.

Returns
true if the widget is enabled, false if the widget is disabled.
local isEnabled ( )

Determines if the widget is enabled.

Returns
true if the widget is enabled, false if the widget is disabled.
virtual bool isFlipX ( )
inlinevirtual

Returns the flag which indicates whether the widget is flipped horizontally or not.

It only flips the texture of the widget, and not the texture of the widget's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: widget->setScaleX(sprite->getScaleX() * -1);

Returns
true if the widget is flipped horizaontally, false otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

var isFlipX ( )
inlinevirtual

Returns the flag which indicates whether the widget is flipped horizontally or not.

It only flips the texture of the widget, and not the texture of the widget's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: widget->setScaleX(sprite->getScaleX() * -1);

Returns
true if the widget is flipped horizaontally, false otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

local isFlipX ( )
inlinevirtual

Returns the flag which indicates whether the widget is flipped horizontally or not.

It only flips the texture of the widget, and not the texture of the widget's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: widget->setScaleX(sprite->getScaleX() * -1);

Returns
true if the widget is flipped horizaontally, false otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

virtual bool isFlipY ( )
inlinevirtual

Return the flag which indicates whether the widget is flipped vertically or not.

It only flips the texture of the widget, and not the texture of the widget's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: widget->setScaleY(widget->getScaleY() * -1);

Returns
true if the widget is flipped vertically, flase otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

var isFlipY ( )
inlinevirtual

Return the flag which indicates whether the widget is flipped vertically or not.

It only flips the texture of the widget, and not the texture of the widget's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: widget->setScaleY(widget->getScaleY() * -1);

Returns
true if the widget is flipped vertically, flase otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

local isFlipY ( )
inlinevirtual

Return the flag which indicates whether the widget is flipped vertically or not.

It only flips the texture of the widget, and not the texture of the widget's children. Also, flipping the texture doesn't alter the anchorPoint. If you want to flip the anchorPoint too, and/or to flip the children too use: widget->setScaleY(widget->getScaleY() * -1);

Returns
true if the widget is flipped vertically, flase otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

bool isFocused ( ) const

Determines if the widget is on focused.

Returns
true if the widget is on focused, false if the widget is not on focused.
var isFocused ( )

Determines if the widget is on focused.

Returns
true if the widget is on focused, false if the widget is not on focused.
local isFocused ( )

Determines if the widget is on focused.

Returns
true if the widget is on focused, false if the widget is not on focused.
bool isIgnoreContentAdaptWithSize ( ) const

Gets the widget if is ignore it's size.

Parameters
ignore,truethat widget will ignore it's size, use texture size, false otherwise. Default value is true.
var isIgnoreContentAdaptWithSize ( )

Gets the widget if is ignore it's size.

Parameters
ignore,truethat widget will ignore it's size, use texture size, false otherwise. Default value is true.
local isIgnoreContentAdaptWithSize ( )

Gets the widget if is ignore it's size.

Parameters
ignore,truethat widget will ignore it's size, use texture size, false otherwise. Default value is true.
bool isTouchEnabled ( ) const

Determines if the widget is touch enabled.

Returns
true if the widget is touch enabled, false if the widget is touch disabled.
var isTouchEnabled ( )

Determines if the widget is touch enabled.

Returns
true if the widget is touch enabled, false if the widget is touch disabled.
local isTouchEnabled ( )

Determines if the widget is touch enabled.

Returns
true if the widget is touch enabled, false if the widget is touch disabled.
bool isUpdateEnabled ( )

is the "update" method scheduled.

var isUpdateEnabled ( )

is the "update" method scheduled.

local isUpdateEnabled ( )

is the "update" method scheduled.

bool isVisible ( ) const

Determines if the widget is visible.

Returns
true if the widget is visible, false if the widget is hidden.
var isVisible ( )

Determines if the widget is visible.

Returns
true if the widget is visible, false if the widget is hidden.
local isVisible ( )

Determines if the widget is visible.

Returns
true if the widget is visible, false if the widget is hidden.
void longClickEvent ( )
protected
var longClickEvent ( )
protected
local longClickEvent ( )
protected
void moveEvent ( )
protected
var moveEvent ( )
protected
local moveEvent ( )
protected
virtual void onEnter ( )
virtual
virtual void onExit ( )
virtual
virtual void
onPressStateChangedToDisabled
( )
protectedvirtual

Reimplemented in UISlider, UIButton, UICheckBox, and UILabel.

var onPressStateChangedToDisabled ( )
protectedvirtual

Reimplemented in UISlider, UIButton, UICheckBox, and UILabel.

local onPressStateChangedToDisabled ( )
protectedvirtual

Reimplemented in UISlider, UIButton, UICheckBox, and UILabel.

virtual void
onPressStateChangedToNormal
( )
protectedvirtual

Reimplemented in UISlider, UIButton, UICheckBox, and UILabel.

var onPressStateChangedToNormal ( )
protectedvirtual

Reimplemented in UISlider, UIButton, UICheckBox, and UILabel.

local onPressStateChangedToNormal ( )
protectedvirtual

Reimplemented in UISlider, UIButton, UICheckBox, and UILabel.

virtual void
onPressStateChangedToPressed
( )
protectedvirtual

Reimplemented in UISlider, UIButton, UICheckBox, and UILabel.

var onPressStateChangedToPressed ( )
protectedvirtual

Reimplemented in UISlider, UIButton, UICheckBox, and UILabel.

local onPressStateChangedToPressed ( )
protectedvirtual

Reimplemented in UISlider, UIButton, UICheckBox, and UILabel.

virtual void onSizeChanged ( )
protectedvirtual
local onSizeChanged ( )
protectedvirtual
virtual bool onTouchBegan ( const cocos2d::Point touchPoint)
virtual

A call back function called when widget is selected, and on touch began.

Parameters
touchpoint
Returns
true if the event should be pass to parent, flase otherwise.

Reimplemented in UIScrollView, UISlider, UIPageView, UITextField, and UIImageView.

var onTouchBegan ( var  touchPoint)
virtual

A call back function called when widget is selected, and on touch began.

Parameters
touchpoint
Returns
true if the event should be pass to parent, flase otherwise.

Reimplemented in UIScrollView, UISlider, UIPageView, UITextField, and UIImageView.

local onTouchBegan ( local  touchPoint)
virtual

A call back function called when widget is selected, and on touch began.

Parameters
touchpoint
Returns
true if the event should be pass to parent, flase otherwise.

Reimplemented in UIScrollView, UISlider, UIPageView, UITextField, and UIImageView.

virtual void onTouchCancelled ( const cocos2d::Point touchPoint)
virtual

A call back function called when widget is selected, and on touch canceled.

Parameters
touchpoint

Reimplemented in UIScrollView, UISlider, and UIPageView.

var onTouchCancelled ( var  touchPoint)
virtual

A call back function called when widget is selected, and on touch canceled.

Parameters
touchpoint

Reimplemented in UIScrollView, UISlider, and UIPageView.

local onTouchCancelled ( local  touchPoint)
virtual

A call back function called when widget is selected, and on touch canceled.

Parameters
touchpoint

Reimplemented in UIScrollView, UISlider, and UIPageView.

virtual void onTouchEnded ( const cocos2d::Point touchPoint)
virtual

A call back function called when widget is selected, and on touch ended.

Parameters
touchpoint

Reimplemented in UIScrollView, UISlider, UICheckBox, UIPageView, and UIImageView.

var onTouchEnded ( var  touchPoint)
virtual

A call back function called when widget is selected, and on touch ended.

Parameters
touchpoint

Reimplemented in UIScrollView, UISlider, UICheckBox, UIPageView, and UIImageView.

local onTouchEnded ( local  touchPoint)
virtual

A call back function called when widget is selected, and on touch ended.

Parameters
touchpoint

Reimplemented in UIScrollView, UISlider, UICheckBox, UIPageView, and UIImageView.

virtual void onTouchLongClicked ( const cocos2d::Point touchPoint)
virtual

A call back function called when widget is selected, and on touch long clicked.

Parameters
touchpoint

Reimplemented in UIScrollView.

var onTouchLongClicked ( var  touchPoint)
virtual

A call back function called when widget is selected, and on touch long clicked.

Parameters
touchpoint

Reimplemented in UIScrollView.

local onTouchLongClicked ( local  touchPoint)
virtual

A call back function called when widget is selected, and on touch long clicked.

Parameters
touchpoint

Reimplemented in UIScrollView.

virtual void onTouchMoved ( const cocos2d::Point touchPoint)
virtual

A call back function called when widget is selected, and on touch moved.

Parameters
touchpoint

Reimplemented in UIScrollView, UISlider, and UIPageView.

var onTouchMoved ( var  touchPoint)
virtual

A call back function called when widget is selected, and on touch moved.

Parameters
touchpoint

Reimplemented in UIScrollView, UISlider, and UIPageView.

local onTouchMoved ( local  touchPoint)
virtual

A call back function called when widget is selected, and on touch moved.

Parameters
touchpoint

Reimplemented in UIScrollView, UISlider, and UIPageView.

void pushDownEvent ( )
protected
var pushDownEvent ( )
protected
local pushDownEvent ( )
protected
void releaseUpEvent ( )
protected
var releaseUpEvent ( )
protected
local releaseUpEvent ( )
protected
virtual void removeAllChildren ( )
virtual

Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.

Reimplemented in UIScrollView, UIPageView, and UIListView.

var removeAllChildren ( )
virtual

Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.

Reimplemented in UIScrollView, UIPageView, and UIListView.

local removeAllChildren ( )
virtual

Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter.

Reimplemented in UIScrollView, UIPageView, and UIListView.

virtual bool removeChild ( UIWidget child)
virtual

Removes a child from the container with a cleanup.

Parameters
childThe child widget which will be removed.
Returns
the result of removing, succeeded or failed.

Reimplemented in UIScrollView, UIPageView, and UIListView.

var removeChild ( var  child)
virtual

Removes a child from the container with a cleanup.

Parameters
childThe child widget which will be removed.
Returns
the result of removing, succeeded or failed.

Reimplemented in UIScrollView, UIPageView, and UIListView.

local removeChild ( local  child)
virtual

Removes a child from the container with a cleanup.

Parameters
childThe child widget which will be removed.
Returns
the result of removing, succeeded or failed.

Reimplemented in UIScrollView, UIPageView, and UIListView.

virtual void removeFromParent ( )
virtual

Removes this widget itself from its parent widget.

If the widget orphan, then it will destroy itself.

var removeFromParent ( )
virtual

Removes this widget itself from its parent widget.

If the widget orphan, then it will destroy itself.

local removeFromParent ( )
virtual

Removes this widget itself from its parent widget.

If the widget orphan, then it will destroy itself.

void removeRenderer ( cocos2d::Node renderer,
bool  cleanup 
)

Remove a Node from widget.

renderer is a Node, it's for drawing

Parameters
rendererA render node which needs to be removed
cleanuptrue if all running actions and callbacks on the render node will be cleanup, false otherwise.
var removeRenderer ( var  renderer,
var  cleanup 
)

Remove a Node from widget.

renderer is a Node, it's for drawing

Parameters
rendererA render node which needs to be removed
cleanuptrue if all running actions and callbacks on the render node will be cleanup, false otherwise.
local removeRenderer ( local  renderer,
local  cleanup 
)

Remove a Node from widget.

renderer is a Node, it's for drawing

Parameters
rendererA render node which needs to be removed
cleanuptrue if all running actions and callbacks on the render node will be cleanup, false otherwise.
virtual void reorderChild ( UIWidget child)
virtual

Reorders a child according to a new z value.

Parameters
childAn already added child node. It MUST be already added.
zOrderZ order for drawing priority and touched priority. Please refer to setZOrder(int)
var reorderChild ( var  child)
virtual

Reorders a child according to a new z value.

Parameters
childAn already added child node. It MUST be already added.
zOrderZ order for drawing priority and touched priority. Please refer to setZOrder(int)
local reorderChild ( local  child)
virtual

Reorders a child according to a new z value.

Parameters
childAn already added child node. It MUST be already added.
zOrderZ order for drawing priority and touched priority. Please refer to setZOrder(int)
cocos2d::Action* runAction ( cocos2d::Action action)
var runAction ( var  action)
local runAction ( local  action)
virtual void setActionManager ( cocos2d::ActionManager actionManager)
virtual
var setActionManager ( var  actionManager)
virtual
local setActionManager ( local  actionManager)
virtual
void setActionTag ( int  tag)
var setActionTag ( var  tag)
local setActionTag ( local  tag)
virtual void setAnchorPoint ( const cocos2d::Point pt)
virtual

Sets the anchor point in percent.

anchorPoint is the point around which all transformations and positioning manipulations take place. It's like a pin in the widget where it is "attached" to its parent. The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. But you can use values higher than (1,1) and lower than (0,0) too. The default anchorPoint is (0.5,0.5), so it starts in the center of the widget.

Parameters
anchorPointThe anchor point of widget.

Reimplemented in UITextField, UILabel, UICheckBox, UIButton, UIImageView, UILabelAtlas, and UILabelBMFont.

var setAnchorPoint ( var  pt)
virtual

Sets the anchor point in percent.

anchorPoint is the point around which all transformations and positioning manipulations take place. It's like a pin in the widget where it is "attached" to its parent. The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. But you can use values higher than (1,1) and lower than (0,0) too. The default anchorPoint is (0.5,0.5), so it starts in the center of the widget.

Parameters
anchorPointThe anchor point of widget.

Reimplemented in UITextField, UILabel, UICheckBox, UIButton, UIImageView, UILabelAtlas, and UILabelBMFont.

local setAnchorPoint ( local  pt)
virtual

Sets the anchor point in percent.

anchorPoint is the point around which all transformations and positioning manipulations take place. It's like a pin in the widget where it is "attached" to its parent. The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. But you can use values higher than (1,1) and lower than (0,0) too. The default anchorPoint is (0.5,0.5), so it starts in the center of the widget.

Parameters
anchorPointThe anchor point of widget.

Reimplemented in UITextField, UILabel, UICheckBox, UIButton, UIImageView, UILabelAtlas, and UILabelBMFont.

void setBlendFunc ( cocos2d::BlendFunc  blendFunc)
void setBright ( bool  bright)

Sets whether the widget is bright.

The default value is true, a widget is default to bright

Parameters
visibletrue if the widget is bright, false if the widget is dark.
var setBright ( var  bright)

Sets whether the widget is bright.

The default value is true, a widget is default to bright

Parameters
visibletrue if the widget is bright, false if the widget is dark.
local setBright ( local  bright)

Sets whether the widget is bright.

The default value is true, a widget is default to bright

Parameters
visibletrue if the widget is bright, false if the widget is dark.
void setBrightStyle ( BrightStyle  style)

To set the bright style of widget.

See Also
BrightStyle
Parameters
styleBRIGHT_NORMAL the widget is normal state, BRIGHT_HIGHLIGHT the widget is height light state.
var setBrightStyle ( var  style)

To set the bright style of widget.

See Also
BrightStyle
Parameters
styleBRIGHT_NORMAL the widget is normal state, BRIGHT_HIGHLIGHT the widget is height light state.
local setBrightStyle ( local  style)

To set the bright style of widget.

See Also
BrightStyle
Parameters
styleBRIGHT_NORMAL the widget is normal state, BRIGHT_HIGHLIGHT the widget is height light state.
virtual void setCascadeColorEnabled ( bool  cascadeColorEnabled)
virtual
var setCascadeColorEnabled ( var  cascadeColorEnabled)
virtual
local setCascadeColorEnabled ( local  cascadeColorEnabled)
virtual
virtual void
setCascadeOpacityEnabled
( bool  cascadeOpacityEnabled)
virtual
var setCascadeOpacityEnabled ( var  cascadeOpacityEnabled)
virtual
local setCascadeOpacityEnabled ( local  cascadeOpacityEnabled)
virtual
virtual void setColor ( const cocos2d::Color3B color)
virtual

Sets color to widget.

It default change the color of widget's children.

Parameters
color

Reimplemented in UIButton, UITextField, and UILayout.

var setColor ( var  color)
virtual

Sets color to widget.

It default change the color of widget's children.

Parameters
color

Reimplemented in UIButton, UITextField, and UILayout.

local setColor ( local  color)
virtual

Sets color to widget.

It default change the color of widget's children.

Parameters
color

Reimplemented in UIButton, UITextField, and UILayout.

virtual void setEnabled ( bool  enabled)
virtual

Sets whether the widget is enabled.

Highest control of widget. The default value is true, a widget is default to enabled

Parameters
enabledtrue if the widget is enabled, widget may be touched and visible, false if the widget is disabled, widget cannot be touched and hidden.
var setEnabled ( var  enabled)
virtual

Sets whether the widget is enabled.

Highest control of widget. The default value is true, a widget is default to enabled

Parameters
enabledtrue if the widget is enabled, widget may be touched and visible, false if the widget is disabled, widget cannot be touched and hidden.
local setEnabled ( local  enabled)
virtual

Sets whether the widget is enabled.

Highest control of widget. The default value is true, a widget is default to enabled

Parameters
enabledtrue if the widget is enabled, widget may be touched and visible, false if the widget is disabled, widget cannot be touched and hidden.
virtual void setFlipX ( bool  flipX)
inlinevirtual

Sets whether the widget should be flipped horizontally or not.

Parameters
bFlipXtrue if the widget should be flipped horizaontally, false otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

var setFlipX ( var  flipX)
inlinevirtual

Sets whether the widget should be flipped horizontally or not.

Parameters
bFlipXtrue if the widget should be flipped horizaontally, false otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

local setFlipX ( local  flipX)
inlinevirtual

Sets whether the widget should be flipped horizontally or not.

Parameters
bFlipXtrue if the widget should be flipped horizaontally, false otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

virtual void setFlipY ( bool  flipY)
inlinevirtual

Sets whether the widget should be flipped vertically or not.

Parameters
bFlipYtrue if the widget should be flipped vertically, flase otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

var setFlipY ( var  flipY)
inlinevirtual

Sets whether the widget should be flipped vertically or not.

Parameters
bFlipYtrue if the widget should be flipped vertically, flase otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

local setFlipY ( local  flipY)
inlinevirtual

Sets whether the widget should be flipped vertically or not.

Parameters
bFlipYtrue if the widget should be flipped vertically, flase otherwise.

Reimplemented in UICheckBox, UIButton, UILabel, and UIImageView.

void setFocused ( bool  fucosed)

Sets whether the widget is on focused.

The default value is false, a widget is default to not on focused

Parameters
fucosedtrue if the widget is on focused, false if the widget is not on focused.
var setFocused ( var  fucosed)

Sets whether the widget is on focused.

The default value is false, a widget is default to not on focused

Parameters
fucosedtrue if the widget is on focused, false if the widget is not on focused.
local setFocused ( local  fucosed)

Sets whether the widget is on focused.

The default value is false, a widget is default to not on focused

Parameters
fucosedtrue if the widget is on focused, false if the widget is not on focused.
void setLayoutParameter ( UILayoutParameter parameter)

Sets a LayoutParameter to widget.

See Also
LayoutParameter
Parameters
LayoutParameterpointer
typeRelative or Linear
var setLayoutParameter ( var  parameter)

Sets a LayoutParameter to widget.

See Also
LayoutParameter
Parameters
LayoutParameterpointer
typeRelative or Linear
local setLayoutParameter ( local  parameter)

Sets a LayoutParameter to widget.

See Also
LayoutParameter
Parameters
LayoutParameterpointer
typeRelative or Linear
void setName ( const char *  name)

Changes the name that is used to identify the widget easily.

Parameters
Aconst char* that indentifies the widget.
var setName ( var  name)

Changes the name that is used to identify the widget easily.

Parameters
Aconst char* that indentifies the widget.
local setName ( local  name)

Changes the name that is used to identify the widget easily.

Parameters
Aconst char* that indentifies the widget.
virtual void setOpacity ( int  opacity)
virtual

Sets opacity to widget.

It default change the opacity of widget's children.

Parameters
color

Reimplemented in UITextField, and UILayout.

var setOpacity ( var  opacity)
virtual

Sets opacity to widget.

It default change the opacity of widget's children.

Parameters
color

Reimplemented in UITextField, and UILayout.

local setOpacity ( local  opacity)
virtual

Sets opacity to widget.

It default change the opacity of widget's children.

Parameters
color

Reimplemented in UITextField, and UILayout.

void setParent ( UIWidget parent)

Sets the parent widget.

Parameters
parentA pointer to the parnet widget
var setParent ( var  parent)

Sets the parent widget.

Parameters
parentA pointer to the parnet widget
local setParent ( local  parent)

Sets the parent widget.

Parameters
parentA pointer to the parnet widget
void setPosition ( const cocos2d::Point pos)

Changes the position (x,y) of the widget in OpenGL coordinates.

Usually we use p(x,y) to compose Point object. The original point (0,0) is at the left-bottom corner of screen.

Parameters
positionThe position (x,y) of the widget in OpenGL coordinates
var setPosition ( var  pos)

Changes the position (x,y) of the widget in OpenGL coordinates.

Usually we use p(x,y) to compose Point object. The original point (0,0) is at the left-bottom corner of screen.

Parameters
positionThe position (x,y) of the widget in OpenGL coordinates
local setPosition ( local  pos)

Changes the position (x,y) of the widget in OpenGL coordinates.

Usually we use p(x,y) to compose Point object. The original point (0,0) is at the left-bottom corner of screen.

Parameters
positionThe position (x,y) of the widget in OpenGL coordinates
void setPositionPercent ( const cocos2d::Point percent)

Changes the position (x,y) of the widget in OpenGL coordinates.

Usually we use p(x,y) to compose Point object. The original point (0,0) is at the left-bottom corner of screen.

Parameters
percentThe percent (x,y) of the widget in OpenGL coordinates
var setPositionPercent ( var  percent)

Changes the position (x,y) of the widget in OpenGL coordinates.

Usually we use p(x,y) to compose Point object. The original point (0,0) is at the left-bottom corner of screen.

Parameters
percentThe percent (x,y) of the widget in OpenGL coordinates
local setPositionPercent ( local  percent)

Changes the position (x,y) of the widget in OpenGL coordinates.

Usually we use p(x,y) to compose Point object. The original point (0,0) is at the left-bottom corner of screen.

Parameters
percentThe percent (x,y) of the widget in OpenGL coordinates
void setPositionType ( PositionType  type)

Changes the position type of the widget.

See Also
PositionType
Parameters
typethe position type of widget
var setPositionType ( var  type)

Changes the position type of the widget.

See Also
PositionType
Parameters
typethe position type of widget
local setPositionType ( local  type)

Changes the position type of the widget.

See Also
PositionType
Parameters
typethe position type of widget
void setRotation ( float  rotation)

Sets the rotation (angle) of the widget in degrees.

0 is the default rotation angle. Positive values rotate widget clockwise, and negative values for anti-clockwise.

Parameters
fRotationThe roration of the widget in degrees.
var setRotation ( var  rotation)

Sets the rotation (angle) of the widget in degrees.

0 is the default rotation angle. Positive values rotate widget clockwise, and negative values for anti-clockwise.

Parameters
fRotationThe roration of the widget in degrees.
local setRotation ( local  rotation)

Sets the rotation (angle) of the widget in degrees.

0 is the default rotation angle. Positive values rotate widget clockwise, and negative values for anti-clockwise.

Parameters
fRotationThe roration of the widget in degrees.
void setRotationX ( float  rotationX)

Sets the X rotation (angle) of the widget in degrees which performs a horizontal rotational skew.

0 is the default rotation angle. Positive values rotate widget clockwise, and negative values for anti-clockwise.

Parameters
fRotationXThe X rotation in degrees which performs a horizontal rotational skew.
var setRotationX ( var  rotationX)

Sets the X rotation (angle) of the widget in degrees which performs a horizontal rotational skew.

0 is the default rotation angle. Positive values rotate widget clockwise, and negative values for anti-clockwise.

Parameters
fRotationXThe X rotation in degrees which performs a horizontal rotational skew.
local setRotationX ( local  rotationX)

Sets the X rotation (angle) of the widget in degrees which performs a horizontal rotational skew.

0 is the default rotation angle. Positive values rotate widget clockwise, and negative values for anti-clockwise.

Parameters
fRotationXThe X rotation in degrees which performs a horizontal rotational skew.
void setRotationY ( float  rotationY)

Sets the Y rotation (angle) of the widget in degrees which performs a vertical rotational skew.

0 is the default rotation angle. Positive values rotate widget clockwise, and negative values for anti-clockwise.

Parameters
fRotationYThe Y rotation in degrees.
var setRotationY ( var  rotationY)

Sets the Y rotation (angle) of the widget in degrees which performs a vertical rotational skew.

0 is the default rotation angle. Positive values rotate widget clockwise, and negative values for anti-clockwise.

Parameters
fRotationYThe Y rotation in degrees.
local setRotationY ( local  rotationY)

Sets the Y rotation (angle) of the widget in degrees which performs a vertical rotational skew.

0 is the default rotation angle. Positive values rotate widget clockwise, and negative values for anti-clockwise.

Parameters
fRotationYThe Y rotation in degrees.
virtual void setScale ( float  fScale)
virtual

Changes both X and Y scale factor of the widget.

1.0 is the default scale factor. It modifies the X and Y scale at the same time.

Parameters
scaleThe scale factor for both X and Y axis.

Reimplemented in UILabel.

var setScale ( var  fScale)
virtual

Changes both X and Y scale factor of the widget.

1.0 is the default scale factor. It modifies the X and Y scale at the same time.

Parameters
scaleThe scale factor for both X and Y axis.

Reimplemented in UILabel.

local setScale ( local  fScale)
virtual

Changes both X and Y scale factor of the widget.

1.0 is the default scale factor. It modifies the X and Y scale at the same time.

Parameters
scaleThe scale factor for both X and Y axis.

Reimplemented in UILabel.

virtual void setScaleX ( float  fScaleX)
virtual

Changes the scale factor on X axis of this widget.

The deafult value is 1.0 if you haven't changed it before

Parameters
fScaleXThe scale factor on X axis.

Reimplemented in UILabel.

var setScaleX ( var  fScaleX)
virtual

Changes the scale factor on X axis of this widget.

The deafult value is 1.0 if you haven't changed it before

Parameters
fScaleXThe scale factor on X axis.

Reimplemented in UILabel.

local setScaleX ( local  fScaleX)
virtual

Changes the scale factor on X axis of this widget.

The deafult value is 1.0 if you haven't changed it before

Parameters
fScaleXThe scale factor on X axis.

Reimplemented in UILabel.

virtual void setScaleY ( float  fScaleY)
virtual

Changes the scale factor on Y axis of this widget.

The Default value is 1.0 if you haven't changed it before.

Parameters
fScaleYThe scale factor on Y axis.

Reimplemented in UILabel.

var setScaleY ( var  fScaleY)
virtual

Changes the scale factor on Y axis of this widget.

The Default value is 1.0 if you haven't changed it before.

Parameters
fScaleYThe scale factor on Y axis.

Reimplemented in UILabel.

local setScaleY ( local  fScaleY)
virtual

Changes the scale factor on Y axis of this widget.

The Default value is 1.0 if you haven't changed it before.

Parameters
fScaleYThe scale factor on Y axis.

Reimplemented in UILabel.

virtual void setSize ( const cocos2d::Size size)
virtual

Changes the size that is widget's size.

Parameters
sizethat is widget's size
var setSize ( var  size)
virtual

Changes the size that is widget's size.

Parameters
sizethat is widget's size
local setSize ( local  size)
virtual

Changes the size that is widget's size.

Parameters
sizethat is widget's size
virtual void setSizePercent ( const cocos2d::Point percent)
virtual

Changes the percent that is widget's percent size.

Parameters
percentthat is widget's percent size
var setSizePercent ( var  percent)
virtual

Changes the percent that is widget's percent size.

Parameters
percentthat is widget's percent size
local setSizePercent ( local  percent)
virtual

Changes the percent that is widget's percent size.

Parameters
percentthat is widget's percent size
void setSizeType ( SizeType  type)

Changes the size type of widget.

See Also
SizeType
Parameters
typethat is widget's size type
var setSizeType ( var  type)

Changes the size type of widget.

See Also
SizeType
Parameters
typethat is widget's size type
local setSizeType ( local  type)

Changes the size type of widget.

See Also
SizeType
Parameters
typethat is widget's size type
void setTag ( int  tag)

Changes the tag that is used to identify the widget easily.

Parameters
Ainterger that indentifies the widget.
var setTag ( var  tag)

Changes the tag that is used to identify the widget easily.

Parameters
Ainterger that indentifies the widget.
local setTag ( local  tag)

Changes the tag that is used to identify the widget easily.

Parameters
Ainterger that indentifies the widget.
virtual void setTouchEnabled ( bool  enabled)
virtual

Sets whether the widget is touch enabled.

The default value is false, a widget is default to touch disabled

Parameters
visibletrue if the widget is touch enabled, false if the widget is touch disabled.
var setTouchEnabled ( var  enabled)
virtual

Sets whether the widget is touch enabled.

The default value is false, a widget is default to touch disabled

Parameters
visibletrue if the widget is touch enabled, false if the widget is touch disabled.
local setTouchEnabled ( local  enabled)
virtual

Sets whether the widget is touch enabled.

The default value is false, a widget is default to touch disabled

Parameters
visibletrue if the widget is touch enabled, false if the widget is touch disabled.
void setUpdateEnabled ( bool  enable)

Schedules the "update" method.

var setUpdateEnabled ( var  enable)

Schedules the "update" method.

local setUpdateEnabled ( local  enable)

Schedules the "update" method.

virtual void setUserObject ( Object userObject)
virtual

Returns a user assigned Object.

Similar to UserData, but instead of holding a void* it holds an object. The UserObject will be retained once in this method, and the previous UserObject (if existed) will be relese. The UserObject will be released in Node's destructure.

Parameters
userObjectA user assigned Object
void setVisible ( bool  visible)

Sets whether the widget is visible.

The default value is true, a widget is default to visible

Parameters
visibletrue if the widget is visible, false if the widget is hidden.
var setVisible ( var  visible)

Sets whether the widget is visible.

The default value is true, a widget is default to visible

Parameters
visibletrue if the widget is visible, false if the widget is hidden.
local setVisible ( local  visible)

Sets whether the widget is visible.

The default value is true, a widget is default to visible

Parameters
visibletrue if the widget is visible, false if the widget is hidden.
void setZOrder ( int  z)

Sets the Z order which stands for the drawing order, and reorder this widget in its parent's children array.

The Z order of widget is relative to its "brothers": children of the same parent. It's nothing to do with OpenGL's z vertex. This one only affects the draw order of widgets in cocos2d. The larger number it is, the later this widget will be drawn in each message loop. Please refer to setVertexZ(float) for the difference.

Parameters
nZOrderZ order of this widget.
var setZOrder ( var  z)

Sets the Z order which stands for the drawing order, and reorder this widget in its parent's children array.

The Z order of widget is relative to its "brothers": children of the same parent. It's nothing to do with OpenGL's z vertex. This one only affects the draw order of widgets in cocos2d. The larger number it is, the later this widget will be drawn in each message loop. Please refer to setVertexZ(float) for the difference.

Parameters
nZOrderZ order of this widget.
local setZOrder ( local  z)

Sets the Z order which stands for the drawing order, and reorder this widget in its parent's children array.

The Z order of widget is relative to its "brothers": children of the same parent. It's nothing to do with OpenGL's z vertex. This one only affects the draw order of widgets in cocos2d. The larger number it is, the later this widget will be drawn in each message loop. Please refer to setVertexZ(float) for the difference.

Parameters
nZOrderZ order of this widget.
void stopAction ( cocos2d::Action action)
var stopAction ( var  action)
local stopAction ( local  action)
void stopActionByTag ( int  tag)
var stopActionByTag ( var  tag)
local stopActionByTag ( local  tag)
void stopAllActions ( void  )
var stopAllActions (   )
local stopAllActions (   )
void updateAnchorPoint ( )
protected
var updateAnchorPoint ( )
protected
local updateAnchorPoint ( )
protected
void updateSizeAndPosition ( )
var updateSizeAndPosition ( )
local updateSizeAndPosition ( )

Member Data Documentation

int _actionTag
protected
var _actionTag
protected
local _actionTag
protected
bool _affectByClipping
protected
var _affectByClipping
protected
local _affectByClipping
protected
cocos2d::Point _anchorPoint
protected

anchor point normalized

var _anchorPoint
protected

anchor point normalized

local _anchorPoint
protected

anchor point normalized

bool _bright
protected

is this widget bright

var _bright
protected

is this widget bright

local _bright
protected

is this widget bright

BrightStyle _brightStyle
protected

bright style

var _brightStyle
protected

bright style

local _brightStyle
protected

bright style

cocos2d::Array* _children
protected
var _children
protected
local _children
protected
cocos2d::Size _customSize
protected
var _customSize
protected
local _customSize
protected
bool _enabled
protected

Highest control of widget.

bool _focus
protected

is the widget on focus

var _focus
protected

is the widget on focus

local _focus
protected

is the widget on focus

bool _ignoreSize
protected
var _ignoreSize
protected
local _ignoreSize
protected
bool _isRunning
protected
var _isRunning
protected
local _isRunning
protected
cocos2d::Dictionary*
_layoutParameterDictionary
protected
var _layoutParameterDictionary
protected
local _layoutParameterDictionary
protected
std::string _name
protected
var _name
protected
local _name
protected
cocos2d::Point _positionPercent
protected
var _positionPercent
protected
local _positionPercent
protected
PositionType _positionType
protected
var _positionType
protected
local _positionType
protected
cocos2d::Node* _renderer
protected

base renderer

var _renderer
protected

base renderer

local _renderer
protected

base renderer

cocos2d::Scheduler* _scheduler
protected
var _scheduler
protected
local _scheduler
protected
cocos2d::Size _size
protected
var _size
protected
local _size
protected
cocos2d::Point _sizePercent
protected
var _sizePercent
protected
local _sizePercent
protected
SizeType _sizeType
protected
var _sizeType
protected
local _sizeType
protected
bool _touchEnabled
protected

is this widget touch endabled

var _touchEnabled
protected

is this widget touch endabled

local _touchEnabled
protected

is this widget touch endabled

cocos2d::Point _touchEndPos
protected

touch ended point

var _touchEndPos
protected

touch ended point

local _touchEndPos
protected

touch ended point

Object* _touchEventListener
protected
var _touchEventListener
protected
local _touchEventListener
protected
SEL_TouchEvent _touchEventSelector
protected
var _touchEventSelector
protected
local _touchEventSelector
protected
cocos2d::Point _touchMovePos
protected

touch moved point

var _touchMovePos
protected

touch moved point

local _touchMovePos
protected

touch moved point

bool _touchPassedEnabled
protected

is the touch event should be passed

var _touchPassedEnabled
protected

is the touch event should be passed

local _touchPassedEnabled
protected

is the touch event should be passed

cocos2d::Point _touchStartPos
protected

touch began point

var _touchStartPos
protected

touch began point

local _touchStartPos
protected

touch began point

bool _updateEnabled
protected

is "update" method scheduled

var _updateEnabled
protected

is "update" method scheduled

local _updateEnabled
protected

is "update" method scheduled

cocos2d::Object* _userObject
protected
var _userObject
protected
local _userObject
protected
bool _visible
protected

is this widget visible

var _visible
protected

is this widget visible

local _visible
protected

is this widget visible

UIWidget* _widgetParent
protected

parent of widget

var _widgetParent
protected

parent of widget

local _widgetParent
protected

parent of widget

int _widgetTag
protected
var _widgetTag
protected
local _widgetTag
protected
WidgetType _widgetType
protected
var _widgetType
protected
local _widgetType
protected
int _widgetZOrder
protected

z-order value that affects the draw order and touch order

var _widgetZOrder
protected

z-order value that affects the draw order and touch order

local _widgetZOrder
protected

z-order value that affects the draw order and touch order


The documentation for this class was generated from the following file: