FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::Text Class Reference

Represents a text. More...

#include <text.h>

+ Collaboration diagram for FIFE::Text:

Public Member Functions

 Text (const char *text=0, int32_t start=0, int32_t length=0)
 Constructor. More...
 
virtual ~Text ()
 Destructor. More...
 
bool isPrintable () const
 Tells whether the Text can be represented as a string. More...
 
std::string getAsString () const
 Gets the string, encoded as UTF-8. More...
 
int32_t getStart () const
 Gets the start point of the text edit event, cursor position. More...
 
int32_t getLength () const
 Gets the length of the text edit event, the number of characters to edit from the start point. More...
 

Private Attributes

std::string m_text
 
int32_t m_start
 
int32_t m_length
 

Detailed Description

Represents a text.

Definition at line 40 of file text.h.

Constructor & Destructor Documentation

FIFE::Text::Text ( const char *  text = 0,
int32_t  start = 0,
int32_t  length = 0 
)
inline

Constructor.

Parameters
textpointer to the UTF-8 text
startpoint of the text edit event
lengthlength of the text edit event

Definition at line 48 of file text.h.

virtual FIFE::Text::~Text ( )
inlinevirtual

Destructor.

Definition at line 55 of file text.h.

Member Function Documentation

std::string FIFE::Text::getAsString ( ) const
inline

Gets the string, encoded as UTF-8.

Definition at line 68 of file text.h.

References m_text.

int32_t FIFE::Text::getLength ( ) const
inline

Gets the length of the text edit event, the number of characters to edit from the start point.

Definition at line 81 of file text.h.

References m_length.

int32_t FIFE::Text::getStart ( ) const
inline

Gets the start point of the text edit event, cursor position.

Definition at line 74 of file text.h.

References m_start.

bool FIFE::Text::isPrintable ( ) const
inline

Tells whether the Text can be represented as a string.

Definition at line 59 of file text.h.

References m_text.

Member Data Documentation

int32_t FIFE::Text::m_length
private

Definition at line 88 of file text.h.

Referenced by getLength().

int32_t FIFE::Text::m_start
private

Definition at line 87 of file text.h.

Referenced by getStart().

std::string FIFE::Text::m_text
private

Definition at line 86 of file text.h.

Referenced by getAsString(), and isPrintable().


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