MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
quadrenderable.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 #ifndef _uiquadrenderable_h
41 #define _uiquadrenderable_h
42 
43 #include "datatypes.h"
44 #include "UI/uienumerations.h"
45 #include "UI/unifieddim.h"
46 #include "UI/positioninginfo.h"
47 #include "UI/sizinginfo.h"
48 #include "UI/renderable.h"
49 #include "UI/rect.h"
50 
51 namespace Mezzanine
52 {
53  namespace UI
54  {
55  class ScreenRenderData;
56  class RenderLayer;
57  class ImageLayer;
58  class SingleLineTextLayer;
59  class MultiLineTextLayer;
60  class LayoutStrategy;
61  class QuadRenderable;
62  class Widget;
63  //////////////////////////////////////////////////////////////////////////////
64  /// @struct RenderLayerGroup
65  /// @headerfile layeredrenderable.h
66  /// @brief This class stores a group of render layers that can be set to be rendered.
67  /// @details A QuadRenderable can only render one group of layers at a time, but a single layer can be added to
68  /// as many RenderLayerGroup's as the user see's fit.
69  ///////////////////////////////////////
71  {
72  public:
73  /// @brief An std::pair type for storing ZOrders in relation to @ref RenderLayer instances.
74  typedef std::pair<UInt16,RenderLayer*> RenderLayerPair;
75  /// @brief Basic container type for @ref RenderLayerPair storage by this class.
76  typedef std::list<RenderLayerPair> RenderLayerContainer;
77  /// @brief Iterator type for @ref RenderLayerPair instances stored by this class.
78  typedef RenderLayerContainer::iterator RenderLayerIterator;
79  /// @brief Const Iterator type for @ref RenderLayerPair instances stored by this class.
80  typedef RenderLayerContainer::const_iterator ConstRenderLayerIterator;
81  protected:
82  /// @internal
83  /// @brief Container storing all the layers that belong to this group and their ZOrders.
85  /// @internal
86  /// @brief The name of this group.
88  /// @internal
89  /// @brief A pointer to the host QuadRenderable.
91  public:
92  /// @brief Class constructor.
93  /// @param Name The name to give to this RenderLayerGroup.
94  /// @param Creator The Quad that owns this RenderLayerGroup.
95  RenderLayerGroup(const String& Name, QuadRenderable* Creator);
96  /// @brief Class destructor.
98 
99  ///////////////////////////////////////////////////////////////////////////////
100  // Utility
101 
102  /// @brief Gets the name of this RenderLayerGroup.
103  /// @return Returns a const reference to the name of this RenderLayerGroup.
104  const String& GetName() const;
105  /// @brief Notifies this RenderLayerGroup that it has become the active group.
106  /// @remarks This shouldn't need to ever be called manually and is automatically called when
107  /// a QuadRenderable sets it as the active RenderLayerGroup. This method exists to reset the
108  /// state of a layer (or group of layers) if necessary to achieve the visual effect desired.
109  void NotifyActive();
110  /// @brief Notifies this RenderLayerGroup that it is no longer the active group.
111  /// @remarks This is a straightforward counterpart to the "NotifyActive" method also on this
112  /// class, and also shouldn't ever need to be called manually.
113  void NotifyInactive();
114 
115  ///////////////////////////////////////////////////////////////////////////////
116  // RenderLayer Management
117 
118  /// @brief Adds a layer to this group by it's ZOrder.
119  /// @param RL The layer to add.
120  /// @param ZOrder The ZOrder at which to add the layer.
121  void AddLayer(RenderLayer* RL, const UInt16 ZOrder);
122  /// @brief Gets the number of RenderLayers assigned to this group.
123  /// @return Returns a UInt32 containing the number of RenderLayers in this group.
124  UInt32 GetNumRenderLayers() const;
125  /// @brief Swaps the layers contained by this group and another group.
126  /// @param OtherGroup The other RenderLayerGroup to swap layers with.
127  void SwapLayers(RenderLayerGroup* OtherGroup);
128  /// @brief Removes a layer from this group.
129  /// @param RL The RenderLayer to be removed.
130  void RemoveLayer(RenderLayer* RL);
131  /// @brief Removes every layer in this group, from this group.
132  void RemoveAllLayers();
133 
134  /// @brief Gets an iterator to the first RenderLayer.
135  /// @return Returns an iterator to the first RenderLayer being stored by this group.
136  RenderLayerIterator RenderLayerBegin();
137  /// @brief Gets an iterator to one passed the last RenderLayer.
138  /// @return Returns an iterator to one passed the last RenderLayer being stored by this group.
139  RenderLayerIterator RenderLayerEnd();
140  /// @brief Gets a const iterator to the first RenderLayer.
141  /// @return Returns a const iterator to the first RenderLayer being stored by this group.
142  ConstRenderLayerIterator RenderLayerBegin() const;
143  /// @brief Gets an iterator to one passed the last RenderLayer.
144  /// @return Returns an iterator to one passed the last RenderLayer being stored by this group.
145  ConstRenderLayerIterator RenderLayerEnd() const;
146 
147  ///////////////////////////////////////////////////////////////////////////////
148  // Serialization
149 
150  /// @brief Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.
151  /// @return A string containing the name of this class.
152  static String GetSerializableName();
153  };//RenderLayerGroup
154 
155  ///////////////////////////////////////////////////////////////////////////////
156  /// @class QuadRenderable
157  /// @headerfile quadrenderable.h
158  /// @brief This represents a nestable quad for an object in a GUI layout.
159  /// @details QuadRenderables use "Unified" units for setting their position and size. Unified units
160  /// contain both relative and absolute information for their position on screen or inside their
161  /// parent. It is important to note that the Relative portion of the Unified unit is always
162  /// calculated first. @n @n
163  /// The relative portions of the Unified units used to set the dimensions aren't relative to the
164  /// screen size, but instead their parents size. For the most part QuadRenderables are oblivious to
165  /// the size of the screen they are in. @n @n
166  /// It is important to note that the RenderLayer's stored directly by this class are all the
167  /// layers that were created by this class, in creation order. They aren't not what will be rendered,
168  /// nor are they in the order they will be rendered in. To get either of these bits of information you
169  /// must check the active RenderLayerGroup and check the RenderLayers there. @n @n
170  /// Also only one RenderLayerGroup may render at a time, but a single RenderLayer can be shared between
171  /// as many groups under the same QuadRenderable as you want.
172  ///////////////////////////////////////
174  {
175  public:
176  /// @brief Basic container type for @ref Widget storage by this class.
177  typedef std::list<Widget*> ChildContainer;
178  /// @brief Iterator type for @ref Widget instances stored by this class.
179  typedef ChildContainer::iterator ChildIterator;
180  /// @brief Const Iterator type for @ref Widget instances stored by this class.
181  typedef ChildContainer::const_iterator ConstChildIterator;
182  /// @brief Reverse Iterator type for @ref Widget instances stored by this class.
183  typedef ChildContainer::reverse_iterator ReverseChildIterator;
184  /// @brief Const Reverse Iterator type for @ref Widget instances stored by this class.
185  typedef ChildContainer::const_reverse_iterator ConstReverseChildIterator;
186  /// @brief Basic container type for @ref RenderLayer storage by this class.
187  typedef std::vector<RenderLayer*> RenderLayerContainer;
188  /// @brief Iterator type for @ref RenderLayer instances stored by this class.
189  typedef RenderLayerContainer::iterator RenderLayerIterator;
190  /// @brief Const Iterator type for @ref RenderLayer instances stored by this class.
191  typedef RenderLayerContainer::const_iterator ConstRenderLayerIterator;
192  /// @brief Basic container type for @ref RenderLayerGroup storage by this class.
193  typedef std::map<String,RenderLayerGroup*> RenderLayerGroupContainer;
194  /// @brief Iterator type for @ref RenderLayerGroup instances stored by this class.
195  typedef RenderLayerGroupContainer::iterator RenderLayerGroupIterator;
196  /// @brief Const Iterator type for @ref RenderLayerGroup instances stored by this class.
197  typedef RenderLayerGroupContainer::const_iterator ConstRenderLayerGroupIterator;
198  /// @brief An std::pair type for storing ZOrders in relation to a named @ref RenderLayerGroup.
199  typedef std::pair<UInt16,String> GroupOrderEntry;
200  /// @brief Container type for @ref GroupOrderEntry storage by this class.
201  typedef std::vector<GroupOrderEntry> GroupOrderEntryVector;
202  protected:
203  /// @internal
204  /// @brief This is a container storing all the @ref RenderLayerGroup instances created by and belonging to this Quad.
206  /// @internal
207  /// @brief This is a container storing all the @ref RenderLayer instances created by and belonging to this Quad.
209  /// @internal
210  /// @brief This is a container storing all the children that belong to this Quad.
212  /// @internal
213  /// @brief This stores all the information needed to determine the specific behaviors this Quad should have when it's size is being updated.
215  /// @internal
216  /// @brief This stores all the information needed to determine the specific behaviors this Quad should have when it's position is being updated.
218  /// @internal
219  /// @brief The actual (pixel) position and size of this Quad on the screen it belongs to.
221  /// @internal
222  /// @brief This is a pointer to the Quad that owns this Quad and is responsible for transform updates applied to this Quad.
224  /// @internal
225  /// @brief This is a pointer to the group of RenderLayers currently being used for rendering.
227  /// @internal
228  /// @brief This is a pointer to the strategy being used by this Quad to determine the positions and sizes of children during transform updates.
230  /// @internal
231  /// @brief This is a pointer to the optional cache of vertex's belonging to this Quad and all of it's children.
233  /// @internal
234  /// @brief This is the ZOrder of this Quad in relation to all other Quads in it's parent.
236  /// @internal
237  /// @brief Determines the "higher ZOrder" of this Quad compared to all other renderables on screen.
239  /// @internal
240  /// @brief Controls whether or not this Quad will be considered for mouse hover checks.
242  /// @internal
243  /// @brief Controls whether or not this Quad and it's children will recieve automatic transform updates.
245  /// @internal
246  /// @brief Determines whether or not this Quad needs all of it's layers refreshed. Usually after a transform update.
247  Boolean AllLayersDirty;
248 
249  /// @copydoc Renderable::ProtoSerializeImpl(XML::Node&) const
250  virtual void ProtoSerializeImpl(XML::Node& SelfRoot) const;
251  /// @copydoc Renderable::ProtoDeSerializeImpl(const XML::Node&)
252  virtual void ProtoDeSerializeImpl(const XML::Node& SelfRoot);
253  /// @internal
254  /// @brief Adds all the vertices belonging to all the layers of this renderable to the provided vector.
255  /// @param Vertices The vector to store the generated vertices.
256  void AppendLayerVertices(std::vector<VertexData>& Vertices);
257  /// @internal
258  /// @brief Redraws all dirty layers.
259  void CleanLayers();
260  /// @internal
261  /// @brief Resizes the container for RenderLayers in this QuadRenderable.
262  /// @param NewSize The new capacity for RenderLayer storage.
263  void ResizeLayers(const Whole NewSize);
264  //public:
265  /// @brief Blank constructor.
266  /// @note This is primarily useful for (and used as) a basic constructor suitable for XML deserialization post-construction.
267  /// @param Parent The parent screen that created this renderable.
268  QuadRenderable(Screen* Parent);
269  /// @brief Class constructor.
270  /// @param RendName The name to be given to this renderable.
271  /// @param Parent The parent screen that created this renderable.
272  QuadRenderable(const String& RendName, Screen* Parent);
273  /// @brief Parent-less constructor.
274  /// @param RendName The name to be given to this renderable.
275  /// @param RendRect The rect describing this quad's transform relative to it's parent.
276  /// @param Parent The parent screen that created this renderable.
277  QuadRenderable(const String& RendName, const UnifiedRect& RendRect, Screen* Parent);
278  /// @brief Class destructor.
279  /// @note Any and all children of this quad at the time of it's destruction will be destroyed as well.
280  /// If you want to preserve the children for whatever reason, remove them from the quad prior to destroying it.
281  virtual ~QuadRenderable();
282  public:
283  ///////////////////////////////////////////////////////////////////////////////
284  // Utility Methods
285 
286  /// @brief Gets the currently set ZOrder of this QuadRenderable with it's parent.
287  /// @details A QuadRenderable without a parent yet will have the default ZOrder of 0, which is a valid ZOrder when it gains a parent.
288  /// In these cases it is recommended to check to see if this QuadRenderable has a parent.
289  /// @return Returns a UInt16 representing this renderables ZOrder.
290  virtual const UInt16& GetZOrder() const;
291  /// @brief Checks to see if another Quad is overlapping with this one.
292  /// @param Quad The other Quad to check for overlap.
293  /// @return Returns true if this quad overlaps with the provided quad, false otherwise.
294  virtual Boolean CheckOverlap(const QuadRenderable* Quad) const;
295  /// @brief Checks to see if a point in 2D space is inside this quad.
296  /// @param Point The point in 2D space to check.
297  /// @return Returns true if the provided point is within this quad, false otherwise.
298  virtual Boolean IsInside(const Vector2& Point) const;
299  /// @brief Gets whether or not this QuadRenderable is a direct child of it's screen.
300  /// @return Returns true if the screen is this QuadRenderable's parent, false otherwise.
301  virtual Boolean IsChildOfScreen() const;
302  /// @brief Gets the height needed for this quadrenderable to be able to completely display text in it's child text layers.
303  /// @return Returns a Real representing the pixel height this quad needs to be to display it's largest batch of text among it's text layers.
304  virtual Real GetIdealHeightForText() const;
305 
306  /// @brief Updates the dimensions of this QuadRenderable based on the transform of it's parent.
307  /// @details This is a convenience function that will call the more descriptive version of "UpdateDimensions" on this objects parent using its
308  /// existing dimensions as both parameters, causing all of its children to be updated (including this). This method can be expensive based on
309  /// the number of siblings this quad has.
310  virtual void UpdateDimensions();
311  /// @brief Updates the dimensions of the children in this QuadRenderable.
312  /// @details This is a convenience function that will call the more descriptive version of "UpdateDimensions" on this object using its existing
313  /// dimensions as both parameters, causing all of this quads children to be updated. This method can be expensive based on
314  /// the number of children this quad has.
315  virtual void UpdateChildDimensions();
316  /// @brief Updates the dimensions of this QuadRenderable based on the transform of it's parent.
317  /// @details This function is called automatically by this objects parent when it changes in size or position, and should only need to be called
318  /// manually if the positioning or sizing rules were updated manually.
319  /// @param OldSelfRect The previous dimensions of this quad prior to it's dimensions being updated.
320  /// @param NewSelfRect The updated and current dimensions of this quad.
321  virtual void UpdateDimensions(const Rect& OldSelfRect, const Rect& NewSelfRect);
322 
323  /// @brief Sets whether or not this quad should be skipped when determining if the mouse is hovered over this quad.
324  /// @note This does not affect the ability for the children of this quad to be detected and/or checked.
325  /// @param Enable True if you want to have this quad be skipped for mouse hover checks, false if you want this quad checked.
326  virtual void SetMousePassthrough(Boolean Enable);
327  /// @brief Gets whether or not Mouse Passthrough is enabled.
328  /// @return Returns true if Mouse Passthrough is enabled, false otherwise.
329  virtual bool GetMousePassthrough() const;
330  /// @brief Sets whether or not this quad has specific behaviors for it's transform updates and they should not be done automatically.
331  /// @note Setting this to true will prevent child quads from being updated. This setting does not mean that a quad will never be
332  /// updated, just that it has special logic for doing so located elsewhere from the normal logic. Example: Transform updates to be
333  /// applied to the scroller of a scrollbar.
334  /// @param Enable True to make this quad skip automatic updating and intent to provide that logic explicitly elsewhere, false for automatic transform updates.
335  virtual void SetManualTransformUpdates(Boolean Enable);
336  /// @brief Gets whether or not this quad will be automatically updated when parent transforms are updated.
337  /// @return Returns true if this quad needs manual updating, false if it recieves automatic updates.
338  virtual bool GetManualTransformUpdates() const;
339 
340  /// @brief Sets the priority this QuadRenderable should be rendered with.
341  /// @note The default value for this is Medium.
342  /// @param RP The priority level to be used when rendering this QuadRenderable.
343  virtual void SetRenderPriority(const UI::RenderPriority RP);
344  /// @brief Sets the priority this QuadRenderable and all it's children should be rendered with.
345  /// @note The default value for this is Medium.
346  /// @param RP The priority level to be used when rendering this QuadRenderable and it's children.
347  virtual void SetRenderPriorityCascading(const UI::RenderPriority RP);
348  /// @brief Gets the priority this QuadRenderable should be rendered with.
349  /// @return Returns an enum value representing this renderables priority level.
350  virtual UI::RenderPriority GetRenderPriority() const;
351 
352  ///////////////////////////////////////////////////////////////////////////////
353  // Transform Policy Methods
354 
355  /// @brief Sets the behavior to be used when this QuadRenderable is positioned.
356  /// @note This method is not retroactive. Setting this to a different value will not cause it to reposition.
357  /// @param Policy The @ref PositioningInfo to be applied to this QuadRenderable.
358  virtual void SetPositioningPolicy(const PositioningInfo& Policy);
359  /// @brief Gets the current behavior this QuadRenderable will use when it is positioned.
360  /// @return Returns a const @ref PositioningInfo reference describing how this QuadRenderable is positioned.
361  virtual const PositioningInfo& GetPositioningPolicy() const;
362  /// @brief Sets the behavior to be used when this QuadRenderable is sized.
363  /// @note This method is not retroactive. Setting this to a different value will not cause it to resize.
364  /// @param Policy The @ref SizingInfo to be applied to this QuadRenderable.
365  virtual void SetSizingPolicy(const SizingInfo& Policy);
366  /// @brief Gets the current behavior this QuadRenderable will use when it is sized.
367  /// @return Returns a const @ref SizingInfo reference describing how this QuadRenderable is sized.
368  virtual const SizingInfo& GetSizingPolicy() const;
369 
370  /// @brief Sets the behavior this quad will have when it is positioned automatically.
371  /// @note This method is not retroactive. Setting this to a different value will not cause it to reposition.
372  /// @param Rules The action to take when this is positioned. See @ref PositioningFlags enum for more info.
373  virtual void SetPositioningRules(const UI::PositioningFlags Rules);
374  /// @brief Gets the current behavior this quad will follow when it is positioned automatically.
375  /// @return Returns a @ref PositioningFlags value reprensenting the action this quad will take when it is positioned.
376  virtual UI::PositioningFlags GetPositioningRules() const;
377  /// @brief Sets the behavior this quad will have on the X axis when it is resized.
378  /// @note This method is not retroactive. Setting this to a different value will not cause it to resize.
379  /// @param Rules The action to take when this is resized. See @ref SizingRules enum for more info.
380  virtual void SetHorizontalSizingRules(const UI::SizingRules Rules);
381  /// @brief Gets the current behavior this quad will follow for the X axis when it is resized.
382  /// @return Returns a @ref SizingRules value reprensenting the action this quad will take when it is resized.
383  virtual UI::SizingRules GetHorizontalSizingRules() const;
384  /// @brief Sets the behavior this quad will have on the Y axis when it is resized.
385  /// @note This method is not retroactive. Setting this to a different value will not cause it to resize.
386  /// @param Rules The action to take when this is resized. See @ref SizingRules enum for more info.
387  virtual void SetVerticalSizingRules(const UI::SizingRules Rules);
388  /// @brief Gets the current behavior this quad will follow for the Y axis when it is resized.
389  /// @return Returns a @ref SizingRules value reprensenting the action this quad will take when it is resized.
390  virtual UI::SizingRules GetVerticalSizingRules() const;
391 
392  /// @brief Sets the minimum size this quad is allowed to have.
393  /// @note This function expects the provided UnifiedVec2 to be in pixels.
394  /// @param Min The size this quad is not allowed to go under.
395  virtual void SetMinSize(const UnifiedVec2& Min);
396  /// @brief Gets the currently set minimum size for this quad.
397  /// @return Returns a vector2 containing the minimum size for this quad in pixels.
398  virtual UnifiedVec2 GetMinSize() const;
399  /// @brief Sets the maximum size this quad is allowed to have.
400  /// @note This function expects the provided UnifiedVec2 to be in pixels.
401  /// @param Max The size this quad is not allowed to exceed.
402  virtual void SetMaxSize(const UnifiedVec2& Max);
403  /// @brief Gets the currently set maximum size for this quad.
404  /// @return Returns a vector2 containing the maximum size for this quad in pixels.
405  virtual UnifiedVec2 GetMaxSize() const;
406 
407  ///////////////////////////////////////////////////////////////////////////////
408  // RenderLayer Management
409 
410  /// @brief Creates an ImageLayer for this renderable.
411  /// @note This will not add the created layer to any group, thus it must be added manually to be rendered.
412  /// @return Returns a pointer to the created ImageLayer.
413  ImageLayer* CreateImageLayer();
414  /// @brief Creates an ImageLayer for this renderable and adds it to a RenderLayerGroup.
415  /// @note If the requested group does not exist it will be created.
416  /// @param ZOrder The ZOrder that will be given to this layer to determine the order it is rendered with other layers.
417  /// @param GroupName The name of the group the created ImageLayer should be added to.
418  /// @return Returns a pointer to the created ImageLayer.
419  ImageLayer* CreateImageLayer(const UInt16 ZOrder, const String& GroupName);
420  /// @brief Creates an ImageLayer for this renderable and adds it to all the specified RenderLayerGroups at the provided ZOrders.
421  /// @note If the requested groups do not exist they will be created.
422  /// @param Entrys A vector of std::pair's that contain the ZOrders and the names of the groups the created layer should be added to.
423  /// @return Returns a pointer to the created ImageLayer.
424  ImageLayer* CreateImageLayer(const GroupOrderEntryVector& Entrys);
425 
426  /// @brief Creats a SingleLineTextLayer for this renderable.
427  /// @note This will not add the created layer to any group, thus it must be added manually to be rendered.
428  /// @return Returns a pointer to the created layer.
429  SingleLineTextLayer* CreateSingleLineTextLayer();
430  /// @brief Creats a SingleLineTextLayer for this renderable.
431  /// @note If the requested group does not exist it will be created.
432  /// @param ZOrder The ZOrder that will be given to this layer to determine the order it is rendered with other layers.
433  /// @param GroupName The name of the group the created TextLayer should be added to.
434  /// @return Returns a pointer to the created layer.
435  SingleLineTextLayer* CreateSingleLineTextLayer(const UInt16 ZOrder, const String& GroupName);
436  /// @brief Creates a SingleLineTextLayer for this renderable and adds it to all the specified RenderLayerGroups at the provided ZOrders.
437  /// @note If the requested groups do not exist they will be created.
438  /// @param Entrys A vector of std::pair's that contain the ZOrders and the names of the groups the created layer should be added to.
439  /// @return Returns a pointer to the created layer.
440  SingleLineTextLayer* CreateSingleLineTextLayer(const GroupOrderEntryVector& Entrys);
441  /// @brief Creats a SingleLineTextLayer for this renderable.
442  /// @note This will not add the created layer to any group, thus it must be added manually to be rendered.
443  /// @param FontName The name of the font to use when rendering characters on the created layer.
444  /// @return Returns a pointer to the created layer.
445  SingleLineTextLayer* CreateSingleLineTextLayer(const String& FontName);
446  /// @brief Creats a SingleLineTextLayer for this renderable.
447  /// @note If the requested group does not exist it will be created.
448  /// @param FontName The name of the font to use when rendering characters on the created layer.
449  /// @param ZOrder The ZOrder that will be given to this layer to determine the order it is rendered with other layers.
450  /// @param GroupName The name of the group the created TextLayer should be added to.
451  /// @return Returns a pointer to the created layer.
452  SingleLineTextLayer* CreateSingleLineTextLayer(const String& FontName, const UInt16 ZOrder, const String& GroupName);
453  /// @brief Creates a SingleLineTextLayer for this renderable and adds it to all the specified RenderLayerGroups at the provided ZOrders.
454  /// @note If the requested groups do not exist they will be created.
455  /// @param FontName The name of the font to use when rendering characters on the created layer.
456  /// @param Entrys A vector of std::pair's that contain the ZOrders and the names of the groups the created layer should be added to.
457  /// @return Returns a pointer to the created layer.
458  SingleLineTextLayer* CreateSingleLineTextLayer(const String& FontName, const GroupOrderEntryVector& Entrys);
459  /// @brief Creats a SingleLineTextLayer for this renderable.
460  /// @note This will not add the created layer to any group, thus it must be added manually to be rendered. @n @n
461  /// This constructor defaults to Screen Relative text, but this can be altered after construction.
462  /// @param LineHeight The relative scalar to be used when determining the size of characters generated by this text layer.
463  /// @return Returns a pointer to the created layer.
464  SingleLineTextLayer* CreateSingleLineTextLayer(const Real& LineHeight);
465  /// @brief Creats a SingleLineTextLayer for this renderable.
466  /// @note If the requested group does not exist it will be created. @n @n
467  /// This constructor defaults to Screen Relative text, but this can be altered after construction.
468  /// @param LineHeight The relative scalar to be used when determining the size of characters generated by this text layer.
469  /// @param ZOrder The ZOrder that will be given to this layer to determine the order it is rendered with other layers.
470  /// @param GroupName The name of the group the created TextLayer should be added to.
471  /// @return Returns a pointer to the created layer.
472  SingleLineTextLayer* CreateSingleLineTextLayer(const Real& LineHeight, const UInt16 ZOrder, const String& GroupName);
473  /// @brief Creates a SingleLineTextLayer for this renderable and adds it to all the specified RenderLayerGroups at the provided ZOrders.
474  /// @note If the requested groups do not exist they will be created. @n @n
475  /// This constructor defaults to Screen Relative text, but this can be altered after construction.
476  /// @param LineHeight The relative scalar to be used when determining the size of characters generated by this text layer.
477  /// @param Entrys A vector of std::pair's that contain the ZOrders and the names of the groups the created layer should be added to.
478  /// @return Returns a pointer to the created layer.
479  SingleLineTextLayer* CreateSingleLineTextLayer(const Real& LineHeight, const GroupOrderEntryVector& Entrys);
480 
481  /// @brief Creats a MultiLineTextLayer for this renderable.
482  /// @note This will not add the created layer to any group, thus it must be added manually to be rendered.
483  /// @return Returns a pointer to the created layer.
484  MultiLineTextLayer* CreateMultiLineTextLayer();
485  /// @brief Creats a MultiLineTextLayer for this renderable.
486  /// @note If the requested group does not exist it will be created.
487  /// @param ZOrder The ZOrder that will be given to this layer to determine the order it is rendered with other layers.
488  /// @param GroupName The name of the group the created TextLayer should be added to.
489  /// @return Returns a pointer to the created layer.
490  MultiLineTextLayer* CreateMultiLineTextLayer(const UInt16 ZOrder, const String& GroupName);
491  /// @brief Creates a MultiLineTextLayer for this renderable and adds it to all the specified RenderLayerGroups at the provided ZOrders.
492  /// @note If the requested groups do not exist they will be created.
493  /// @param Entrys A vector of std::pair's that contain the ZOrders and the names of the groups the created layer should be added to.
494  /// @return Returns a pointer to the created layer.
495  MultiLineTextLayer* CreateMultiLineTextLayer(const GroupOrderEntryVector& Entrys);
496  /// @brief Creats a MultiLineTextLayer for this renderable.
497  /// @note This will not add the created layer to any group, thus it must be added manually to be rendered.
498  /// @param FontName The name of the font to use when rendering characters on the created layer.
499  /// @return Returns a pointer to the created layer.
500  MultiLineTextLayer* CreateMultiLineTextLayer(const String& FontName);
501  /// @brief Creats a MultiLineTextLayer for this renderable.
502  /// @note If the requested group does not exist it will be created.
503  /// @param FontName The name of the font to use when rendering characters on the created layer.
504  /// @param ZOrder The ZOrder that will be given to this layer to determine the order it is rendered with other layers.
505  /// @param GroupName The name of the group the created TextLayer should be added to.
506  /// @return Returns a pointer to the created layer.
507  MultiLineTextLayer* CreateMultiLineTextLayer(const String& FontName, const UInt16 ZOrder, const String& GroupName);
508  /// @brief Creates a MultiLineTextLayer for this renderable and adds it to all the specified RenderLayerGroups at the provided ZOrders.
509  /// @note If the requested groups do not exist they will be created.
510  /// @param FontName The name of the font to use when rendering characters on the created layer.
511  /// @param Entrys A vector of std::pair's that contain the ZOrders and the names of the groups the created layer should be added to.
512  /// @return Returns a pointer to the created layer.
513  MultiLineTextLayer* CreateMultiLineTextLayer(const String& FontName, const GroupOrderEntryVector& Entrys);
514  /// @brief Creats a MultiLineTextLayer for this renderable.
515  /// @note This will not add the created layer to any group, thus it must be added manually to be rendered. @n @n
516  /// This constructor defaults to Screen Relative text, but this can be altered after construction.
517  /// @param LineHeight The relative scalar to be used when determining the size of characters generated by this text layer.
518  /// @return Returns a pointer to the created layer.
519  MultiLineTextLayer* CreateMultiLineTextLayer(const Real& LineHeight);
520  /// @brief Creats a MultiLineTextLayer for this renderable.
521  /// @note If the requested group does not exist it will be created. @n @n
522  /// This constructor defaults to Screen Relative text, but this can be altered after construction.
523  /// @param LineHeight The relative scalar to be used when determining the size of characters generated by this text layer.
524  /// @param ZOrder The ZOrder that will be given to this layer to determine the order it is rendered with other layers.
525  /// @param GroupName The name of the group the created TextLayer should be added to.
526  /// @return Returns a pointer to the created layer.
527  MultiLineTextLayer* CreateMultiLineTextLayer(const Real& LineHeight, const UInt16 ZOrder, const String& GroupName);
528  /// @brief Creates a MultiLineTextLayer for this renderable and adds it to all the specified RenderLayerGroups at the provided ZOrders.
529  /// @note If the requested groups do not exist they will be created. @n @n
530  /// This constructor defaults to Screen Relative text, but this can be altered after construction.
531  /// @param LineHeight The relative scalar to be used when determining the size of characters generated by this text layer.
532  /// @param Entrys A vector of std::pair's that contain the ZOrders and the names of the groups the created layer should be added to.
533  /// @return Returns a pointer to the created layer.
534  MultiLineTextLayer* CreateMultiLineTextLayer(const Real& LineHeight, const GroupOrderEntryVector& Entrys);
535 
536  /// @brief Gets a RenderLayer belonging to this QuadRenderable by index.
537  /// @param Index The index of the RenderLayer to retrieve.
538  /// @return Returns a pointer to the RenderLayer at the specified index.
539  RenderLayer* GetRenderLayer(const UInt32& Index) const;
540  /// @brief Gets the number of RenderLayers created for this renderable.
541  /// @return Returns a UInt32 containing the number of RenderLayers in this renderable.
542  UInt32 GetNumRenderLayers() const;
543  /// @brief Gets the number of RenderLayers that are visible in this renderable.
544  /// @return Returns a UInt32 containing the number of RenderLayers that would be rendered if this renderable is visible.
545  UInt32 GetNumVisibleRenderLayers() const;
546  /// @brief Destroys a RenderLayer being stored by this renderable.
547  /// @param ToBeDestroyed The RenderLayer to be destroyed.
548  void DestroyRenderLayer(RenderLayer* ToBeDestroyed);
549  /// @brief Destroys all RenderLayers being stored by this renderable.
550  void DestroyAllRenderLayers();
551 
552  /// @brief Gets an iterator to the first RenderLayer.
553  /// @return Returns an iterator to the first RenderLayer being stored by this renderable.
554  RenderLayerIterator RenderLayerBegin();
555  /// @brief Gets an iterator to one passed the last RenderLayer.
556  /// @return Returns an iterator to one passed the last RenderLayer being stored by this renderable.
557  RenderLayerIterator RenderLayerEnd();
558  /// @brief Gets a const iterator to the first RenderLayer.
559  /// @return Returns a const iterator to the first RenderLayer being stored by this renderable.
560  ConstRenderLayerIterator RenderLayerBegin() const;
561  /// @brief Gets an iterator to one passed the last RenderLayer.
562  /// @return Returns an iterator to one passed the last RenderLayer being stored by this renderable.
563  ConstRenderLayerIterator RenderLayerEnd() const;
564 
565  ///////////////////////////////////////////////////////////////////////////////
566  // RenderLayerGroup Management
567 
568  /// @brief Sets the RenderLayerGroup that will be used to render this renderable.
569  /// @param Name The name of the RenderLayerGroup that will be used.
570  void SetActiveGroup(const String& Name);
571  /// @brief Sets the RenderLayerGroup that will be used to render this renderable.
572  /// @param Group Pointer to the RenderLayerGroup that will be used.
573  void SetActiveGroup(RenderLayerGroup* Group);
574  /// @brief Gets the current RenderLayerGroup used for rendering.
575  /// @return Returns a pointer to the group currently being used to render this renderable.
576  RenderLayerGroup* GetActiveGroup() const;
577  /// @brief Checks to see if a RenderLayerGroup exists.
578  /// @param Name The name of the RenderLayerGroup to check for.
579  /// @return Returns true if the named RenderLayerGroup exists in this renderable.
580  Boolean RenderLayerGroupExists(const String& Name) const;
581  /// @brief Gets the number of RenderLayerGroup's created for this renderable.
582  /// @return Returns a UInt32 containing the number of RenderLayerGroups in this renderable.
583  UInt32 GetNumRenderLayerGroups() const;
584  /// @brief Adds a RenderLayer to the specified group.
585  /// @note If the requested group does not exist it will be created.
586  /// @param Layer The RenderLayer to be added to the named group.
587  /// @param ZOrder The ZOrder that will be given to this layer to determine the order it is rendered with other layers.
588  /// @param GroupName The name of the group the created ImageLayer should be added to.
589  void AddLayerToGroup(RenderLayer* Layer, const UInt16 ZOrder, const String& GroupName);
590  /// @brief Adds a RenderLayer to multiple groups.
591  /// @note If the requested groups do not exist they will be created.
592  /// @param Layer The RenderLayer to be added to the named groups.
593  /// @param Entrys A vector of std::pair's that contain the ZOrders and the names of the groups the provided layer should be added to.
594  void AddLayerToGroups(RenderLayer* Layer, const GroupOrderEntryVector& Entrys);
595  /// @brief Removes a single RenderLayer from a specified RenderLayerGroup.
596  /// @param Layer The RenderLayer to be removed from the named group.
597  /// @param GroupName The name of the RenderLayerGroup the provided layer will be removed from.
598  void RemoveLayerFromGroup(RenderLayer* Layer, const String& GroupName);
599  /// @brief Removes a single RenderLayer from all RenderLayerGroups owned by this QuadRenderable.
600  /// @param Layer The RenderLayer to be removed from all groups.
601  void RemoveLayerFromAllGroups(RenderLayer* Layer);
602 
603  /// @brief Creates a new RenderLayerGroup that can have.
604  /// @exception This function will throw an exception if a group already exists with the provided name.
605  /// @remarks The first RenderLayerGroup that is created will automatically be set to the ActiveGroup. You can override
606  /// this by calling "SetActiveGroup" manually after creating any additional RenderLayerGroup.
607  /// @param Name The name to be given to the new RenderLayerGroup.
608  /// @return Returns a pointer to the created RenderLayerGroup.
609  RenderLayerGroup* CreateRenderLayerGroup(const String& Name);
610  /// @brief Gets the named RenderLayerGroup or creates one with the specified name if it does not exist.
611  /// @remarks This function is unlike the "create" function in that it won't throw an exception in an error condition,
612  /// and it is unlike the "get" function in that it will not return a NULL pointer. This function guarentee's returning
613  /// a valid RenderLayerGroup with the given name. @n @n
614  /// The first RenderLayerGroup that is created will automatically be set to the ActiveGroup. You can override
615  /// this by calling "SetActiveGroup" manually after creating any additional RenderLayerGroup.
616  /// @param Name The name of the RenderLayerGroup to get or create.
617  /// @return Returns a pointer to the named RenderLayerGroup.
618  RenderLayerGroup* CreateOrRetrieveRenderLayerGroup(const String& Name);
619  /// @brief Gets a RenderLayerGroup by name.
620  /// @param Name The name of the RenderLayerGroup to retrieve.
621  /// @return Returns a pointer to the named RenderLayerGroup, or NULL if it does not exist.
622  RenderLayerGroup* GetRenderLayerGroup(const String& Name) const;
623  /// @brief Destroy's a RenderLayerGroup by name.
624  /// @param Name The name of the RenderLayerGroup to destroy.
625  void DestroyRenderLayerGroup(const String& Name);
626  /// @brief Destroy's a RenderLayerGroup by pointer.
627  /// @param ToBeDestroyed The RenderLayerGroup to be destroyed.
628  void DestroyRenderLayerGroup(RenderLayerGroup* ToBeDestroyed);
629  /// @brief Destroy's all RenderLayerGroups being stored/managed by this QuadRenderable.
630  void DestroyAllRenderLayerGroups();
631 
632  /// @brief Gets an iterator to the first RenderLayerGroup.
633  /// @return Returns an iterator to the first RenderLayerGroup being stored by this renderable.
634  RenderLayerGroupIterator RenderLayerGroupBegin();
635  /// @brief Gets an iterator to one passed the last RenderLayerGroup.
636  /// @return Returns an iterator to one passed the last RenderLayerGroup being stored by this renderable.
637  RenderLayerGroupIterator RenderLayerGroupEnd();
638  /// @brief Gets a const iterator to the first RenderLayerGroup.
639  /// @return Returns a const iterator to the first RenderLayerGroup being stored by this renderable.
640  ConstRenderLayerGroupIterator RenderLayerGroupBegin() const;
641  /// @brief Gets an iterator to one passed the last RenderLayerGroup.
642  /// @return Returns an iterator to one passed the last RenderLayerGroup being stored by this renderable.
643  ConstRenderLayerGroupIterator RenderLayerGroupEnd() const;
644 
645  ///////////////////////////////////////////////////////////////////////////////
646  // Child Management
647 
648  /// @brief Adds a Widget to this as a child of this quad.
649  /// @warning Unless this method is being called from a @ref Screen or @ref LayoutContainer (or it's derived
650  /// classes) this method is not intended for casual use. Different QuadRenderable implementations have
651  /// different expectations on their children and may need a specific quantity, or have them inserted in a
652  /// specific order to achieve the behavior designed for them. Use with care.
653  /// @param Child A pointer to the Widget that is to become a child of this.
654  virtual void AddChild(Widget* Child);
655  /// @brief Adds a Widget to this as a child of this quad.
656  /// @warning Unless this method is being called from a @ref Screen or @ref LayoutContainer (or it's derived
657  /// classes) this method is not intended for casual use. Different QuadRenderable implementations have
658  /// different expectations on their children and may need a specific quantity, or have them inserted in a
659  /// specific order to achieve the behavior designed for them. Use with care.
660  /// @param Child A pointer to the Widget that is to become a child of this.
661  /// @param ZOrder The ZOrder to assign to the child renderable.
662  virtual void AddChild(Widget* Child, const UInt16 ZOrder);
663  /// @brief Gets a child by it's ZOrder.
664  /// @note ZOrders do not have to be unique. In the case of multiple identical ZOrders the first one found will be returned.
665  /// @param Zorder The ZOrder on the child to search for.
666  /// @return Returns a pointer to the requested child.
667  virtual Widget* GetChild(const UInt16 Zorder) const;
668  /// @brief Gets a child by it's name.
669  /// @param RendName The name of the child to search for.
670  /// @return Returns a pointer to the requested child.
671  virtual Widget* GetChild(const String& RendName) const;
672  /// @brief Gets the number of children in this QuadRenderable.
673  /// @return Returns the number of children directly connected to this QuadRenderable.
674  virtual Whole GetNumChildren() const;
675  /// @brief Removes a child Widget by pointer.
676  /// @param Child A point to the child to be removed.
677  virtual void RemoveChild(Widget* Child);
678  /// @brief Removes all child Widgets from this QuadRenderable.
679  virtual void RemoveAllChildren();
680 
681  /// @brief Gets an iterator to the first child Widget.
682  /// @return Returns an iterator to the first Widget being stored by this QuadRenderable.
683  ChildIterator ChildrenBegin();
684  /// @brief Gets an iterator to one passed the last child Widget.
685  /// @return Returns an iterator to one passed the last Widget being stored by this QuadRenderable.
686  ChildIterator ChildrenEnd();
687  /// @brief Gets a const iterator to the first child Widget.
688  /// @return Returns a const iterator to the first Widget being stored by this QuadRenderable.
689  ConstChildIterator ChildrenBegin() const;
690  /// @brief Gets an iterator to one passed the last child Widget.
691  /// @return Returns a const iterator to one passed the last Widget being stored by this QuadRenderable.
692  ConstChildIterator ChildrenEnd() const;
693 
694  /// @brief Gets an iterator to the last Widget.
695  /// @param Returns an iterator to the last Widget being stored by this QuadRenderable.
696  ReverseChildIterator RChildrenBegin();
697  /// @brief Gets an iterator to one before the first child Widget.
698  /// @param Returns an iterator to one before the first child Widget being stored by this QuadRenderable.
699  ReverseChildIterator RChildrenEnd();
700  /// @brief Gets a const iterator to the last Widget.
701  /// @param Returns a const iterator to the last Widget being stored by this QuadRenderable.
702  ConstReverseChildIterator RChildrenBegin() const;
703  /// @brief Gets a const iterator to one before the first child Widget.
704  /// @param Returns a const iterator to one before the first child Widget being stored by this QuadRenderable.
705  ConstReverseChildIterator RChildrenEnd() const;
706 
707  ///////////////////////////////////////////////////////////////////////////////
708  // Transform Methods
709 
710  /// @brief Sets the position this QuadRenderable will have within it's parent
711  /// @param Position The top-left position relative to it's parents' rect.
712  virtual void SetUnifiedPosition(const UnifiedVec2& Position);
713  /// @brief Sets the size this QuadRenderable will have within it's parent.
714  /// @param Size The width and height relative to it's parents' rect.
715  virtual void SetUnifiedSize(const UnifiedVec2& Size);
716  /// @brief Gets the position of this QuadRenderable as a Unified Vector2.
717  /// @return Returns a UnifiedVec2 representing the relative position and pixel offset of this QuadRenderable.
718  virtual UnifiedVec2 GetUnifiedPosition() const;
719  /// @brief Gets the size of this QuadRenderable as a Unified Vector2.
720  /// @return Returns a UnifiedVec2 representing the relative size and pixel offset of this QuadRenderable.
721  virtual UnifiedVec2 GetUnifiedSize() const;
722  /// @brief Gets the Unified positiona nd size of this QuadRenderable as a unified rect.
723  /// @return Returns a UnifiedRect containing the position and size of this QuadRenderable.
724  virtual UnifiedRect GetUnifiedRect() const;
725  /// @brief Gets the pixel position of this widget.
726  /// @return Returns a vector2 representing the pixel position of this widget.
727  virtual Vector2 GetActualPosition() const;
728  /// @brief Gets the pixel size of this widget.
729  /// @return Returns a vector2 representing the pixel size of this widget.
730  virtual Vector2 GetActualSize() const;
731  /// @brief Gets this QuadRenderables' Rect.
732  /// @note This function will always return a non-relative rect(units in pixels).
733  /// @return Returns a Rect containing this QuadRenderables' Position and Size.
734  virtual Rect GetRect() const;
735 
736  ///////////////////////////////////////////////////////////////////////////////
737  // Fetch Methods
738 
739  /// @brief Gets the parent of this quad.
740  /// @return Returns a pointer to the parent object of this quad, or NULL if it's the root object.
741  QuadRenderable* GetParent() const;
742  /// @brief Gets the QuadRenderable after this one among the QuadRenderables owned by it's parent.
743  /// @param Wrap Whether or not you want to return the first QuadRenderable owned by this Quad's parent if this Quad is last.
744  /// @return Returns a pointer to the next QuadRenderable (by sort order).
745  QuadRenderable* GetNextSibling(Boolean Wrap = true);
746  /// @brief Gets the QuadRenderable before this one among the QuadRenderables owned by it's parent.
747  /// @param Wrap Whether or not you want to return the last QuadRenderable owned by this Quad's parent if this Quad is first.
748  /// @return Returns a pointer to the previous QuadRenderable (by sort order).
749  QuadRenderable* GetPrevSibling(Boolean Wrap = true);
750  /// @brief Gets the QuadRenderable that is both an ancestor of this quad, and a direct child of the screen.
751  /// @note Since the screen is pretty much always the root and you can get the screen through other methods,
752  /// that isn't factored in when searching. If this quad is a direct child of the screen, this will be returned.
753  /// @return Returns a pointer to the QuadRenderable that is both an ancestor of this quad, and a direct child of the screen.
754  virtual QuadRenderable* GetTopMostQuad();
755 
756  ///////////////////////////////////////////////////////////////////////////////
757  // VertexCaching Methods
758 
759  /// @brief Enables or disables caching of vertex's belonging to this and all child renderables.
760  /// @remarks If enabled, this will create a local instance of ScreenRenderData. Whenever this or
761  /// any of this Quad's children are updated the cache will be flushed and regenerated. When a request
762  /// to append vertices is made, they will be appended from the local cache. If needed the cache will
763  /// be regenerated immediately. @n @n
764  /// This will increase the memory consumed, but in some cases can dramatically increase the performance
765  /// of redrawing a screen when only a small portion of the screen is changed. By default all direct
766  /// children of the screen have this enabled. @n @n
767  /// It is also important to note that this cache is only used when the "_AppendVerticesCascading" method
768  /// is called.
769  /// @param Enable Whether to enable or disable this feature.
770  void SetLocalVertexCaching(Boolean Enable);
771  /// @brief Gets whether or not vertex caching is enabled for this Quad.
772  /// @return Returns true if this Quad caches the vertex's of it and it's children, false otherwise.
773  Boolean IsVertexCachingEnabled() const;
774 
775  ///////////////////////////////////////////////////////////////////////////////
776  // Serialization
777 
778  /// @copydoc Renderable::ProtoSerialize(XML::Node&) const
779  virtual void ProtoSerialize(XML::Node& ParentNode) const;
780  /// @copydoc Renderable::ProtoSerializeProperties(XML::Node&) const
781  virtual void ProtoSerializeProperties(XML::Node& SelfRoot) const;
782  /// @brief Convert the RenderLayers of this class to an XML::Node ready for serialization.
783  /// @param SelfRoot The root node containing all the serialized data for this instance.
784  virtual void ProtoSerializeRenderLayers(XML::Node& SelfRoot) const;
785  /// @brief Convert the RenderLayerGroups of this class to an XML::Node ready for seriailization.
786  /// @param SelfRoot The root node containing all the serialized data for this instance.
787  virtual void ProtoSerializeRenderLayerGroups(XML::Node& SelfRoot) const;
788  /// @brief Convert the child quads of this class to an XML::Node ready for serialization.
789  /// @param SelfRoot The root node containing all the serialized data for this instance.
790  virtual void ProtoSerializeChildQuads(XML::Node& SelfRoot) const;
791 
792  /// @copydoc Renderable::ProtoDeSerialize(const XML::Node&)
793  virtual void ProtoDeSerialize(const XML::Node& SelfRoot);
794  /// @copydoc Renderable::ProtoDeSerializeProperties(const XML::Node&)
795  virtual void ProtoDeSerializeProperties(const XML::Node& SelfRoot);
796  /// @brief Take the data stored in an XML Node and overwrite the RenderLayers of this object with it.
797  /// @param SelfRoot An XML::Node containing the data to populate this class with.
798  virtual void ProtoDeSerializeRenderLayers(const XML::Node& SelfRoot);
799  /// @brief Take the data stored in an XML Node and overwrite the RenderLayerGroups of this object with it.
800  /// @param SelfRoot An XML::Node containing the data to populate this class with.
801  virtual void ProtoDeSerializeRenderLayerGroups(const XML::Node& SelfRoot);
802  /// @brief Take the data stored in an XML Node and overwrite the ChildQuads of this object with it.
803  /// @param SelfRoot An XML::Node containing the data to populate this class with.
804  virtual void ProtoDeSerializeChildQuads(const XML::Node& SelfRoot);
805 
806  /// @copydoc Renderable::GetDerivedSerializableName() const
807  virtual String GetDerivedSerializableName() const;
808  /// @copydoc Renderable::GetSerializableName()
809  static String GetSerializableName();
810 
811  ///////////////////////////////////////////////////////////////////////////////
812  // Internal Methods
813 
814  /// @internal
815  /// @brief Ssts the ZOrder value for this renderable.
816  /// @warning Under no circumstances would any user need to call this method themselves. Doing so can damage how things are rendered.
817  /// @param Zorder The ZOrder this renderable has among the renderables belonging to it's parent.
818  virtual void _SetZOrder(const UInt16& Zorder);
819  /// @internal
820  /// @brief Notifies this QuadRenderable that it has been added to another QuadRenderable.
821  /// @param NewParent A pointer to the QuadRenderable this is becoming the child of.
822  virtual void _NotifyParenthood(QuadRenderable* NewParent);
823 
824  /// @copydoc Renderable::_MarkDirty()
825  virtual void _MarkDirty();
826  /// @internal
827  /// @brief Tells this QuadRenderable to mark each of it's children (and their children) as dirty.
828  /// @note This will also mark itself as dirty in the process.
829  virtual void _MarkAllChildrenDirty();
830  /// @internal
831  /// @brief Tells this QuadRenderable that all of it's layers are dirty.
832  virtual void _MarkAllLayersDirty();
833 
834  /// @copydoc Renderable::_AppendRenderData(ScreenRenderData& RenderData)
835  virtual void _AppendRenderData(ScreenRenderData& RenderData);
836  /// @internal
837  /// @brief Appends the vertices of this renderable to another vector, and then does the same for this renderable's children.
838  /// @param RenderData The vector of vertex's to append to.
839  virtual void _AppendRenderDataCascading(ScreenRenderData& RenderData);
840  /// @internal
841  /// @brief Checks if there are available render data from this QuadRenderable (or it's subrenderables).
842  /// @return Returns true if this QuadRenderable has render data that can be appended, false otherwise.
843  virtual Boolean _HasAvailableRenderData() const;
844  };//QuadRenderable
845  }//UI
846 }//Mezzanine
847 
848 #endif