44 #include "character.h"
99 virtual Character* GetSecondFromLastCharacter()
const = 0;
102 virtual void RecalculateOffsets() = 0;
106 virtual void AppendToBack(
Character* ToAppend) = 0;
111 virtual void AppendToBack(CharacterIterator First, CharacterIterator Last) = 0;
134 OffsetResultPair GetCharacterAndCursorPositionAtOffset(
const Real& Offset)
const;
139 Integer GetIndexAtOffset(
const Real& Offset)
const;
148 Real GetLeftMostCursorPosition()
const;
151 Real GetRightMostCursorPosition()
const;
154 virtual Real GetCursorStartPosition()
const = 0;
158 Real GetClosestCursorPosition(
const Real& Offset);
166 void SetPositionOffset(
const Real& Offset);
169 Real GetPositionOffset()
const;
173 Real GetCurrentLength()
const;
176 Real GetLineHeight()
const;
190 Boole AppendCharacters(CharacterContainer& ToAdd,
const Real MaxWidth);
195 Boole AppendCharacters(CharacterIteratorPair Pair,
const Real MaxWidth);
201 virtual Boole AppendCharacters(CharacterIterator First, CharacterIterator Last,
const Real MaxWidth) = 0;
207 CharacterIterator AppendFittingCharacters(CharacterContainer& ToAdd,
const Real MaxWidth);
213 CharacterIterator AppendFittingCharacters(CharacterIteratorPair Pair,
const Real MaxWidth);
220 virtual CharacterIterator AppendFittingCharacters(CharacterIterator First, CharacterIterator Last,
const Real MaxWidth) = 0;
232 UInt32 GetNumCharacters()
const;
234 void RemoveAllCharacters();
241 virtual CharacterIterator GetFirstCharacter() = 0;
247 virtual CharacterIterator GetLastCharacter() = 0;
251 virtual CharacterIterator GetNextCharacter(CharacterIterator Current) = 0;
253 virtual void RemoveFirstCharacter() = 0;
255 virtual void RemoveLastCharacter() = 0;
259 CharacterIterator BeginCharacter();
262 CharacterIterator EndCharacter();
265 ConstCharacterIterator BeginCharacter()
const;
268 ConstCharacterIterator EndCharacter()
const;
279 Character* GetSecondFromLastCharacter()
const;
281 void RecalculateOffsets();
297 Real GetCursorStartPosition()
const;
314 void RemoveFirstCharacter();
316 void RemoveLastCharacter();
327 Character* GetSecondFromLastCharacter()
const;
329 void RecalculateOffsets();
345 Real GetCursorStartPosition()
const;
362 void RemoveFirstCharacter();
364 void RemoveLastCharacter();
TextLayer * Parent
The parent layer this text line belongs to.
bool Boole
Generally acts a single bit, true or false.
Real PositionOffset
The offset in pixels from the parent layer on the Y axis.
int Integer
A datatype used to represent any integer close to.
Real CurrLength
The current length of this TextLine.
This represents a single line of text to be rendered by a TextLayer.
This is a TextLine specialization class for text read from the right to the left. ...
float Real
A Datatype used to represent a real floating point number.
LinearAlignment
Used by various UI classes to determine the alignment of their child objects, such as text in text li...
std::list< Character * > CharacterContainer
Basic container type for Character storage by this class.
This is a TextLine specialization class for text read from the left to the right. ...
CharacterContainer::const_reverse_iterator ReverseConstCharacterIterator
Const Reverse Iterator type for Character instances stored by this class.
std::pair< Character *, Vector2 > OffsetResultPair
An std::pair storing a Character and it's offset position (relative to the parent layer)...
This class creates and encapsultes a character that can be used in text renders.
uint32_t UInt32
An 32-bit unsigned integer.
Real TallestHeight
The size of the largest glyph on the Y axis.
UI::LinearAlignment Alignment
The alignment of the text on the X axis in this line.
std::pair< CharacterIterator, CharacterIterator > CharacterIteratorPair
An std::pair storing two CharacterIterators, usually for expressing a range.
CharacterContainer::iterator CharacterIterator
Iterator type for Character instances stored by this class.
CharacterContainer::reverse_iterator ReverseCharacterIterator
Reverse Iterator type for Character instances stored by this class.
The bulk of the engine components go in this namspace.
CharacterContainer::const_iterator ConstCharacterIterator
Const Iterator type for Character instances stored by this class.
This is a base class for render layers that render text.
CharacterContainer Characters
Vector containing all the characters belonging to this TextLine.