Cocos2d-x  4.0.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
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.
 
virtual ~RelativeLayoutParameter ()
 Default destructor.
 
void setAlign (RelativeAlign align)
 Sets RelativeAlign parameter for LayoutParameter.
 
RelativeAlign getAlign () const
 Get RelativeAlign parameter for LayoutParameter.
 
void setRelativeToWidgetName (const std::string &name)
 Set widget name your widget want to relative to.
 
const std::string & getRelativeToWidgetName () const
 Get the relative widget name.
 
void setRelativeName (const std::string &name)
 Set a name for LayoutParameter in Relative Layout.
 
const std::string & getRelativeName () const
 Get a name of LayoutParameter in Relative Layout.
 
virtual LayoutParametercreateCloneInstance () override
 Create a cloned instance of LayoutParameter.
 
virtual void copyProperties (LayoutParameter *model) override
 Copy all the member field from argument LayoutParameter to self.
 
- Public Member Functions inherited from LayoutParameter
 LayoutParameter ()
 Default constructor.
 
virtual ~LayoutParameter ()
 Default destructor.
 
void setMargin (const Margin &margin)
 Set margin parameter for LayoutParameter.
 
const MargingetMargin () const
 Gets margin parameter of LayoutParameter.
 
Type getLayoutType () const
 Gets LayoutParameterType of LayoutParameter.
 
LayoutParameterclone ()
 Create a copy of original LayoutParameter.
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership.
 
void release ()
 Releases the ownership immediately.
 
Refautorelease ()
 Releases the ownership sometime soon automatically.
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count.
 
virtual ~Ref ()
 Destructor.
 

Static Public Member Functions

static RelativeLayoutParametercreate ()
 Create a RelativeLayoutParameter instance.
 
- Static Public Member Functions inherited from LayoutParameter
static LayoutParametercreate ()
 Create a empty LayoutParameter.
 

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

Default constructor.

new

virtual ~RelativeLayoutParameter ( )
inlinevirtual

Default destructor.

NA

Member Function Documentation

static RelativeLayoutParameter* create ( )
static

Create a RelativeLayoutParameter instance.

Returns
A initialized LayoutParameter which is marked as "autorelease".
void setAlign ( RelativeAlign  align)

Sets RelativeAlign parameter for LayoutParameter.

See Also
RelativeAlign
Parameters
alignRelative align in RelativeAlign.
RelativeAlign getAlign ( ) const

Get RelativeAlign parameter for LayoutParameter.

See Also
RelativeAlign
Returns
A RelativeAlign variable.
void setRelativeToWidgetName ( const std::string &  name)

Set widget name your widget want to relative to.

Parameters
nameRelative widget name.
const std::string& getRelativeToWidgetName ( ) const

Get the relative widget name.

Returns
name A relative widget name in string.
void setRelativeName ( const std::string &  name)

Set a name for LayoutParameter in Relative Layout.

Parameters
nameA string name.
const std::string& getRelativeName ( ) const

Get a name of LayoutParameter in Relative Layout.

Returns
name Relative name in string.
virtual LayoutParameter* createCloneInstance ( )
overridevirtual

Create a cloned instance of LayoutParameter.

Returns
A LayoutParameter pointer.

Reimplemented from LayoutParameter.

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: