41 #ifndef _uitextlayer_h
42 #define _uitextlayer_h
44 #include "UI/renderlayer.h"
45 #include "UI/character.h"
95 SM_ScreenRelative = 1,
96 SM_ParentRelative = 2,
150 virtual void RedrawImpl(
bool Force);
153 virtual void RecalculateOffsets();
156 virtual void PopulateTextLinesImpl() = 0;
190 virtual bool SetMarkupParser(
const String& ParserName);
199 virtual void SetScale(
const Vector2& Scaling);
202 virtual Real GetTotalHeight()
const;
205 virtual Real GetDesiredLineHeight()
const;
228 virtual void SetText(
const String& Text);
231 virtual String GetText()
const;
234 virtual void SetTextColour(
const ColourValue& Colour);
242 virtual void SetManualTextScale(
const Vector2& Scale);
245 virtual const Vector2& GetManualTextScale()
const;
263 virtual Real GetAutoTextScalar()
const;
270 virtual void SetDefaultFont(
FontData* NewFont);
276 virtual void SetDefaultFont(
const String& FontName);
283 virtual void SetDefaultFont(
const String& FontName,
const String& Atlas);
296 virtual void SetActiveHighlightBackgroundColour(
const ColourValue& Colour);
299 virtual const ColourValue& GetActiveHighlightBackgroundColour()
const;
304 virtual void SetInactiveHighlightBackgroundColour(
const ColourValue& Colour);
307 virtual const ColourValue& GetInactiveHighlightBackgroundColour()
const;
310 virtual void Highlight();
313 virtual void Highlight(
const Integer Index);
317 virtual void Highlight(
const Integer StartIndex,
const Integer EndIndex);
320 virtual Integer GetHighlightStart()
const;
323 virtual Integer GetHighlightEnd()
const;
325 virtual void ClearHighlights();
344 virtual void SetCursorEnabled(
bool Enable);
347 virtual bool GetCursorEnabled()
const;
361 virtual TextLine* GetTextLineAtOffset(
const Real& Offset);
364 virtual UInt32 GetNumTextLines()
const;
367 virtual void PopulateTextLines();
369 virtual void ClearAllTextLines();
371 virtual void DestroyAllTextLines();
420 virtual Whole GetNumCharacters()
const;
425 virtual void InsertCharacterAtIndex(
const Integer Index,
const UInt32 GlyphID);
430 virtual void InsertCharactersAtIndex(
const Integer Index,
const Char8* Characters,
const UInt32 BufSize);
435 virtual void InsertCharactersAtIndex(
const Integer Index,
const UInt32* Characters,
const UInt32 BufSize);
438 virtual void RemoveCharacterAtIndex(
const Integer Index);
442 virtual void RemoveCharactersAtIndex(
const Integer Index,
const UInt32 Length);
446 virtual void RemoveCharacterRange(
const Integer First,
const Integer Last);
448 virtual void DestroyAllCharacters();
467 virtual void ProtoSerialize(
XML::Node& ParentNode)
const;
469 virtual void ProtoSerializeProperties(
XML::Node& SelfRoot)
const;
472 virtual void ProtoSerializeCursor(
XML::Node& SelfRoot)
const;
475 virtual void ProtoSerializeText(
XML::Node& SelfRoot)
const;
478 virtual void ProtoDeSerialize(
const XML::Node& SelfRoot);
480 virtual void ProtoDeSerializeProperties(
const XML::Node& SelfRoot);
483 virtual void ProtoDeSerializeCursor(
const XML::Node& SelfRoot);
486 virtual void ProtoDeSerializeText(
const XML::Node& SelfRoot);
489 virtual String GetDerivedSerializableName()
const;
491 static String GetSerializableName();