This is a base class for render layers that render text. More...
#include <textlayer.h>
Public Types | |
typedef std::list< Character * > | CharacterContainer |
Basic container type for the storage of Character instances by this class. | |
typedef CharacterContainer::iterator | CharacterIterator |
Iterator type for Character instances stored by this class. | |
typedef std::pair< CharacterIterator, CharacterIterator > | CharacterIteratorPair |
An std::pair type storing two character iterators, usually used to express a range. | |
typedef std::pair< Boole, Integer > | CharIndexPair |
An std::pair type used as a return for index-offset conversions. | |
typedef std::pair< Boole, Vector2 > | CharOffsetPair |
An std::pair type used as a return for index-offset conversions. | |
typedef CharacterContainer::const_iterator | ConstCharacterIterator |
Const Iterator type for Character instances stored by this class. | |
typedef CharacterContainer::const_reverse_iterator | ConstReverseCharacterIterator |
Const Reverse Iterator type for Character instances stored by this class. | |
typedef TextLineContainer::const_iterator | ConstTextLineIterator |
Const Iterator type for TextLine instances stored by this class. | |
typedef CharacterContainer::reverse_iterator | ReverseCharacterIterator |
Reverse Iterator type for Character instances stored by this class. | |
enum | ScalingMode { SM_NoAutoScaling = 0, SM_ScreenRelative = 1, SM_ParentRelative = 2, SM_LayerRelative = 3 } |
An enum used to describe how the text generated by this layer will be automatically scaled. More... | |
typedef std::vector< TextLine * > | TextLineContainer |
Basic container type for the storate of TextLine instances by this class. | |
typedef TextLineContainer::iterator | TextLineIterator |
Iterator type for TextLine instances stored by this class. | |
Public Member Functions | |
CharacterIterator | BeginCharacter () |
Gets an iterator to the first Character. More... | |
ConstCharacterIterator | BeginCharacter () const |
Gets a const iterator to the first Character. More... | |
virtual TextLineIterator | BeginTextLine () |
Gets an iterator to the first TextLine. More... | |
virtual ConstTextLineIterator | BeginTextLine () const |
Gets a const iterator to the first TextLine. More... | |
virtual void | ClearAllTextLines () |
Removes all characters from all TextLines belonging to this layer. | |
virtual void | ClearHighlights () |
Clears all the highlights in this layer. | |
virtual TextLine * | CreateTextLine () |
Creates a new TextLine. More... | |
virtual Integer | DestroyAllCharacters () |
Destroy's all characters in this TextLayer. More... | |
virtual void | DestroyAllTextLines () |
Destroys all TextLines in this layer. | |
CharacterIterator | EndCharacter () |
Gets an iterator to one passed the last Character. More... | |
ConstCharacterIterator | EndCharacter () const |
Gets an iterator to one passed the last Character. More... | |
virtual TextLineIterator | EndTextLine () |
Gets an iterator to one passed the last TextLine. More... | |
virtual ConstTextLineIterator | EndTextLine () const |
Gets a const iterator to one passed the last TextLine. More... | |
virtual const ColourValue & | GetActiveHighlightBackgroundColour () const |
Gets the colour of the highlight when the quad is being focused. More... | |
virtual Real | GetAutoTextScalar () const |
Gets the relative scalar being used to automatically scale text generated by this layer. More... | |
virtual TextLayer::ScalingMode | GetAutoTextScalingMode () const |
Gets the automatic scaling mode being used by this textlayer. More... | |
virtual Character * | GetCharacterAtIndex (const Integer Index) const |
Gets a Character by index. More... | |
virtual Character * | GetCharacterAtOffset (const Vector2 &Offset) const |
Gets a Character by offset position. More... | |
virtual CharacterIterator | GetCharacterIteratorAtIndex (const Integer Index) |
Gets an iterator to the character at the specified index. More... | |
virtual ConstCharacterIterator | GetCharacterIteratorAtIndex (const Integer Index) const |
Gets a const iterator to the character at the specified index. More... | |
virtual TextCursor * | GetCursor () const |
Gets the TextCursor in use by this layer. More... | |
virtual Boole | GetCursorEnabled () const |
Gets whether or not the Text Cursor is enabled. More... | |
virtual FontData * | GetDefaultFont () |
Gets the default font in use by this layer. More... | |
virtual String | GetDerivedSerializableName () const |
Gets the most derived serializable name of this Renderable. More... | |
virtual Real | GetDesiredLineHeight () const |
Gets the height in pixels this layer is configured to render it's text. More... | |
virtual Integer | GetHighlightEnd () const |
Gets the index of this last character that is highlighted in this layer. More... | |
virtual Integer | GetHighlightStart () const |
Gets the index of the first character that is highlighted in this layer. More... | |
virtual const ColourValue & | GetInactiveHighlightBackgroundColour () const |
Gets the colour of the highlight when the quad is being focused. More... | |
virtual CharIndexPair | GetIndexAtOffset (const Vector2 &Offset) |
Gets the index of the character at the specified offset position. More... | |
virtual const Vector2 & | GetManualTextScale () const |
Gets the scaling currently being applied to the rendered text. More... | |
virtual MarkupParser * | GetMarkupParser () const |
Gets the MarkupParser being used by this TextLayer. More... | |
virtual Real | GetMaxLineWidth () const |
Gets the maximum width of text lines in this layer. More... | |
virtual Whole | GetNumCharacters () const |
Gets the number of characters being rendered by this TextLayer. More... | |
virtual Whole | GetNumTextLines () const |
Gets the number of TextLines this layer contains. More... | |
virtual CharOffsetPair | GetOffsetAtIndex (const Integer Index) |
Gets the offset position of the character at the provided index. More... | |
virtual String | GetText () const |
Gets the text displayed within this layer. More... | |
virtual const ColourValue & | GetTextColour () const |
Gets the default colour of the tect being rendered by this layer. More... | |
virtual TextLine * | GetTextLineAtOffset (const Real &Offset) |
Gets the TextLine at the specified offset position. More... | |
virtual UI::LinearAlignment | GetTextLineVerticalAlignment () const |
Gets the current set alignment for positioning textlines in this layer. More... | |
virtual UI::TextOrdering | GetTextOrder () const |
Gets the currently set direction of advancement for characters on the horizontal axis created by this layer. More... | |
virtual Real | GetTotalHeight () const |
Gets the combined height of all the text lines in this layer. More... | |
virtual void | Highlight () |
Highlights all characters in this layer. | |
virtual void | Highlight (const Integer Index) |
Highlights the character at the specified index. More... | |
virtual void | Highlight (const Integer StartIndex, const Integer EndIndex) |
Highlights all characters in a provided range. More... | |
virtual Integer | InsertCharacterAtIndex (const Integer Index, const UInt32 GlyphID) |
Creates a character from a Glyph ID and inserts it into the layer at the specified index. More... | |
virtual Integer | InsertCharactersAtIndex (const Integer Index, const Char8 *Characters, const UInt32 BufSize) |
Creates a series of characters from a UTF-8 encoded string to be inserted into this layer. More... | |
virtual Integer | InsertCharactersAtIndex (const Integer Index, const UInt32 *Characters, const UInt32 BufSize) |
Creates a series of characters from a UTF-32 encoded string to be inserted into this layer. More... | |
virtual void | PopulateTextLines (const Real MaxWidth) |
Populates text lines in this layer with parsed characters. More... | |
virtual void | ProtoDeSerialize (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and overwrite this object with it. More... | |
virtual void | ProtoDeSerializeCursor (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and overwrite the TextCursor of this object with it. More... | |
virtual void | ProtoDeSerializeProperties (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and overwrite the properties of this object with it. More... | |
virtual void | ProtoDeSerializeText (const XML::Node &SelfRoot) |
Take the data stored in an XML Node and overwrite the Text of 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 | ProtoSerializeCursor (XML::Node &SelfRoot) const |
Convert the TextCursor of this class to an XML::Node ready for seriailization. More... | |
virtual void | ProtoSerializeProperties (XML::Node &SelfRoot) const |
Convert the properties of this class to an XML::Node ready for serialization. More... | |
virtual void | ProtoSerializeText (XML::Node &SelfRoot) const |
Convert the Text of this class to an XML::Node ready for serialization. More... | |
virtual Integer | RemoveCharacterAtIndex (const Integer Index) |
Removes a character from the layer at the specified index. More... | |
virtual Integer | RemoveCharacterRange (const Integer First, const Integer Last) |
Removes a range of characters from the text in this layer. More... | |
virtual Integer | RemoveCharactersAtIndex (const Integer Index, const UInt32 Length) |
Removes a length of characters from this layer at the specified index. More... | |
virtual void | SetActiveHighlightBackgroundColour (const ColourValue &Colour) |
Sets the colour of the highlight when the quad is being focused. More... | |
virtual void | SetAutoTextScale (const TextLayer::ScalingMode Mode, const Real Scalar) |
Sets the mode and scaler of auto-scaling applied to the text generated by this textlayer. More... | |
virtual void | SetCursorEnabled (Boole Enable) |
Enables (or disables) the cursor for use in this layer. More... | |
virtual void | SetDefaultFont (FontData *NewFont) |
Sets the default font to be used with this layer. More... | |
virtual void | SetDefaultFont (const String &FontName) |
Sets the default font to be used with this layer. More... | |
virtual void | SetDefaultFont (const String &FontName, const String &Atlas) |
Sets the default font to be used with this layer. More... | |
virtual void | SetInactiveHighlightBackgroundColour (const ColourValue &Colour) |
Sets the colour of the highlight when the quad is not focused. More... | |
virtual void | SetManualTextScale (const Vector2 &Scale) |
Sets the scaling to be applied to the text being rendered. More... | |
virtual Boole | SetMarkupParser (MarkupParser *Parser) |
Sets the MarkupParser to be used by this TextLayer. More... | |
virtual Boole | SetMarkupParser (const String &ParserName) |
Sets the MarkupParser to be used by this TextLayer via it's registered name. More... | |
virtual void | SetText (const String &Text) |
Sets the text displayed within this layer. More... | |
virtual void | SetTextColour (const ColourValue &Colour) |
Sets the default colour of the text being rendered by this layer. More... | |
virtual void | SetTextLineHorizontalAlignment (const UI::LinearAlignment Align) |
Sets the horizontal alignment of every textline in this layer. More... | |
virtual void | SetTextLineVerticalAlignment (const UI::LinearAlignment Align) |
Sets the alignment used to determine the start position of the textlines in this layer. More... | |
virtual void | SetTextOrder (const UI::TextOrdering Order) |
Sets the ordering for characters in this layer. More... | |
Public Member Functions inherited from Mezzanine::UI::RenderLayer | |
virtual | ~RenderLayer () |
Class destructor. | |
virtual void | _MarkDirty () |
Marks this renderable as well as all parent objects as dirty. More... | |
virtual void | _UpdateIndex (const Whole Index) |
Notifies this RenderLayer that it's index in the parent QuadRenderable has been updated. More... | |
virtual Rect | GetAreaRect () const |
Gets a rect containing the actual position and size of this layer. More... | |
virtual Whole | GetIndex () const |
Gets the index position of this RenderLayer in it's parent. More... | |
virtual UI::RenderLayerType | GetLayerType () const =0 |
Gets the type of render layer this is. More... | |
virtual QuadRenderable * | GetParent () const |
Gets the parent of this render layer. More... | |
virtual Real | GetRotationDegrees () const |
Gets the current rotation applied to this renderable in degrees. More... | |
virtual Real | GetRotationRadians () const |
Gets the current rotation applied to this renderable in radians. More... | |
virtual Vector2 | GetScale () const |
Gets the scaling currently applied to this render layer. More... | |
virtual Screen * | GetScreen () const |
Gets the screen the parent renderable is being rendered on. More... | |
virtual Boole | IsImageLayer () const |
Gets whether or not this is an ImageLayer. More... | |
virtual Boole | IsLineLayer () const |
Gets whether or not this is an LineLayer. More... | |
virtual Boole | IsMultiImageLayer () const |
Gets whether or not this is a MultiImageLayer. More... | |
virtual Boole | IsMultiLineTextLayer () const |
Gets whether or not this is a MultiLineTextLayer. More... | |
virtual Boole | IsSingleImageLayer () const |
Gets whether or not this is a SingleImageLayer. More... | |
virtual Boole | IsSingleLineTextLayer () const |
Gets whether or not this is a SingleLineTextLayer. More... | |
virtual Boole | IsTextLayer () const |
Gets whether or not this is a TextLayer. More... | |
virtual void | NotifyActive () |
Notifies this RenderLayer that the group this layer belongs to has become the active group. More... | |
virtual void | NotifyInactive () |
Notifies this RenderLayer that the group this layer belongs to is no longer the active group. More... | |
virtual void | SetRotationDegrees (const Real &Degrees) |
Sets the rotation to be applied to this renderable. More... | |
virtual void | SetRotationRadians (const Real &Radians) |
Sets the rotation to be applied to this renderable. More... | |
virtual void | SetScale (const Vector2 &Scaling) |
Sets the scaling to be applied to this render layer. More... | |
Public Member Functions inherited from Mezzanine::UI::SimpleRenderer | |
void | _AppendVertices (std::vector< VertexData > &Vertices) |
Appends the vertices of this renderable to another vector. More... | |
Boole | _IsDirty () |
Gets whether or not this renderer is dirty. More... | |
void | _Redraw (Boole Force) |
Regenerates the verticies in this renderable. More... | |
virtual String | GetPrimaryAtlas () const |
Gets the currently set primary atlas. More... | |
virtual void | SetPrimaryAtlas (const String &Atlas) |
Sets the Atlas to be assumed when one isn't provided for atlas related tasks. 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... | |
Static Public Member Functions inherited from Mezzanine::UI::RenderLayer | |
static String | GetSerializableName () |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More... | |
Static Public Member Functions inherited from Mezzanine::UI::QuadRenderer | |
static String | GetSerializableName () |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More... | |
Static Public Member Functions inherited from Mezzanine::UI::SimpleRenderer | |
static String | GetSerializableName () |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More... | |
Protected Member Functions | |
TextLayer (QuadRenderable *ParentRenderable) | |
No-Font constructor. More... | |
TextLayer (const String &FontName, QuadRenderable *ParentRenderable) | |
Class constructor. More... | |
TextLayer (const Real &LineHeight, QuadRenderable *ParentRenderable) | |
Text-Scaling constructor. More... | |
virtual | ~TextLayer () |
Class destructor. | |
virtual CharIndexPair | GetIndexAtOffsetImpl (const Vector2 &Position)=0 |
Gets the index of the character at the specified offset position. More... | |
virtual CharOffsetPair | GetOffsetAtIndexImpl (const Integer Index)=0 |
Gets the position of the character at the specified index. More... | |
virtual void | PopulateTextLinesImpl (const Real MaxWidth)=0 |
Clears and then places characters belonging to this layer in the appropriate text lines. More... | |
virtual void | RecalculateOffsets () |
Recalculates the offset for every text line in this layer. More... | |
virtual void | RedrawImpl (Boole Force) |
Provides the class specific implementation for regenerating vertices for this renderable. More... | |
Protected Member Functions inherited from Mezzanine::UI::RenderLayer | |
RenderLayer (QuadRenderable *ParentRenderable) | |
Class constructor. More... | |
virtual void | RotationTransform (Vector2 &Point, const Vector2 &RotationCenter) |
Applies rotation to a point in 2D space. More... | |
virtual void | RotationTransform (Vector2 &TopLeft, Vector2 &TopRight, Vector2 &BottomLeft, Vector2 &BottomRight) |
Applies rotation to a quad in 2D space. More... | |
virtual void | RotationTransform (Vector2 &TopLeft, Vector2 &TopRight, Vector2 &BottomLeft, Vector2 &BottomRight, const Vector2 &RotationCenter) |
Applies rotation to a quad in 2D space. More... | |
virtual void | RotationTransform (Vector2 *RotRect) |
Applies rotation to a quad in 2D space. More... | |
virtual void | RotationTransform (Vector2 *RotRect, const Vector2 &RotationCenter) |
Applies rotation to a quad in 2D space. More... | |
Protected Member Functions inherited from Mezzanine::UI::QuadRenderer | |
QuadRenderer () | |
Class constructor. | |
virtual | ~QuadRenderer () |
Class destructor. | |
virtual void | PushQuad (Vector2 *Positions, Vector2 *UVs, ColourValue *Colours, const String &Atlas) |
Pushes vertex information for a quad to a vector. Equivalent to calling "PushTriangle" twice. | |
virtual void | PushQuad2 (Vector2 *Positions, Vector2 *UVs, const ColourValue &Colour, const String &Atlas) |
Pushes vertex information for a quad to a vector. Equivalent to calling "PushTriangle" twice. | |
Protected Member Functions inherited from Mezzanine::UI::SimpleRenderer | |
SimpleRenderer () | |
Class constructor. | |
virtual | ~SimpleRenderer () |
Class destructor. | |
virtual void | PushTriangle (const Vector2 &A, const Vector2 &B, const Vector2 &C, const Vector2 &UV, const ColourValue &Colour, const String &Atlas) |
Pushes vertex information for a triangle to a vector. Equivalent to calling "PushVertex" three times. More... | |
virtual void | PushVertex (const Real &X, const Real &Y, const Vector2 &UV, const ColourValue &Colour, const String &Atlas) |
Collects all the relevant information for a single vertex and pushes it to a vector. More... | |
Protected Attributes | |
ColourValue | ActiveHLColour |
The colour of the highlight when this layer belongs to a focused widget. More... | |
Real | AutoCharScaling |
The auto-scaling height the text is to be in relative units. More... | |
ScalingMode | AutoCharScalingMode |
The auto-scaling mode that is to be used on text generated by this textlayer. More... | |
CharacterContainer | Characters |
Container with all this layers Characters. More... | |
TextCursor * | Cursor |
The cursor to be used for insert and manipulation operations. More... | |
CharacterTraits | DefaultCharTraits |
Default set of traits all characters generated inside this layer are to have. More... | |
Integer | HighlightEnd |
The index of the character at the end of the highlight sequence. More... | |
Integer | HighlightStart |
The index of the character at the start of the highlight sequence. More... | |
UI::TextOrdering | HorizontalOrder |
The order text will have in TextLines. More... | |
ColourValue | InactiveHLColour |
The colour of the highlight when this layer belongs to a widget not being focused. More... | |
Vector2 | ManualCharScaling |
The scaling to apply to all characters in this layer. More... | |
Real | MaxLineWidth |
The maximum width of textlines generated by this layer in pixels. More... | |
MarkupParser * | MUParser |
The parser to use when converting raw strings to renderable characters. More... | |
TextLineContainer | TextLines |
Container with all this layers TextLines. More... | |
TokenString * | TextTokens |
The actual text parsed into tokens used for generating characters. More... | |
UI::LinearAlignment | VerticalAlign |
The alignment TextLines will have. More... | |
Protected Attributes inherited from Mezzanine::UI::RenderLayer | |
Whole | IndexID |
Stores the index of this RenderLayer in it's parent QuadRenderable. More... | |
QuadRenderable * | Parent |
A pointer to the parent of this RenderLayer. More... | |
Real | RotAngle |
The amount of rotation to be applied to this RenderLayer in radians. More... | |
Vector2 | Scale |
The scaling applied to this RenderLayer. More... | |
Protected Attributes inherited from Mezzanine::UI::SimpleRenderer | |
Boole | Dirty |
This determines whether or not the vertices in this renderer need to be refreshed. More... | |
String | PriAtlas |
This contains the name of the atlas that will be used as default when one isn't specified. More... | |
std::vector< VertexData > | RenderVertices |
This is a container storing all the vertices generated by this renderer. More... | |
This is a base class for render layers that render text.
Definition at line 64 of file textlayer.h.
An enum used to describe how the text generated by this layer will be automatically scaled.
Enumerator | |
---|---|
SM_NoAutoScaling |
There is no auto-scaling applied to text in this layer. Any scaling has to be done explicitly. |
SM_ScreenRelative |
The provided scaler will be treated as relative to the Screen Y size. |
SM_ParentRelative |
The provided scaler will be treated as relative to the parent widget Y size. |
SM_LayerRelative |
The provided scaler will be treated as relative to this layers Y size after layer scaling. |
Definition at line 91 of file textlayer.h.
|
protected |
No-Font constructor.
ParentRenderable | The renderable that created this layer. |
Definition at line 61 of file textlayer.cpp.
|
protected |
Class constructor.
FontName | The name of the font to use for this layer. |
ParentRenderable | The renderable that created this layer. |
Definition at line 95 of file textlayer.cpp.
|
protected |
Text-Scaling constructor.
LineHeight | The relative scalar to be used when determining the size of characters generated by this text layer. |
ParentRenderable | The renderable that created this layer. |
Definition at line 130 of file textlayer.cpp.
TextLayer::CharacterIterator Mezzanine::UI::TextLayer::BeginCharacter | ( | ) |
Gets an iterator to the first Character.
Definition at line 918 of file textlayer.cpp.
TextLayer::ConstCharacterIterator Mezzanine::UI::TextLayer::BeginCharacter | ( | ) | const |
Gets a const iterator to the first Character.
Definition at line 924 of file textlayer.cpp.
|
virtual |
Gets an iterator to the first TextLine.
Definition at line 747 of file textlayer.cpp.
|
virtual |
Gets a const iterator to the first TextLine.
Definition at line 753 of file textlayer.cpp.
|
virtual |
Creates a new TextLine.
Definition at line 662 of file textlayer.cpp.
|
virtual |
Destroy's all characters in this TextLayer.
Definition at line 900 of file textlayer.cpp.
TextLayer::CharacterIterator Mezzanine::UI::TextLayer::EndCharacter | ( | ) |
Gets an iterator to one passed the last Character.
Definition at line 921 of file textlayer.cpp.
TextLayer::ConstCharacterIterator Mezzanine::UI::TextLayer::EndCharacter | ( | ) | const |
Gets an iterator to one passed the last Character.
Definition at line 927 of file textlayer.cpp.
|
virtual |
Gets an iterator to one passed the last TextLine.
Definition at line 750 of file textlayer.cpp.
|
virtual |
Gets a const iterator to one passed the last TextLine.
Definition at line 756 of file textlayer.cpp.
|
virtual |
Gets the colour of the highlight when the quad is being focused.
Definition at line 527 of file textlayer.cpp.
|
virtual |
Gets the relative scalar being used to automatically scale text generated by this layer.
Definition at line 481 of file textlayer.cpp.
|
virtual |
Gets the automatic scaling mode being used by this textlayer.
Definition at line 476 of file textlayer.cpp.
Gets a Character by index.
Index | The index of the Character to retrieve. |
Definition at line 762 of file textlayer.cpp.
Gets a Character by offset position.
Offset | The position relative to the top-left corner of this layer. |
Definition at line 767 of file textlayer.cpp.
|
virtual |
Gets an iterator to the character at the specified index.
Index | The index of the Character to retrieve. |
Definition at line 803 of file textlayer.cpp.
|
virtual |
Gets a const iterator to the character at the specified index.
Index | The index of the Character to retrieve. |
Definition at line 819 of file textlayer.cpp.
|
virtual |
Gets the TextCursor in use by this layer.
Definition at line 654 of file textlayer.cpp.
|
virtual |
Gets whether or not the Text Cursor is enabled.
Definition at line 649 of file textlayer.cpp.
|
virtual |
Gets the default font in use by this layer.
The font is defined in your mta file.
Definition at line 511 of file textlayer.cpp.
|
virtual |
Gets the most derived serializable name of this Renderable.
Reimplemented from Mezzanine::UI::RenderLayer.
Reimplemented in Mezzanine::UI::SingleLineTextLayer, and Mezzanine::UI::MultiLineTextLayer.
Definition at line 1099 of file textlayer.cpp.
|
virtual |
Gets the height in pixels this layer is configured to render it's text.
Definition at line 378 of file textlayer.cpp.
|
virtual |
Gets the index of this last character that is highlighted in this layer.
Definition at line 585 of file textlayer.cpp.
|
virtual |
Gets the index of the first character that is highlighted in this layer.
Definition at line 580 of file textlayer.cpp.
|
virtual |
Gets the colour of the highlight when the quad is being focused.
Definition at line 540 of file textlayer.cpp.
|
virtual |
Gets the index of the character at the specified offset position.
Offset | The offset position of the character to get the index of. |
Definition at line 393 of file textlayer.cpp.
|
protectedpure virtual |
Gets the index of the character at the specified offset position.
Position | The position (in screen space) of the character to retrieve if one exists. |
Implemented in Mezzanine::UI::SingleLineTextLayer, and Mezzanine::UI::MultiLineTextLayer.
|
virtual |
Gets the scaling currently being applied to the rendered text.
Definition at line 461 of file textlayer.cpp.
|
virtual |
Gets the MarkupParser being used by this TextLayer.
Definition at line 355 of file textlayer.cpp.
|
virtual |
Gets the maximum width of text lines in this layer.
Definition at line 373 of file textlayer.cpp.
|
virtual |
Gets the number of characters being rendered by this TextLayer.
Definition at line 835 of file textlayer.cpp.
|
virtual |
Gets the number of TextLines this layer contains.
Definition at line 696 of file textlayer.cpp.
|
virtual |
Gets the offset position of the character at the provided index.
Index | The index of the character position to retrieve. |
Definition at line 403 of file textlayer.cpp.
|
protectedpure virtual |
Gets the position of the character at the specified index.
Index | The character index to get the position offset of. |
Implemented in Mezzanine::UI::SingleLineTextLayer, and Mezzanine::UI::MultiLineTextLayer.
|
static |
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.
Definition at line 1102 of file textlayer.cpp.
|
virtual |
Gets the text displayed within this layer.
Definition at line 434 of file textlayer.cpp.
|
virtual |
Gets the default colour of the tect being rendered by this layer.
Definition at line 447 of file textlayer.cpp.
Gets the TextLine at the specified offset position.
Offset | The offset from the top edge of the parent layer. |
Definition at line 677 of file textlayer.cpp.
|
virtual |
Gets the current set alignment for positioning textlines in this layer.
Definition at line 742 of file textlayer.cpp.
|
virtual |
Gets the currently set direction of advancement for characters on the horizontal axis created by this layer.
Definition at line 624 of file textlayer.cpp.
|
virtual |
Gets the combined height of all the text lines in this layer.
Definition at line 363 of file textlayer.cpp.
|
virtual |
Highlights the character at the specified index.
Index | The index of the character to highlight. |
Definition at line 552 of file textlayer.cpp.
|
virtual |
Highlights all characters in a provided range.
StartIndex | The index of the first character in the range to highlight. |
EndIndex | The index of the last character in the range to highlight. |
Definition at line 564 of file textlayer.cpp.
|
virtual |
Creates a character from a Glyph ID and inserts it into the layer at the specified index.
Index | The index at which the character should be inserted. |
GlyphID | The ID of the Glyph to be inserted. |
Definition at line 840 of file textlayer.cpp.
|
virtual |
Creates a series of characters from a UTF-8 encoded string to be inserted into this layer.
Index | The index at which the characters will be inserted. |
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 851 of file textlayer.cpp.
|
virtual |
Creates a series of characters from a UTF-32 encoded string to be inserted into this layer.
Index | The index at which the characters will be inserted. |
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 862 of file textlayer.cpp.
|
virtual |
Populates text lines in this layer with parsed characters.
MaxWidth | The maximum line width to assume for all text lines that are to be populated. |
Definition at line 701 of file textlayer.cpp.
|
protectedpure virtual |
Clears and then places characters belonging to this layer in the appropriate text lines.
MaxWidth | The maximum line width to assume for all text lines that are to be populated. |
Implemented in Mezzanine::UI::SingleLineTextLayer, and Mezzanine::UI::MultiLineTextLayer.
|
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. |
Reimplemented from Mezzanine::UI::SimpleRenderer.
Definition at line 993 of file textlayer.cpp.
|
virtual |
Take the data stored in an XML Node and overwrite the TextCursor of this object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 1070 of file textlayer.cpp.
|
virtual |
Take the data stored in an XML Node and overwrite the properties of this object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Reimplemented from Mezzanine::UI::RenderLayer.
Reimplemented in Mezzanine::UI::SingleLineTextLayer, and Mezzanine::UI::MultiLineTextLayer.
Definition at line 1007 of file textlayer.cpp.
|
virtual |
Take the data stored in an XML Node and overwrite the Text of this object with it.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 1081 of file textlayer.cpp.
|
virtual |
Convert this class to an XML::Node ready for serialization.
ParentNode | The point in the XML hierarchy that all this renderable should be appended to. |
Reimplemented from Mezzanine::UI::SimpleRenderer.
Definition at line 933 of file textlayer.cpp.
|
virtual |
Convert the TextCursor of this class to an XML::Node ready for seriailization.
SelfRoot | The root node containing all the serialized data for this instance. |
Definition at line 973 of file textlayer.cpp.
|
virtual |
Convert the properties of this class to an XML::Node ready for serialization.
SelfRoot | The root node containing all the serialized data for this instance. |
Reimplemented from Mezzanine::UI::RenderLayer.
Reimplemented in Mezzanine::UI::SingleLineTextLayer, and Mezzanine::UI::MultiLineTextLayer.
Definition at line 942 of file textlayer.cpp.
|
virtual |
Convert the Text of this class to an XML::Node ready for serialization.
SelfRoot | The root node containing all the serialized data for this instance. |
Definition at line 981 of file textlayer.cpp.
|
protectedvirtual |
Recalculates the offset for every text line in this layer.
Definition at line 313 of file textlayer.cpp.
|
protectedvirtual |
Provides the class specific implementation for regenerating vertices for this renderable.
Force | Whether or not to force the regenerating of vertices regardless of whether or not the data is dirty. |
Implements Mezzanine::UI::SimpleRenderer.
Definition at line 174 of file textlayer.cpp.
Removes a character from the layer at the specified index.
Index | The index of the character to be removed. |
Definition at line 873 of file textlayer.cpp.
|
virtual |
Removes a range of characters from the text in this layer.
First | The first character in the range to be removed. |
Last | The last character in the range to be removed. |
Definition at line 895 of file textlayer.cpp.
|
virtual |
Removes a length of characters from this layer at the specified index.
Index | The index of the start of the range of characters to be removed. |
Length | The number of characters being removed. |
Definition at line 884 of file textlayer.cpp.
|
virtual |
Sets the colour of the highlight when the quad is being focused.
Colour | The highlight colour while being focused. |
Definition at line 519 of file textlayer.cpp.
|
virtual |
Sets the mode and scaler of auto-scaling applied to the text generated by this textlayer.
Mode | A ScalingMode enum value describing what the provided scaler will be relative to. |
Scalar | The relative value that will be used to determine the needed scaling to be applied to text in this layer. |
Definition at line 466 of file textlayer.cpp.
|
virtual |
Enables (or disables) the cursor for use in this layer.
Enable | True to enable the cursor and make it available for manipulation/rendering, false to disable it. |
Definition at line 632 of file textlayer.cpp.
|
virtual |
Sets the default font to be used with this layer.
NewFont | The default font to use for this layer. |
Definition at line 489 of file textlayer.cpp.
|
virtual |
Sets the default font to be used with this layer.
The font name is defined in your mta file. This class can change which glyph is uses with it's markup language. This simply defines which to use when one isn't specified.
FontName | The name of the font to use for this layer. |
Definition at line 499 of file textlayer.cpp.
|
virtual |
Sets the default font to be used with this layer.
The font is defined in your mta file. This class can change which glyph is uses with it's markup language. This simply defines which to use when one isn't specified.
FontName | The name of the font to use for this layer. |
Atlas | The different atlas to get the glyphdata from. |
Definition at line 505 of file textlayer.cpp.
|
virtual |
Sets the colour of the highlight when the quad is not focused.
Colour | The highlight colour while |
Definition at line 532 of file textlayer.cpp.
|
virtual |
Sets the scaling to be applied to the text being rendered.
Scale | A Vector2 representing the scale on both dimensions to be applied. <1.0 means smaller, >1.0 means larger. |
Definition at line 452 of file textlayer.cpp.
|
virtual |
Sets the MarkupParser to be used by this TextLayer.
Parser | A pointer to the MarkupParser to be used by this TextLayer. |
Definition at line 339 of file textlayer.cpp.
Sets the MarkupParser to be used by this TextLayer via it's registered name.
ParserName | The name of the registered parser to retrieve and set for this TextLayer. |
Definition at line 349 of file textlayer.cpp.
|
virtual |
Sets the text displayed within this layer.
Text | The text to be displayed. |
Definition at line 411 of file textlayer.cpp.
|
virtual |
Sets the default colour of the text being rendered by this layer.
Colour | The colour to apply to the text of this layer. |
Definition at line 439 of file textlayer.cpp.
|
virtual |
Sets the horizontal alignment of every textline in this layer.
Align | A LinearAlignment enum value indicating how each text line in this layer should align it's text. |
Definition at line 726 of file textlayer.cpp.
|
virtual |
Sets the alignment used to determine the start position of the textlines in this layer.
Align | The alignment to use. |
Definition at line 732 of file textlayer.cpp.
|
virtual |
Sets the ordering for characters in this layer.
Order | The direction of advancement for characters on the horizontal axis. |
Definition at line 611 of file textlayer.cpp.
|
protected |
The colour of the highlight when this layer belongs to a focused widget.
Definition at line 110 of file textlayer.h.
|
protected |
The auto-scaling height the text is to be in relative units.
Definition at line 137 of file textlayer.h.
|
protected |
The auto-scaling mode that is to be used on text generated by this textlayer.
Definition at line 140 of file textlayer.h.
|
protected |
Container with all this layers Characters.
Definition at line 104 of file textlayer.h.
|
protected |
The cursor to be used for insert and manipulation operations.
Definition at line 122 of file textlayer.h.
|
protected |
Default set of traits all characters generated inside this layer are to have.
Definition at line 107 of file textlayer.h.
|
protected |
The index of the character at the end of the highlight sequence.
Definition at line 131 of file textlayer.h.
|
protected |
The index of the character at the start of the highlight sequence.
Definition at line 128 of file textlayer.h.
|
protected |
The order text will have in TextLines.
Definition at line 143 of file textlayer.h.
|
protected |
The colour of the highlight when this layer belongs to a widget not being focused.
Definition at line 113 of file textlayer.h.
|
protected |
The scaling to apply to all characters in this layer.
Definition at line 116 of file textlayer.h.
|
protected |
The maximum width of textlines generated by this layer in pixels.
Definition at line 134 of file textlayer.h.
|
protected |
The parser to use when converting raw strings to renderable characters.
Definition at line 119 of file textlayer.h.
|
protected |
Container with all this layers TextLines.
Definition at line 101 of file textlayer.h.
|
protected |
The actual text parsed into tokens used for generating characters.
Definition at line 125 of file textlayer.h.
|
protected |
The alignment TextLines will have.
Definition at line 146 of file textlayer.h.