Class for encapsulating the functionality of the text cursor/carat navigation in text layers. More...
#include <textcursor.h>
Public Member Functions | |
TextCursor (TextLayer *Creator) | |
Class constructor. More... | |
virtual | ~TextCursor () |
Class destructor. | |
virtual const ColourValue & | GetColour () const |
Gets the colour that the Text Cursor will be rendered as. More... | |
virtual Integer | GetCursorIndex () const |
Gets the index position of this cursor. More... | |
virtual Rect | GetCursorRect () const |
Gets a rect representing this cursors dimentions. More... | |
virtual TextLayer::CharOffsetPair | GetOffsetPosition () const |
Gets the current offset position of this cursor. More... | |
virtual Boole | GetVisible () const |
Gets the visibility of this cursor. More... | |
virtual void | InsertCharacterAtCursor (const UInt32 GlyphID) |
Creates a character from a Glyph ID and inserts it at the cursor position. More... | |
virtual void | InsertCharactersAtCursor (const Char8 *Characters, const UInt32 BufSize) |
Creates a series of characters from a UTF-8 encoded string to be inserted at the cursor position. More... | |
virtual void | InsertCharactersAtCursor (const UInt32 *Characters, const UInt32 BufSize) |
Creates a series of characters from a UTF-32 encoded string to be inserted at the cursor position. More... | |
virtual void | MoveCursorLeft () |
Decrements this cursors index position, moving it to the left. | |
virtual void | MoveCursorRight () |
Increments this cursors index position, moving it to the right. | |
virtual void | ProtoDeSerialize (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and overwrite this object with it. More... | |
virtual void | ProtoSerialize (XML::Node &ParentNode) const |
Convert this class to an XML::Node ready for serialization. More... | |
virtual void | RemoveLeftCharacter () |
Removes the character to the left (and decrements the index position) of this cursor. | |
virtual void | RemoveRightCharacter () |
Removes the character to the right of this cursor. | |
virtual void | SetColour (const ColourValue &Colour) |
Sets the colour that the Text Cursor should be rendered as. More... | |
virtual void | SetCursorIndex (const Integer &Index) |
Sets the index position of this cursor. More... | |
virtual void | SetOffsetPosition (const Vector2 &Offset) |
Sets the offset position of this cursor to the nearest appropriate point. More... | |
virtual void | SetVisible (Boole Visible) |
Sets the visibility of this cursor. More... | |
Static Public Member Functions | |
static String | GetSerializableName () |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More... | |
Protected Attributes | |
ColourValue | CursorColour |
The colour to be given to the TextCursor. More... | |
Integer | IndexPosition |
The index of the character this TextCursor is to the left of. More... | |
TextLayer * | Layer |
The layer this TextCursor belongs to. More... | |
Boole | Visibility |
Stores the cursors current visibility state. More... | |
Class for encapsulating the functionality of the text cursor/carat navigation in text layers.
Definition at line 59 of file textcursor.h.
Mezzanine::UI::TextCursor::TextCursor | ( | TextLayer * | Creator | ) |
Class constructor.
Creator | The layer that this TextCursor belongs to. |
Definition at line 55 of file textcursor.cpp.
|
virtual |
Gets the colour that the Text Cursor will be rendered as.
Definition at line 157 of file textcursor.cpp.
|
virtual |
Gets the index position of this cursor.
Definition at line 91 of file textcursor.cpp.
|
virtual |
Gets a rect representing this cursors dimentions.
Definition at line 107 of file textcursor.cpp.
|
virtual |
Gets the current offset position of this cursor.
Definition at line 104 of file textcursor.cpp.
|
static |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.
Definition at line 279 of file textcursor.cpp.
|
virtual |
Gets the visibility of this cursor.
Definition at line 70 of file textcursor.cpp.
|
virtual |
Creates a character from a Glyph ID and inserts it at the cursor position.
GlyphID | The ID of the Glyph to be inserted. |
Definition at line 186 of file textcursor.cpp.
|
virtual |
Creates a series of characters from a UTF-8 encoded string to be inserted at the cursor position.
Characters | An array of Char8's encoded in UTF-8 to be inserted. |
BufSize | The size of the array of Char8's passed in. |
Definition at line 194 of file textcursor.cpp.
|
virtual |
Creates a series of characters from a UTF-32 encoded string to be inserted at the cursor position.
Characters | An array of UInt32's encoded in UTF-32 to be inserted. |
BufSize | The size of the array of Char8's passed in. |
Definition at line 202 of file textcursor.cpp.
|
virtual |
Take the data stored in an XML Node and overwrite this object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 254 of file textcursor.cpp.
|
virtual |
Convert this class to an XML::Node ready for serialization.
ParentNode | The point in the XML hierarchy that this renderable should be appended to. |
Definition at line 237 of file textcursor.cpp.
|
virtual |
Sets the colour that the Text Cursor should be rendered as.
Colour | The colour to use when rendering the Text Cursor. |
Definition at line 149 of file textcursor.cpp.
|
virtual |
Sets the index position of this cursor.
Index | The index indicating the position of this cursor among the characters in the parent layer. |
Definition at line 83 of file textcursor.cpp.
|
virtual |
Sets the offset position of this cursor to the nearest appropriate point.
Offset | The position from the top left corner of the parent layer where the bottom left corner of this cursor is to be placed. |
Definition at line 96 of file textcursor.cpp.
|
virtual |
Sets the visibility of this cursor.
Visible | True to enable rendering of this cursor, false otherwise. |
Definition at line 67 of file textcursor.cpp.
|
protected |
The colour to be given to the TextCursor.
Definition at line 64 of file textcursor.h.
|
protected |
The index of the character this TextCursor is to the left of.
Definition at line 70 of file textcursor.h.
|
protected |
The layer this TextCursor belongs to.
Definition at line 73 of file textcursor.h.
|
protected |
Stores the cursors current visibility state.
Definition at line 76 of file textcursor.h.