Cocos2d-x  v4
RelativeLayoutParameter Class Reference

Relative layout parameter. More...

Inherits LayoutParameter.

Public Types

enum  RelativeAlign
 Relative Alignment type.
 
- Public Types inherited from LayoutParameter
enum  Type
 Layout parameter type. More...
 

Public Member Functions

 RelativeLayoutParameter ()
 Default constructor. More...
 
virtual ~RelativeLayoutParameter ()
 Default destructor. More...
 
void setAlign (RelativeAlign align)
 Sets RelativeAlign parameter for LayoutParameter. More...
 
RelativeAlign getAlign () const
 Get RelativeAlign parameter for LayoutParameter. More...
 
void setRelativeToWidgetName (const std::string &name)
 Set widget name your widget want to relative to. More...
 
const std::string & getRelativeToWidgetName () const
 Get the relative widget name. More...
 
void setRelativeName (const std::string &name)
 Set a name for LayoutParameter in Relative Layout. More...
 
const std::string & getRelativeName () const
 Get a name of LayoutParameter in Relative Layout. More...
 
virtual LayoutParameter * createCloneInstance () override
 Create a cloned instance of LayoutParameter. More...
 
virtual void copyProperties (LayoutParameter *model) override
 Copy all the member field from argument LayoutParameter to self. More...
 
- Public Member Functions inherited from LayoutParameter
 LayoutParameter ()
 Default constructor. More...
 
virtual ~LayoutParameter ()
 Default destructor. More...
 
void setMargin (const Margin &margin)
 Set margin parameter for LayoutParameter. More...
 
const Margin & getMargin () const
 Gets margin parameter of LayoutParameter. More...
 
Type getLayoutType () const
 Gets LayoutParameterType of LayoutParameter. More...
 
LayoutParameter * clone ()
 Create a copy of original LayoutParameter. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Ref * autorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor. More...
 

Static Public Member Functions

static RelativeLayoutParameter * create ()
 Create a RelativeLayoutParameter instance. More...
 
- Static Public Member Functions inherited from LayoutParameter
static LayoutParameter * create ()
 Create a empty LayoutParameter. More...
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 

Detailed Description

Relative layout parameter.

It is mainly used by RelativeLayoutManager.

Constructor & Destructor Documentation

◆ RelativeLayoutParameter()

Default constructor.

@lua new

◆ ~RelativeLayoutParameter()

virtual ~RelativeLayoutParameter ( )
inlinevirtual

Default destructor.

@lua NA

Member Function Documentation

◆ create()

static RelativeLayoutParameter* create ( )
static

Create a RelativeLayoutParameter instance.

Returns
A initialized LayoutParameter which is marked as "autorelease".

◆ setAlign()

void setAlign ( RelativeAlign  align)

Sets RelativeAlign parameter for LayoutParameter.

See also
RelativeAlign
Parameters
alignRelative align in RelativeAlign.

◆ getAlign()

RelativeAlign getAlign ( ) const

Get RelativeAlign parameter for LayoutParameter.

See also
RelativeAlign
Returns
A RelativeAlign variable.

◆ setRelativeToWidgetName()

void setRelativeToWidgetName ( const std::string &  name)

Set widget name your widget want to relative to.

Parameters
nameRelative widget name.

◆ getRelativeToWidgetName()

const std::string& getRelativeToWidgetName ( ) const

Get the relative widget name.

Returns
name A relative widget name in string.

◆ setRelativeName()

void setRelativeName ( const std::string &  name)

Set a name for LayoutParameter in Relative Layout.

Parameters
nameA string name.

◆ getRelativeName()

const std::string& getRelativeName ( ) const

Get a name of LayoutParameter in Relative Layout.

Returns
name Relative name in string.

◆ createCloneInstance()

virtual LayoutParameter* createCloneInstance ( )
overridevirtual

Create a cloned instance of LayoutParameter.

Returns
A LayoutParameter pointer.

Reimplemented from LayoutParameter.

◆ copyProperties()

virtual void copyProperties ( LayoutParameter *  model)
overridevirtual

Copy all the member field from argument LayoutParameter to self.

Parameters
modelA LayoutParameter instance.

Reimplemented from LayoutParameter.


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