cocos2d-x  3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LayoutComponent Class Reference

#include <UILayoutComponent.h>

Inheritance diagram for LayoutComponent:
Component Ref

Public Types

enum  HorizontalEdge { None, Left, Right, Center }
 
enum  VerticalEdge { None, Bottom, Top, Center }
 

Public Member Functions

 LayoutComponent ()
 LayoutComponent ()
 LayoutComponent ()
 ~LayoutComponent ()
 ~LayoutComponent ()
virtual bool init () override
local init ()
 CREATE_FUNC (LayoutComponent)
 CREATE_FUNC ( local LayoutComponent)
void setUsingPercentContentSize (bool isUsed)
var setUsingPercentContentSize ( var isUsed)
local setUsingPercentContentSize ( local isUsed)
bool getUsingPercentContentSize () const
local getUsingPercentContentSize ()
void setPercentContentSize (const Vec2 &percent)
local setPercentContentSize ( local percent)
Vec2 getPercentContentSize () const
local getPercentContentSize ()
const PointgetAnchorPosition () const
void setAnchorPosition (const Point &point)
local setAnchorPosition ( local point)
const PointgetPosition () const
var getPosition ()
local getPosition ()
void setPosition (const Point &position)
var setPosition ( var position)
local setPosition ( local position)
bool isPositionPercentXEnabled () const
var isPositionPercentXEnabled ()
local isPositionPercentXEnabled ()
void setPositionPercentXEnabled (bool isUsed)
local setPositionPercentXEnabled ( local isUsed)
float getPositionPercentX () const
local getPositionPercentX ()
void setPositionPercentX (float percentMargin)
local setPositionPercentX ( local percentMargin)
bool isPositionPercentYEnabled () const
local isPositionPercentYEnabled ()
void setPositionPercentYEnabled (bool isUsed)
local setPositionPercentYEnabled ( local isUsed)
float getPositionPercentY () const
void setPositionPercentY (float percentMargin)
local setPositionPercentY ( local percentMargin)
HorizontalEdge getHorizontalEdge () const
local getHorizontalEdge ()
void setHorizontalEdge (HorizontalEdge hEage)
local setHorizontalEdge ( local hEage)
VerticalEdge getVerticalEdge () const
var getVerticalEdge ()
local getVerticalEdge ()
void setVerticalEdge (VerticalEdge vEage)
var setVerticalEdge ( var vEage)
local setVerticalEdge ( local vEage)
float getLeftMargin () const
var getLeftMargin ()
local getLeftMargin ()
void setLeftMargin (float margin)
local setLeftMargin ( local margin)
float getRightMargin () const
local getRightMargin ()
void setRightMargin (float margin)
local setRightMargin ( local margin)
float getTopMargin () const
local getTopMargin ()
void setTopMargin (float margin)
local setTopMargin ( local margin)
float getBottomMargin () const
local getBottomMargin ()
void setBottomMargin (float margin)
local setBottomMargin ( local margin)
const SizegetSize () const
local getSize ()
void setSize (const Size &size)
local setSize ( local size)
bool isPercentWidthEnabled () const
var isPercentWidthEnabled ()
local isPercentWidthEnabled ()
void setPercentWidthEnabled (bool isUsed)
local setPercentWidthEnabled ( local isUsed)
float getSizeWidth () const
local getSizeWidth ()
void setSizeWidth (float width)
local setSizeWidth ( local width)
float getPercentWidth () const
void setPercentWidth (float percentWidth)
local setPercentWidth ( local percentWidth)
bool isPercentHeightEnabled () const
var isPercentHeightEnabled ()
local isPercentHeightEnabled ()
void setPercentHeightEnabled (bool isUsed)
local setPercentHeightEnabled ( local isUsed)
float getSizeHeight () const
local getSizeHeight ()
void setSizeHeight (float height)
local setSizeHeight ( local height)
float getPercentHeight () const
void setPercentHeight (float percentHeight)
local setPercentHeight ( local percentHeight)
bool isStretchWidthEnabled () const
local isStretchWidthEnabled ()
void setStretchWidthEnabled (bool isUsed)
local setStretchWidthEnabled ( local isUsed)
bool isStretchHeightEnabled () const
local isStretchHeightEnabled ()
void setStretchHeightEnabled (bool isUsed)
local setStretchHeightEnabled ( local isUsed)
void setPercentOnlyEnabled (bool enable)
local setPercentOnlyEnabled ( local enable)
void setActiveEnabled (bool enable)
local setActiveEnabled ( local enable)
void refreshLayout ()
local refreshLayout ()
- Public Member Functions inherited from Component
virtual ~Component (void)
virtual void onEnter ()
var onEnter ()
local onEnter ()
virtual void onExit ()
var onExit ()
local onExit ()
virtual void update (float delta)
local update ( local delta)
virtual bool serialize (void *r)
var serialize ( var r)
local serialize ( local r)
virtual bool isEnabled () const
var isEnabled ()
local isEnabled ()
virtual void setEnabled (bool b)
local setEnabled ( local b)
const std::string & getName () const
void setName (const std::string &name)
local setName ( local name)
void setOwner (Node *pOwner)
var setOwner ( var pOwner)
local setOwner ( local pOwner)
NodegetOwner () const
var getOwner ()
local getOwner ()
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Static Public Member Functions

static LayoutComponentbindLayoutComponent (Node *node)
var bindLayoutComponent ( var node)
local bindLayoutComponent ( local node)
- Static Public Member Functions inherited from Component
static Componentcreate (void)
local create ()

Protected Member Functions

NodegetOwnerParent ()
var getOwnerParent ()
local getOwnerParent ()
void refreshHorizontalMargin ()
local refreshHorizontalMargin ()
void refreshVerticalMargin ()
var refreshVerticalMargin ()
local refreshVerticalMargin ()
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Protected Attributes

HorizontalEdge _horizontalEdge
var _horizontalEdge
local _horizontalEdge
VerticalEdge _verticalEdge
var _verticalEdge
local _verticalEdge
float _leftMargin
var _leftMargin
local _leftMargin
float _rightMargin
var _rightMargin
local _rightMargin
float _bottomMargin
var _bottomMargin
local _bottomMargin
float _topMargin
var _topMargin
local _topMargin
bool _usingPositionPercentX
var _usingPositionPercentX
local _usingPositionPercentX
float _positionPercentX
var _positionPercentX
local _positionPercentX
bool _usingPositionPercentY
local _usingPositionPercentY
float _positionPercentY
var _positionPercentY
local _positionPercentY
bool _usingStretchWidth
local _usingStretchWidth
bool _usingStretchHeight
local _usingStretchHeight
float _percentWidth
var _percentWidth
local _percentWidth
bool _usingPercentWidth
var _usingPercentWidth
local _usingPercentWidth
float _percentHeight
var _percentHeight
local _percentHeight
bool _usingPercentHeight
var _usingPercentHeight
local _usingPercentHeight
bool _actived
var _actived
local _actived
bool _isPercentOnly
var _isPercentOnly
local _isPercentOnly
- Protected Attributes inherited from Component
Node_owner
std::string _name
var _name
local _name
bool _enabled
var _enabled
local _enabled
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
var _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Member Enumeration Documentation

enum HorizontalEdge
strong
Enumerator
None 
Left 
Right 
Center 
var HorizontalEdge
strong
Enumerator
None 
Left 
Right 
Center 
local HorizontalEdge
strong
Enumerator
None 
Left 
Right 
Center 
enum VerticalEdge
strong
Enumerator
None 
Bottom 
Top 
Center 
var VerticalEdge
strong
Enumerator
None 
Bottom 
Top 
Center 
local VerticalEdge
strong
Enumerator
None 
Bottom 
Top 
Center 

Constructor & Destructor Documentation

var LayoutComponent ( )
local LayoutComponent ( )
var ~LayoutComponent ( )
local ~LayoutComponent ( )

Member Function Documentation

static LayoutComponent*
bindLayoutComponent
( Node node)
static
var bindLayoutComponent ( var  node)
static
local bindLayoutComponent ( local  node)
static
CREATE_FUNC ( LayoutComponent  )
var CREATE_FUNC ( var  )
local CREATE_FUNC ( local  )
const Point& getAnchorPosition ( ) const
var getAnchorPosition ( )
local getAnchorPosition ( )
float getBottomMargin ( ) const
var getBottomMargin ( )
local getBottomMargin ( )
HorizontalEdge getHorizontalEdge ( ) const
var getHorizontalEdge ( )
local getHorizontalEdge ( )
float getLeftMargin ( ) const
var getLeftMargin ( )
local getLeftMargin ( )
Node* getOwnerParent ( )
protected
var getOwnerParent ( )
protected
local getOwnerParent ( )
protected
Vec2 getPercentContentSize ( ) const
var getPercentContentSize ( )
local getPercentContentSize ( )
float getPercentHeight ( ) const
var getPercentHeight ( )
local getPercentHeight ( )
float getPercentWidth ( ) const
var getPercentWidth ( )
local getPercentWidth ( )
const Point& getPosition ( ) const
var getPosition ( )
local getPosition ( )
float getPositionPercentX ( ) const
var getPositionPercentX ( )
local getPositionPercentX ( )
float getPositionPercentY ( ) const
var getPositionPercentY ( )
local getPositionPercentY ( )
float getRightMargin ( ) const
var getRightMargin ( )
local getRightMargin ( )
const Size& getSize ( ) const
var getSize ( )
local getSize ( )
float getSizeHeight ( ) const
var getSizeHeight ( )
local getSizeHeight ( )
float getSizeWidth ( ) const
var getSizeWidth ( )
local getSizeWidth ( )
float getTopMargin ( ) const
var getTopMargin ( )
local getTopMargin ( )
bool getUsingPercentContentSize ( ) const
var getUsingPercentContentSize ( )
local getUsingPercentContentSize ( )
VerticalEdge getVerticalEdge ( ) const
var getVerticalEdge ( )
local getVerticalEdge ( )
virtual bool init ( )
overridevirtual

Reimplemented from Component.

var init ( )
overridevirtual

Reimplemented from Component.

local init ( )
overridevirtual

Reimplemented from Component.

