MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
textlayer.h
1 //© Copyright 2010 - 2012 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  The Mezzanine Engine is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 
41 #ifndef _uitextlayer_h
42 #define _uitextlayer_h
43 
44 #include "UI/renderlayer.h"
45 #include "UI/character.h"
46 
47 namespace Mezzanine
48 {
49  namespace UI
50  {
51  class TextLine;
52  class TextCursor;
53  class FontData;
54  class Glyph;
55  class Sprite;
56  class Character;
57  class MarkupParser;
58  class TextToken;
59  class TokenString;
60  ///////////////////////////////////////////////////////////////////////////////
61  /// @brief This is a base class for render layers that render text.
62  /// @details
63  ///////////////////////////////////////
65  {
66  public:
67  /// @brief Basic container type for the storage of @ref Character instances by this class.
68  typedef std::list<Character*> CharacterContainer;
69  /// @brief Iterator type for @ref Character instances stored by this class.
70  typedef CharacterContainer::iterator CharacterIterator;
71  /// @brief Const Iterator type for @ref Character instances stored by this class.
72  typedef CharacterContainer::const_iterator ConstCharacterIterator;
73  /// @brief Reverse Iterator type for @ref Character instances stored by this class.
74  typedef CharacterContainer::reverse_iterator ReverseCharacterIterator;
75  /// @brief Const Reverse Iterator type for @ref Character instances stored by this class.
76  typedef CharacterContainer::const_reverse_iterator ConstReverseCharacterIterator;
77  /// @brief An std::pair type storing two character iterators, usually used to express a range.
78  typedef std::pair<CharacterIterator,CharacterIterator> CharacterIteratorPair;
79  /// @brief Basic container type for the storate of @ref TextLine instances by this class.
80  typedef std::vector<TextLine*> TextLineContainer;
81  /// @brief Iterator type for @ref TextLine instances stored by this class.
82  typedef TextLineContainer::iterator TextLineIterator;
83  /// @brief Const Iterator type for @ref TextLine instances stored by this class.
84  typedef TextLineContainer::const_iterator ConstTextLineIterator;
85  /// @brief An std::pair type used as a return for index-offset conversions.
86  typedef std::pair<Boolean,Integer> CharIndexPair;
87  /// @brief An std::pair type used as a return for index-offset conversions.
88  typedef std::pair<Boolean,Vector2> CharOffsetPair;
89 
90  /// @enum AutoScaleMode
91  /// @brief An enum used to describe how the text generated by this layer will be automatically scaled.
93  {
94  SM_NoAutoScaling = 0, ///< There is no auto-scaling applied to text in this layer. Any scaling has to be done explicitly.
95  SM_ScreenRelative = 1, ///< The provided scaler will be treated as relative to the Screen Y size.
96  SM_ParentRelative = 2, ///< The provided scaler will be treated as relative to the parent widget Y size.
97  SM_LayerRelative = 3 ///< The provided scaler will be treated as relative to this layers Y size after layer scaling.
98  };
99  protected:
100  /// @internal
101  /// @brief Container with all this layers TextLines.
103  /// @internal
104  /// @brief Container with all this layers Characters.
106  /// @internal
107  /// @brief Default set of traits all characters generated inside this layer are to have.
109  /// @internal
110  /// @brief The colour of the highlight when this layer belongs to a focused widget.
112  /// @internal
113  /// @brief The colour of the highlight when this layer belongs to a widget not being focused.
115  /// @internal
116  /// @brief The scaling to apply to all characters in this layer.
118  /// @internal
119  /// @brief The parser to use when converting raw strings to renderable characters.
121  /// @internal
122  /// @brief The cursor to be used for insert and manipulation operations.
124  /// @internal
125  /// @brief The actual text parsed into tokens used for generating characters.
127  /// @internal
128  /// @brief The index of the character at the start of the highlight sequence.
130  /// @internal
131  /// @brief The index of the character at the end of the highlight sequence.
133  /// @internal
134  /// @brief The auto-scaling height the text is to be in relative units.
136  /// @internal
137  /// @brief The auto-scaling mode that is to be used on text generated by this textlayer.
139  /// @internal
140  /// @brief The order text will have in TextLines.
142  /// @internal
143  /// @brief The alignment TextLines will have.
145  /// @internal
146  /// @brief Flag indicating the scaling for the layer has been altered.
147  Boolean ScalingChanged;
148 
149  /// @copydoc SimpleRenderer::RedrawImpl(bool Force)
150  virtual void RedrawImpl(bool Force);
151  /// @internal
152  /// @brief Recalculates the offset for every text line in this layer.
153  virtual void RecalculateOffsets();
154  /// @internal
155  /// @brief Clears and then places characters belonging to this layer in the appropriate text lines.
156  virtual void PopulateTextLinesImpl() = 0;
157  /// @internal
158  /// @brief Gets the index of the character at the specified offset position.
159  virtual CharIndexPair GetIndexAtOffsetImpl(const Vector2& Position) = 0;
160  /// @internal
161  /// @brief Gets the position of the character at the specified index.
162  virtual CharOffsetPair GetOffsetAtIndexImpl(const Integer Index) = 0;
163  //public:
164  /// @brief No-Font constructor.
165  /// @param ParentRenderable The renderable that created this layer.
166  TextLayer(QuadRenderable* ParentRenderable);
167  /// @brief Class constructor.
168  /// @param FontName The name of the font to use for this layer.
169  /// @param ParentRenderable The renderable that created this layer.
170  TextLayer(const String& FontName, QuadRenderable* ParentRenderable);
171  /// @brief Text-Scaling constructor.
172  /// @note This constructor defaults to Screen Relative text, but this can be altered after construction.
173  /// @param LineHeight The relative scalar to be used when determining the size of characters generated by this text layer.
174  /// @param ParentRenderable The renderable that created this layer.
175  TextLayer(const Real& LineHeight, QuadRenderable* ParentRenderable);
176  /// @brief Class destructor.
177  virtual ~TextLayer();
178  public:
179  ///////////////////////////////////////////////////////////////////////////////
180  // Parser Methods
181 
182  /// @brief Sets the MarkupParser to be used by this TextLayer.
183  /// @note Passing in NULL will be ignored.
184  /// @param Parser A pointer to the MarkupParser to be used by this TextLayer.
185  /// @return Returns true if the new MarkupParser was successfully set, false otherwise.
186  virtual bool SetMarkupParser(MarkupParser* Parser);
187  /// @brief Sets the MarkupParser to be used by this TextLayer via it's registered name.
188  /// @param ParserName The name of the registered parser to retrieve and set for this TextLayer.
189  /// @return Returns true if the new MarkupParser was successfully set, false otherwise.
190  virtual bool SetMarkupParser(const String& ParserName);
191  /// @brief Gets the MarkupParser being used by this TextLayer.
192  /// @return Returns a pointer to the MarkupParser currently being used by this TextLayer.
193  virtual MarkupParser* GetMarkupParser() const;
194 
195  ///////////////////////////////////////////////////////////////////////////////
196  // Utility
197 
198  /// @copydoc RenderLayer::SetScale(const Vector2& Scaling)
199  virtual void SetScale(const Vector2& Scaling);
200  /// @brief Gets the combined height of all the text lines in this layer.
201  /// @return Returns a Real representing the pixel height of all the textlines in this layer.
202  virtual Real GetTotalHeight() const;
203  /// @brief Gets the height in pixels this layer is configured to render it's text.
204  /// @return Returns a Real representing the pixel height of text lines in this layer that is desired.
205  virtual Real GetDesiredLineHeight() const;
206 
207  ///////////////////////////////////////////////////////////////////////////////
208  // Offset - Index Conversion Methods
209 
210  /// @brief Gets the index of the character at the specified offset position.
211  /// @param Offset The offset position of the character to get the index of.
212  /// @return Returns a CharIndexPair where the first value is a bool which will be false if
213  /// the position is invalid for whatever reason. The second value will be in the index. If
214  /// the second value is -1 then the position is to the right of the last character.
215  virtual CharIndexPair GetIndexAtOffset(const Vector2& Offset);
216  /// @brief Gets the offset position of the character at the provided index.
217  /// @param Index The index of the character position to retrieve.
218  /// @return Returns a CharOffsetPair where the first value is a bool which will be false if the
219  /// index is invalid for any reason, and the second value is the offset position of the
220  /// character at the specified index if the first value is true.
221  virtual CharOffsetPair GetOffsetAtIndex(const Integer Index);
222 
223  ///////////////////////////////////////////////////////////////////////////////
224  // Text Methods
225 
226  /// @brief Sets the text displayed within this layer.
227  /// @param Text The text to be displayed.
228  virtual void SetText(const String& Text);
229  /// @brief Gets the text displayed within this layer.
230  /// @return Returns the text being displayed.
231  virtual String GetText() const;
232  /// @brief Sets the default colour of the text being rendered by this layer.
233  /// @param Colour The colour to apply to the text of this layer.
234  virtual void SetTextColour(const ColourValue& Colour);
235  /// @brief Gets the default colour of the tect being rendered by this layer.
236  /// @return Returns a const ColourValue reference containing the colour used to render this layer's text.
237  virtual const ColourValue& GetTextColour() const;
238 
239  /// @brief Sets the scaling to be applied to the text being rendered.
240  /// @remarks Manual scaling is applied after any autoscaling settings are applied.
241  /// @param Scale A Vector2 representing the scale on both dimensions to be applied. <1.0 means smaller, >1.0 means larger.
242  virtual void SetManualTextScale(const Vector2& Scale);
243  /// @brief Gets the scaling currently being applied to the rendered text.
244  /// @return Returns a Vector2 representing the scale applied to the text in this layer. <1.0 means smaller, >1.0 means larger.
245  virtual const Vector2& GetManualTextScale() const;
246  /// @brief Sets the mode and scaler of auto-scaling applied to the text generated by this textlayer.
247  /// @remarks There are a lot of considerations to be made with auto-scaling. Auto-scaling will adjust the size of the provided font
248  /// automatically based on the scaling mode that is set, which really decides what the relative scalar provided for auto-scaling is
249  /// relative to. If auto-scaling is relative to the screen, then the text will only change in size when the screen does. Parent and
250  /// layer relative scaling are very similiar since layers get their dimensions from the parent widget they belong to. The difference
251  /// comes from scaling applied to the layer itself. Parent relative scaling ignores the layer scaling, while layer relative factors
252  /// it in. @n @n
253  /// In addition to the relative component to the scaling, manual scaling will also be applied after the auto-scaling is. Auto-scaling
254  /// will be completely ignored if the custom size on a character is set.
255  /// @param Mode A ScalingMode enum value describing what the provided scaler will be relative to.
256  /// @param Scalar The relative value that will be used to determine the needed scaling to be applied to text in this layer.
257  virtual void SetAutoTextScale(const TextLayer::ScalingMode Mode, const Real Scalar);
258  /// @brief Gets the automatic scaling mode being used by this textlayer.
259  /// @return Returns a ScalingMode enum value describing what the relative scaler is relative to, if auto-scaling is enabled at all.
260  virtual TextLayer::ScalingMode GetAutoTextScalingMode() const;
261  /// @brief Gets the relative scalar being used to automatically scale text generated by this layer.
262  /// @return Returns a Real representing the relative Y size to use when detmining how to uniformly scale text in this layer.
263  virtual Real GetAutoTextScalar() const;
264 
265  ///////////////////////////////////////////////////////////////////////////////
266  // Font Methods
267 
268  /// @brief Sets the default font to be used with this layer.
269  /// @param NewFont The default font to use for this layer.
270  virtual void SetDefaultFont(FontData* NewFont);
271  /// @brief Sets the default font to be used with this layer.
272  /// @details The font name is defined in your mta file. This class can change which
273  /// glyph is uses with it's markup language. This simply defines which to use when one isn't
274  /// specified.
275  /// @param FontName The name of the font to use for this layer.
276  virtual void SetDefaultFont(const String& FontName);
277  /// @brief Sets the default font to be used with this layer.
278  /// @details The font is defined in your mta file. This class can change which
279  /// glyph is uses with it's markup language. This simply defines which to use when one isn't
280  /// specified.
281  /// @param FontName The name of the font to use for this layer.
282  /// @param Atlas The different atlas to get the glyphdata from.
283  virtual void SetDefaultFont(const String& FontName, const String& Atlas);
284  /// @brief Gets the default font in use by this layer.
285  /// @details The font is defined in your mta file.
286  /// @return Returns a pointer to the font in use by this layer.
287  virtual FontData* GetDefaultFont();
288 
289  ///////////////////////////////////////////////////////////////////////////////
290  // Highlight Methods
291 
292  /// @brief Sets the colour of the highlight when the quad is being focused.
293  /// @note Being focused is a property of Widgets, which the parent quad may not be.
294  /// In general highlighting in a non-Widget is likely or recommended.
295  /// @param Colour The highlight colour while being focused.
296  virtual void SetActiveHighlightBackgroundColour(const ColourValue& Colour);
297  /// @brief Gets the colour of the highlight when the quad is being focused.
298  /// @return Returns a const ColourValue reference containing the colour used to render highlights while the parent quad is focused.
299  virtual const ColourValue& GetActiveHighlightBackgroundColour() const;
300  /// @brief Sets the colour of the highlight when the quad is not focused.
301  /// @note Being focused is a property of Widgets, which the parent quad may not be.
302  /// In general highlighting in a non-Widget is likely or recommended.
303  /// @param Colour The highlight colour while
304  virtual void SetInactiveHighlightBackgroundColour(const ColourValue& Colour);
305  /// @brief Gets the colour of the highlight when the quad is being focused.
306  /// @return Returns a const ColourValue reference containing the colour used to render highlights while the parent quad is not focused.
307  virtual const ColourValue& GetInactiveHighlightBackgroundColour() const;
308 
309  /// @brief Highlights all characters in this layer.
310  virtual void Highlight();
311  /// @brief Highlights the character at the specified index.
312  /// @param Index The index of the character to highlight.
313  virtual void Highlight(const Integer Index);
314  /// @brief Highlights all characters in a provided range.
315  /// @param StartIndex The index of the first character in the range to highlight.
316  /// @param EndIndex The index of the last character in the range to highlight.
317  virtual void Highlight(const Integer StartIndex, const Integer EndIndex);
318  /// @brief Gets the index of the first character that is highlighted in this layer.
319  /// @return Returns the index of the first character in the highlighted range, or -1 if nothing is highlighted.
320  virtual Integer GetHighlightStart() const;
321  /// @brief Gets the index of this last character that is highlighted in this layer.
322  /// @return Returns the index of the last character in the highlighted range, or -1 if nothing is highlighted.
323  virtual Integer GetHighlightEnd() const;
324  /// @brief Clears all the highlights in this layer.
325  virtual void ClearHighlights();
326 
327  ///////////////////////////////////////////////////////////////////////////////
328  // Ordering Methods
329 
330  /// @brief Sets the ordering for characters in this layer.
331  /// @remarks The Text Line Order determines if characters are ordered left to right, or right to left.
332  /// @param Order The direction of advancement for characters on the horizontal axis.
333  virtual void SetTextOrder(const UI::TextOrdering Order);
334  /// @brief Gets the currently set direction of advancement for characters on the horizontal axis created by this layer.
335  /// @return Returns the direction of advancement for characters on the horizontal axis.
336  virtual UI::TextOrdering GetTextOrder() const;
337 
338  ///////////////////////////////////////////////////////////////////////////////
339  // Cursor Methods
340 
341  /// @brief Enables (or disables) the cursor for use in this layer.
342  /// @note The default state for the Text Cursor is disabled.
343  /// @param Enable True to enable the cursor and make it available for manipulation/rendering, false to disable it.
344  virtual void SetCursorEnabled(bool Enable);
345  /// @brief Gets whether or not the Text Cursor is enabled.
346  /// @return Returns true if the cursor is being rendered, false otherwise.
347  virtual bool GetCursorEnabled() const;
348  /// @brief Gets the TextCursor in use by this layer.
349  /// @return Returns a pointer to this layers TextCursor, or NULL if it is disabled.
350  virtual TextCursor* GetCursor() const;
351 
352  ///////////////////////////////////////////////////////////////////////////////
353  // TextLine Methods
354 
355  /// @brief Creates a new TextLine.
356  /// @return Returns a pointer to the created TextLine.
357  virtual TextLine* CreateTextLine();
358  /// @brief Gets the TextLine at the specified offset position.
359  /// @param Offset The offset from the top edge of the parent layer.
360  /// @return Returns a pointer to the TextLine at the requested offset, or NULL if none exists.
361  virtual TextLine* GetTextLineAtOffset(const Real& Offset);
362  /// @brief Gets the number of TextLines this layer contains.
363  /// @return Returns a UInt32 representing the number of lines of text this layer has.
364  virtual UInt32 GetNumTextLines() const;
365 
366  /// @brief Populates text lines in this layer with parsed characters.
367  virtual void PopulateTextLines();
368  /// @brief Removes all characters from all TextLines belonging to this layer.
369  virtual void ClearAllTextLines();
370  /// @brief Destroys all TextLines in this layer.
371  virtual void DestroyAllTextLines();
372 
373  /// @brief Sets the alignment used to determine the start position of the textlines in this layer.
374  /// @note TextLines can easily run out of room in a given layer. If the combined vertical height of the TextLines
375  /// in this layer exceed the size given for rendering then this setting is ignored, and text will render from the top.
376  /// @param Align The alignment to use.
377  virtual void SetTextlineVerticalAlignment(const UI::LinearAlignment Align);
378  /// @brief Gets the current set alignment for positioning textlines in this layer.
379  /// @return Returns the current TextLine position alignment.
380  virtual UI::LinearAlignment GetTextlineVerticalAlignment() const;
381 
382  /// @brief Gets an iterator to the first TextLine.
383  /// @return Returns an iterator to the first TextLine being stored by this TextLayer.
384  virtual TextLineIterator BeginTextLine();
385  /// @brief Gets an iterator to one passed the last TextLine.
386  /// @return Returns an iterator to one passed the last TextLine being stored by this TextLayer.
387  virtual TextLineIterator EndTextLine();
388  /// @brief Gets a const iterator to the first TextLine.
389  /// @return Returns a const iterator to the first TextLine being stored by this TextLayer.
390  virtual ConstTextLineIterator BeginTextLine() const;
391  /// @brief Gets a const iterator to one passed the last TextLine.
392  /// @return Returns a const iterator to one passed the last TextLine being stored by this TextLayer.
393  virtual ConstTextLineIterator EndTextLine() const;
394 
395  ///////////////////////////////////////////////////////////////////////////////
396  // Character Methods
397 
398  /// @brief Gets a Character by index.
399  /// @note The index is counted from the left to the right, regardless of text order.
400  /// @param Index The index of the Character to retrieve.
401  /// @return Returns a pointer to the requested Character.
402  virtual Character* GetCharacterAtIndex(const Integer Index) const;
403  /// @brief Gets a Character by offset position.
404  /// @warning Depending on what has been updated there is a chance this may not get the proper character
405  /// for the current configuration until after the next frame is drawn. In most cases this will be safe,
406  /// but may not always be.
407  /// @param Offset The position relative to the top-left corner of this layer.
408  /// @return Returns a pointer to the character under the provided position, or NULL if the position is invalid.
409  virtual Character* GetCharacterAtOffset(const Vector2& Offset) const;
410  /// @brief Gets an iterator to the character at the specified index.
411  /// @param Index The index of the Character to retrieve.
412  /// @return Returns an iterator to the requested Character.
413  virtual CharacterIterator GetCharacterIteratorAtIndex(const Integer Index);
414  /// @brief Gets a const iterator to the character at the specified index.
415  /// @param Index The index of the Character to retrieve.
416  /// @return Returns a const iterator to the requested Character.
417  virtual ConstCharacterIterator GetCharacterIteratorAtIndex(const Integer Index) const;
418  /// @brief Gets the number of characters being rendered by this TextLayer.
419  /// @return Returns a Whole representing the number of rendered characters being rendered by this TextLayer.
420  virtual Whole GetNumCharacters() const;
421 
422  /// @brief Creates a character from a Glyph ID and inserts it into the layer at the specified index.
423  /// @param Index The index at which the character should be inserted.
424  /// @param GlyphID The ID of the Glyph to be inserted.
425  virtual void InsertCharacterAtIndex(const Integer Index, const UInt32 GlyphID);
426  /// @brief Creates a series of characters from a UTF-8 encoded string to be inserted into this layer.
427  /// @param Index The index at which the characters will be inserted.
428  /// @param Characters An array of Char8's encoded in UTF-8 to be inserted.
429  /// @param BufSize The size of the array of Char8's passed in.
430  virtual void InsertCharactersAtIndex(const Integer Index, const Char8* Characters, const UInt32 BufSize);
431  /// @brief Creates a series of characters from a UTF-32 encoded string to be inserted into this layer.
432  /// @param Index The index at which the characters will be inserted.
433  /// @param Characters An array of UInt32's encoded in UTF-32 to be inserted.
434  /// @param BufSize The size of the array of Char8's passed in.
435  virtual void InsertCharactersAtIndex(const Integer Index, const UInt32* Characters, const UInt32 BufSize);
436  /// @brief Removes a character from the layer at the specified index.
437  /// @param Index The index of the character to be removed.
438  virtual void RemoveCharacterAtIndex(const Integer Index);
439  /// @brief Removes a length of characters from this layer at the specified index.
440  /// @param Index The index of the start of the range of characters to be removed.
441  /// @param Length The number of characters being removed.
442  virtual void RemoveCharactersAtIndex(const Integer Index, const UInt32 Length);
443  /// @brief Removes a range of characters from the text in this layer.
444  /// @param First The first character in the range to be removed.
445  /// @param Last The last character in the range to be removed.
446  virtual void RemoveCharacterRange(const Integer First, const Integer Last);
447  /// @brief Destroy's all characters in this TextLayer
448  virtual void DestroyAllCharacters();
449 
450  /// @brief Gets an iterator to the first Character.
451  /// @return Returns an iterator to the first Character being stored by this TextLine.
452  CharacterIterator BeginCharacter();
453  /// @brief Gets an iterator to one passed the last Character.
454  /// @return Returns an iterator to one passed the last Character being stored by this TextLine.
455  CharacterIterator EndCharacter();
456  /// @brief Gets a const iterator to the first Character.
457  /// @return Returns a const iterator to the first Character being stored by this TextLine.
458  ConstCharacterIterator BeginCharacter() const;
459  /// @brief Gets an iterator to one passed the last Character.
460  /// @return Returns an iterator to one passed the last Character being stored by this TextLine.
461  ConstCharacterIterator EndCharacter() const;
462 
463  ///////////////////////////////////////////////////////////////////////////////
464  // Serialization
465 
466  /// @copydoc SimpleRenderer::ProtoSerialize(XML::Node& ParentNode) const
467  virtual void ProtoSerialize(XML::Node& ParentNode) const;
468  /// @copydoc SimpleRenderer::ProtoSerializeProperties(XML::Node&) const
469  virtual void ProtoSerializeProperties(XML::Node& SelfRoot) const;
470  /// @brief Convert the TextCursor of this class to an XML::Node ready for seriailization.
471  /// @param SelfRoot The root node containing all the serialized data for this instance.
472  virtual void ProtoSerializeCursor(XML::Node& SelfRoot) const;
473  /// @brief Convert the Text of this class to an XML::Node ready for serialization.
474  /// @param SelfRoot The root node containing all the serialized data for this instance.
475  virtual void ProtoSerializeText(XML::Node& SelfRoot) const;
476 
477  /// @copydoc SimpleRenderer::ProtoDeSerialize(const XML::Node& SelfRoot)
478  virtual void ProtoDeSerialize(const XML::Node& SelfRoot);
479  /// @copydoc SimpleRenderer::ProtoDeSerializeProperties(const XML::Node&)
480  virtual void ProtoDeSerializeProperties(const XML::Node& SelfRoot);
481  /// @brief Take the data stored in an XML Node and overwrite the TextCursor of this object with it.
482  /// @param SelfRoot An XML::Node containing the data to populate this class with.
483  virtual void ProtoDeSerializeCursor(const XML::Node& SelfRoot);
484  /// @brief Take the data stored in an XML Node and overwrite the Text of this object with it.
485  /// @param SelfRoot An XML::Node containing the data to populate this class with.
486  virtual void ProtoDeSerializeText(const XML::Node& SelfRoot);
487 
488  /// @copydoc SimpleRenderer::GetDerivedSerializableName() const
489  virtual String GetDerivedSerializableName() const;
490  /// @copydoc SimpleRenderer::GetSerializableName()
491  static String GetSerializableName();
492  };//TextLayer
493  }//UI
494 }//Mezzanine
495 
496 #endif