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

Rich element for displaying text. More...

#include <UIRichText.h>

Inheritance diagram for RichElementText:
RichElement Ref

Public Member Functions

 RichElementText ()
 Default constructor. More...
 
virtual ~RichElementText ()
 Default destructor. More...
 
bool init (int tag, const Color3B &color, GLubyte opacity, const std::string &text, const std::string &fontName, float fontSize)
 Initialize a RichElementText with various arguments. More...
 
- Public Member Functions inherited from RichElement
 RichElement ()
 Default constructor. More...
 
virtual ~RichElement ()
 Default destructor. More...
 
bool init (int tag, const Color3B &color, GLubyte opacity)
 Initialize a rich element with different arguments. More...
 
- 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 ()
 Destructor. More...
 

Static Public Member Functions

static RichElementTextcreate (int tag, const Color3B &color, GLubyte opacity, const std::string &text, const std::string &fontName, float fontSize)
 Create a RichElementText with various arguments. More...
 

Protected Attributes

std::string _text
std::string _fontName
float _fontSize
- Protected Attributes inherited from RichElement
Type _type
int _tag
Color3B _color
GLubyte _opacity
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 

Friends

class RichText

Additional Inherited Members

- Public Types inherited from RichElement
enum  Type { TEXT, IMAGE, CUSTOM }
 Rich element type. More...
 
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 

Detailed Description

Rich element for displaying text.

Constructor & Destructor Documentation

RichElementText ( )
inline

Default constructor.

virtual ~RichElementText ( )
inlinevirtual

Default destructor.

Member Function Documentation

static RichElementText* create ( int  tag,
const Color3B color,
GLubyte  opacity,
const std::string &  text,
const std::string &  fontName,
float  fontSize 
)
static

Create a RichElementText with various arguments.

Parameters
tagA integer tag value.
colorA color in Color3B.
opacityA opacity in GLubyte.
textContent string.
fontNameContent font name.
fontSizeContent font size.
Returns
RichElementText instance.
bool init ( int  tag,
const Color3B color,
GLubyte  opacity,
const std::string &  text,
const std::string &  fontName,
float  fontSize 
)

Initialize a RichElementText with various arguments.

Parameters
tagA integer tag value.
colorA color in Color3B.
opacityA opacity in GLubyte.
textContent string.
fontNameContent font name.
fontSizeContent font size.
Returns
True if initialize scucess, false otherwise.

Friends And Related Function Documentation

friend class RichText
friend

Member Data Documentation

std::string _fontName
protected
float _fontSize
protected
std::string _text
protected

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