bool isPercentHeightEnabled ( ) const
var isPercentHeightEnabled ( )
local isPercentHeightEnabled ( )
bool isPercentWidthEnabled ( ) const
var isPercentWidthEnabled ( )
local isPercentWidthEnabled ( )
bool isPositionPercentXEnabled ( ) const
var isPositionPercentXEnabled ( )
local isPositionPercentXEnabled ( )
bool isPositionPercentYEnabled ( ) const
var isPositionPercentYEnabled ( )
local isPositionPercentYEnabled ( )
bool isStretchHeightEnabled ( ) const
var isStretchHeightEnabled ( )
local isStretchHeightEnabled ( )
bool isStretchWidthEnabled ( ) const
var isStretchWidthEnabled ( )
local isStretchWidthEnabled ( )
void refreshHorizontalMargin ( )
protected
var refreshHorizontalMargin ( )
protected
local refreshHorizontalMargin ( )
protected
void refreshLayout ( )
var refreshLayout ( )
local refreshLayout ( )
void refreshVerticalMargin ( )
protected
var refreshVerticalMargin ( )
protected
local refreshVerticalMargin ( )
protected
void setActiveEnabled ( bool  enable)
var setActiveEnabled ( var  enable)
local setActiveEnabled ( local  enable)
void setAnchorPosition ( const Point point)
var setAnchorPosition ( var  point)
local setAnchorPosition ( local  point)
void setBottomMargin ( float  margin)
var setBottomMargin ( var  margin)
local setBottomMargin ( local  margin)
void setHorizontalEdge ( HorizontalEdge  hEage)
var setHorizontalEdge ( var  hEage)
local setHorizontalEdge ( local  hEage)
void setLeftMargin ( float  margin)
var setLeftMargin ( var  margin)
local setLeftMargin ( local  margin)
void setPercentContentSize ( const Vec2 percent)
var setPercentContentSize ( var  percent)
local setPercentContentSize ( local  percent)
void setPercentHeight ( float  percentHeight)
var setPercentHeight ( var  percentHeight)
local setPercentHeight ( local  percentHeight)
void setPercentHeightEnabled ( bool  isUsed)
var setPercentHeightEnabled ( var  isUsed)
local setPercentHeightEnabled ( local  isUsed)
void setPercentOnlyEnabled ( bool  enable)
var setPercentOnlyEnabled ( var  enable)
local setPercentOnlyEnabled ( local  enable)
void setPercentWidth ( float  percentWidth)
var setPercentWidth ( var  percentWidth)
local setPercentWidth ( local  percentWidth)
void setPercentWidthEnabled ( bool  isUsed)
var setPercentWidthEnabled ( var  isUsed)
local setPercentWidthEnabled ( local  isUsed)
void setPosition ( const Point position)
var setPosition ( var  position)
local setPosition ( local  position)
void setPositionPercentX ( float  percentMargin)
var setPositionPercentX ( var  percentMargin)
local setPositionPercentX ( local  percentMargin)
void setPositionPercentXEnabled ( bool  isUsed)
var setPositionPercentXEnabled ( var  isUsed)
local setPositionPercentXEnabled ( local  isUsed)
void setPositionPercentY ( float  percentMargin)
var setPositionPercentY ( var  percentMargin)
local setPositionPercentY ( local  percentMargin)
void setPositionPercentYEnabled ( bool  isUsed)
var setPositionPercentYEnabled ( var  isUsed)
local setPositionPercentYEnabled ( local  isUsed)
void setRightMargin ( float  margin)
var setRightMargin ( var  margin)
local setRightMargin ( local  margin)
void setSize ( const Size size)
var setSize ( var  size)
local setSize ( local  size)
void setSizeHeight ( float  height)
var setSizeHeight ( var  height)
local setSizeHeight ( local  height)
void setSizeWidth ( float  width)
var setSizeWidth ( var  width)
local setSizeWidth ( local  width)
void setStretchHeightEnabled ( bool  isUsed)
var setStretchHeightEnabled ( var  isUsed)
local setStretchHeightEnabled ( local  isUsed)
void setStretchWidthEnabled ( bool  isUsed)
var setStretchWidthEnabled ( var  isUsed)
local setStretchWidthEnabled ( local  isUsed)
void setTopMargin ( float  margin)
var setTopMargin ( var  margin)
local setTopMargin ( local  margin)
void setUsingPercentContentSize ( bool  isUsed)
var setUsingPercentContentSize ( var  isUsed)
local setUsingPercentContentSize ( local  isUsed)
void setVerticalEdge ( VerticalEdge  vEage)
var setVerticalEdge ( var  vEage)
local setVerticalEdge ( local  vEage)

Member Data Documentation

bool _actived
protected
var _actived
protected
local _actived
protected
float _bottomMargin
protected
var _bottomMargin
protected
local _bottomMargin
protected
HorizontalEdge _horizontalEdge
protected
var _horizontalEdge
protected
local _horizontalEdge
protected
bool _isPercentOnly
protected
var _isPercentOnly
protected
local _isPercentOnly
protected
float _leftMargin
protected
var _leftMargin
protected
local _leftMargin
protected
float _percentHeight
protected
var _percentHeight
protected
local _percentHeight
protected
float _percentWidth
protected
var _percentWidth
protected
local _percentWidth
protected
float _positionPercentX
protected
var _positionPercentX
protected
local _positionPercentX
protected
float _positionPercentY
protected
var _positionPercentY
protected
local _positionPercentY
protected
float _rightMargin
protected
var _rightMargin
protected
local _rightMargin
protected
float _topMargin
protected
var _topMargin
protected
local _topMargin
protected
bool _usingPercentHeight
protected
var _usingPercentHeight
protected
local _usingPercentHeight
protected
bool _usingPercentWidth
protected
var _usingPercentWidth
protected
local _usingPercentWidth
protected
bool _usingPositionPercentX
protected
var _usingPositionPercentX
protected
local _usingPositionPercentX
protected
bool _usingPositionPercentY
protected
var _usingPositionPercentY
protected
local _usingPositionPercentY
protected
bool _usingStretchHeight
protected
var _usingStretchHeight
protected
local _usingStretchHeight
protected
bool _usingStretchWidth
protected
var _usingStretchWidth
protected
local _usingStretchWidth
protected
VerticalEdge _verticalEdge
protected
var _verticalEdge
protected
local _verticalEdge
protected

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