40 #ifndef _uiquadrenderable_cpp
41 #define _uiquadrenderable_cpp
43 #include "UI/quadrenderable.h"
45 #include "UI/renderlayergroup.h"
46 #include "UI/layoutstrategy.h"
47 #include "UI/widget.h"
48 #include "UI/screen.h"
50 #include "UI/multiimagelayer.h"
51 #include "UI/singleimagelayer.h"
52 #include "UI/multilinetextlayer.h"
53 #include "UI/singlelinetextlayer.h"
55 #include "stringtool.h"
74 MousePassthrough(false),
75 ManualTransformUpdates(false),
86 MousePassthrough(false),
87 ManualTransformUpdates(false),
98 MousePassthrough(false),
99 ManualTransformUpdates(false),
100 AllLayersDirty(false)
141 { (*It).second->_AppendVertices(Vertices); }
149 while( Pow2 < NewSize )
182 for(
ChildIterator TempIt = TempContainer.begin() ; TempIt != TempContainer.end() ; ++TempIt )
184 UInt16 Zorder = (*TempIt)->GetZOrder();
187 if( (*ChildIt)->GetZOrder() > Zorder ) {
189 (*TempIt)->_MarkAllChildrenDirty();
194 (*TempIt)->_MarkAllChildrenDirty();
226 if( LayerHeight > Ret )
560 if( (*RendIt)->GetLayerType() == Type ) {
580 (*GroupIt)->RemoveLayer(ToBeDestroyed);
595 delete ToBeDestroyed;
602 (*GroupIt)->RemoveAllLayers();
629 if( ToSet != NULL ) {
670 if( ExistingGroup != NULL ) {
671 ExistingGroup->
AddLayer(Layer,LayerZOrder);
677 for( GroupOrderEntryVector::const_iterator It = Entrys.begin() ; It != Entrys.end() ; ++It )
684 if( GroupCheck != NULL ) {
692 { (*GroupIt)->RemoveLayer(Layer); }
698 if( GroupCheck == NULL ) {
719 if( (*GroupIt)->GetGroupID() == GroupID ) {
730 if( (*GroupIt)->GetGroupID() == GroupID ) {
746 {
delete (*GroupIt); }
775 if( (*It)->GetZOrder() > Zorder ) {
801 if( Zorder == (*ChildIt)->GetZOrder() )
811 if( RendName == (*ChildIt)->GetName() )
826 if( Child == (*It) ) {
839 (*It)->_NotifyParenthood(NULL);
849 if( ToBeDestroyed == (*It) ) {
863 (*It)->_NotifyParenthood(NULL);
942 if(
this == (*ChildIt) ) {
943 if( ParentEnd != (++ChildIt) )
return (*ChildIt);
944 else return ( Wrap ? (*ParentBegin) :
this );
958 if(
this == (*ChildIt) ) {
959 if( ParentBegin != (--ChildIt) )
return (*ChildIt);
960 else return ( Wrap ? (*ParentEnd) :
this );
978 if( Child != NULL ) {
985 return static_cast<Widget*
>( RetTest );
1054 SerializeError(
"Create XML Version Attribute",
"RenderLayers",
true);
1059 (*LayerIt)->ProtoSerialize(LayersNode);
1067 SerializeError(
"Create XML Version Attribute",
"RenderLayerGroups",
true);
1097 (*ChildIt)->ProtoSerialize(ChildrenNode);
1119 if( !PropertiesNode.
Empty() ) {
1122 CurrAttrib = PropertiesNode.
GetAttribute(
"MousePassthrough");
1123 if( !CurrAttrib.
Empty() )
1126 CurrAttrib = PropertiesNode.
GetAttribute(
"ManualTransformUpdates");
1127 if( !CurrAttrib.
Empty() )
1131 if( !CurrAttrib.
Empty() )
1134 CurrAttrib = PropertiesNode.
GetAttribute(
"VertexCache");
1135 if( !CurrAttrib.
Empty() )
1138 CurrAttrib = PropertiesNode.
GetAttribute(
"ActiveGroupName");
1139 if( !CurrAttrib.
Empty() )
1144 if( !DimsNode.
Empty() )
1148 if( !PositioningNode.
Empty() )
1152 if( !SizingNode.
Empty() )
1169 if( !LayersNode.
Empty() ) {
1175 if( (*LayerNodeIt).Name() ==
String(
"SingleImageLayer") ) {
1180 }
else if( (*LayerNodeIt).Name() ==
String(
"MultiImageLayer") ) {
1185 }
else if( (*LayerNodeIt).Name() ==
String(
"SingleLineTextLayer") ) {
1190 }
else if( (*LayerNodeIt).Name() ==
String(
"MultiLineTextLayer") ) {
1211 if( !GroupsNode.
Empty() ) {
1217 CurrAttrib = (*GroupNodeIt).GetAttribute(
"GroupID");
1218 if( !CurrAttrib.
Empty() )
1222 for(
XML::NodeIterator LayerNodeIt = (*GroupNodeIt).begin() ; LayerNodeIt != (*GroupNodeIt).end() ; ++LayerNodeIt )
1224 XML::Attribute IndexAttrib = (*LayerNodeIt).GetAttribute(
"Index");
1225 XML::Attribute ZOrderAttrib = (*LayerNodeIt).GetAttribute(
"ZOrder");
1227 if( IndexAttrib && ZOrderAttrib ) {
1244 if( !ChildrenNode.
Empty() ) {
1260 {
return "QuadRenderable"; }
1266 { this->
ZOrder = Zorder; }
1303 { (*It)->_MarkAllChildrenDirty(); }
1331 { (*ChildIt)->_AppendRenderDataCascading(*
VertexCache); }
1337 { (*ChildIt)->_AppendRenderDataCascading(RenderData); }
This is a render layer specializing in single-line text.
RenderLayerContainer::iterator RenderLayerIterator
Iterator type for RenderLayer instances stored by this class.
virtual void ProtoSerializeChildQuads(XML::Node &SelfRoot) const
Convert the child quads of this class to an XML::Node ready for serialization.
virtual Boole GetVisible() const =0
Gets the visibility setting of this renderable.
void RemoveLayerFromGroup(RenderLayer *Layer, const UInt16 GroupID)
Removes a single RenderLayer from a specified RenderLayerGroup.
void DestroyRenderLayerGroup(const UInt16 GroupID)
Destroy's a RenderLayerGroup by ID.
virtual void ProtoSerializeRenderLayers(XML::Node &SelfRoot) const
Convert the RenderLayers of this class to an XML::Node ready for serialization.
void SetLocalVertexCaching(Boole Enable)
Enables or disables caching of vertex's belonging to this and all child renderables.
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
RenderLayerGroupContainer::iterator RenderLayerGroupIterator
Iterator type for RenderLayerGroup instances stored by this class.
Thrown when duplicates of teh same identity string exist.
virtual Rect GetRect() const
Gets this QuadRenderables' Rect.
void SetIdentity()
Sets all the values of this rect to zero.
const String & GetName() const
Gets the name of this renderable.
void Clear()
Clears all Vertex vectors.
void NotifyActive()
Notifies this RenderLayerGroup that it has become the active group.
A light-weight handle for manipulating attributes in DOM tree.
virtual const SizingInfo & GetSizingPolicy() const
Gets the current behavior this QuadRenderable will use when it is sized.
This is a base class for the algorithms used by QuadRenderables to determine how they should update t...
Basic class for all structures that get inserted into the rendering hierarchy.
std::vector< VertexData > Vertices
Container storing all of the vertices to be rendered.
bool Boole
Generally acts a single bit, true or false.
RenderLayerGroup * ActiveGroup
This is a pointer to the group of RenderLayers currently being used for rendering.
UnifiedVec2 Size
The width and height of this rect.
ChildContainer::reverse_iterator ReverseChildIterator
Reverse Iterator type for Widget instances stored by this class.
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this Renderable.
PositioningInfo PositioningPolicy
This stores all the information needed to determine the specific behaviors this Quad should have when...
virtual void _MarkAllChildrenDirty()
Tells this QuadRenderable to mark each of it's children (and their children) as dirty.
Whole VerticalRules
Rules for determining the position of a quad on the Y axis.
std::vector< Widget * > ChildContainer
Basic container type for Widget storage by this class.
virtual void _MarkAllLayersDirty()
Tells this QuadRenderable that all of it's layers are dirty.
virtual void DestroyChild(Widget *ToBeDestroyed)
Destroys a child Widget currently inside this QuadRenderable.
virtual UnifiedVec2 GetMaxSize() const
Gets the currently set maximum size for this quad.
virtual Boole GetMousePassthrough() const
Gets whether or not Mouse Passthrough is enabled.
virtual Whole GetVerticalPositioningRules() const
Gets the current behavior this quad will follow when it is positioned automatically on the Y axis...
virtual Real GetTotalHeight() const
Gets the combined height of all the text lines in this layer.
void DestroyAllRenderLayers()
Destroys all RenderLayers being stored by this renderable.
Vector2 Size
Vector2 representing the width and height of the rect.
SizingInfo SizingPolicy
This stores all the information needed to determine the specific behaviors this Quad should have when...
ChildContainer::const_iterator ConstChildIterator
Const Iterator type for Widget instances stored by this class.
UInt16 ZOrder
This is the ZOrder of this Quad in relation to all other Quads in it's parent.
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
virtual Whole GetHorizontalSizingRules() const
Gets the current behavior this quad will follow for the X axis when it is resized.
SingleImageLayer * CreateSingleImageLayer()
Creates a SingleImageLayer for this renderable.
ChildIterator ChildrenEnd()
Gets an iterator to one passed the last child Widget.
virtual void _Clean()
Refreshes the render data of this renderable.
virtual Whole GetIndex() const
Gets the index position of this RenderLayer in it's parent.
Thrown when the requested identity could not be found.
Node GetFirstChild() const
Get the first child Node of this Node.
void RemoveLayerFromAllGroups(RenderLayer *Layer)
Removes a single RenderLayer from all RenderLayerGroups owned by this QuadRenderable.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
This is a helper class designed to describe the behaviors of a quad when it needs to be resized...
void Append(ScreenRenderData &OtherData)
Appends the contents of another ScreenRenderData to the end of this.
virtual void SetMousePassthrough(Boole Enable)
Sets whether or not this quad should be skipped when determining if the mouse is hovered over this qu...
virtual void ProtoSerializeRenderLayerGroups(XML::Node &SelfRoot) const
Convert the RenderLayerGroups of this class to an XML::Node ready for seriailization.
virtual void SetHorizontalPositioningRules(const Whole Rules)
Sets the behavior this quad will have when it is positioned automatically on the X axis...
virtual UnifiedVec2 GetUnifiedSize() const
Gets the size of this QuadRenderable as a Unified Vector2.
This is a render layer specializing in multi-line text.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
virtual UnifiedVec2 GetMinSize() const
Gets the currently set minimum size for this quad.
Value representing a SingleLineTextLayer.
UI::AspectRatioLock RatioLock
Rule for determining aspect ratio lock.
QuadRenderable * GetTopMostQuad()
Gets the QuadRenderable that is both an ancestor of this quad, and a direct child of the screen...
virtual const PositioningInfo & GetPositioningPolicy() const
Gets the current behavior this QuadRenderable will use when it is positioned.
const Char8 * AsString(const Char8 *def="") const
Attempts to convert the value of the attribute to a String and returns the results.
virtual void _UpdateIndex(const Whole Index)
Notifies this RenderLayer that it's index in the parent QuadRenderable has been updated.
virtual void ProtoDeSerializeImpl(const XML::Node &SelfRoot)
Implementation method for deseriailizing additional sets of data.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
Boole CheckOverlap(const Rect &OtherRect) const
Checks to see if another Rect is overlapping with this one.
virtual void SetUnifiedSize(const UnifiedVec2 &Size)
Sets the size this QuadRenderable will have within it's parent.
void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
static String GetSerializableName()
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialize...
QuadRenderable(Screen *Parent)
Blank constructor.
void RemoveLayer(RenderLayer *RL)
Removes a layer from this group.
This class represents a box shaped area on the screen.
virtual void PopulateTextLinesInLayers(const Real MaxWidth)
Populates all text lines in all text layers owned by this quad.
RenderLayerGroup * CreateRenderLayerGroup(const UInt16 GroupID)
Creates a new RenderLayerGroup that can have. function will throw an exception if a group already exi...
RenderLayerContainer::const_iterator ConstRenderLayerIterator
Const Iterator type for RenderLayer instances stored by this class.
virtual void SetMinSize(const UnifiedVec2 &Min)
Sets the minimum size this quad is allowed to have.
QuadRenderable * GetPrevSibling(Boole Wrap=true)
Gets the QuadRenderable before this one among the QuadRenderables owned by it's parent.
virtual void SetMaxSize(const UnifiedVec2 &Max)
Sets the maximum size this quad is allowed to have.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
virtual void ProtoSerializeImpl(XML::Node &SelfRoot) const
Implementation method for serializing additional sets of data.
bool Empty() const
Is this storing anything at all?
virtual void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
RenderLayerContainer RenderLayers
This is a container storing all the RenderLayer instances created by and belonging to this Quad...
virtual void PopulateTextLines(const Real MaxWidth)
Populates text lines in this layer with parsed characters.
virtual RenderableType GetRenderableType() const =0
Gets the type of renderable this is.
void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
virtual Widget * GetChild(const UInt16 Zorder) const
Gets a child by it's ZOrder.
Boole AllLayersDirty
Determines whether or not this Quad needs all of it's layers refreshed. Usually after a transform upd...
ChildContainer ChildWidgets
This is a container storing all the children that belong to this Quad.
virtual UnifiedRect GetUnifiedRect() const
Gets the Unified positiona nd size of this QuadRenderable as a unified rect.
Whole VerticalRules
Rules for resizing on the Y axis.
UInt16 GetGroupID() const
Gets the ID of this RenderLayerGroup.
Rect ActDims
The actual (pixel) position and size of this Quad on the screen it belongs to.
Value representing a MultiLineTextLayer.
void AddLayerToExistingGroup(RenderLayer *Layer, const UInt16 LayerZOrder, const UInt16 GroupID)
Adds a RenderLayer to the specified group.
virtual void _AppendRenderData(ScreenRenderData &RenderData)
Appends the vertices of this renderable to another vector.
RenderLayerGroupContainer::const_iterator ConstRenderLayerGroupIterator
Const Iterator type for RenderLayerGroup instances stored by this class.
float Real
A Datatype used to represent a real floating point number.
The interface for serialization.
virtual const UInt16 & GetZOrder() const
Gets the currently set ZOrder of this QuadRenderable with it's parent.
RenderLayerIterator RenderLayerBegin()
Gets an iterator to the first RenderLayer.
bool SetValue(const Char8 *rhs)
Set the value of this.
virtual Boole GetManualTransformUpdates() const
Gets whether or not this quad will be automatically updated when parent transforms are updated...
This class represents a 2D rect which can express the size and position of a renderable on screen...
virtual Whole GetHorizontalPositioningRules() const
Gets the current behavior this quad will follow when it is positioned automatically on the X axis...
AspectRatioLock
Used by sizing behavior classes to determine how resizes that preserve aspect ratio should behave...
uint16_t UInt16
An 16-bit unsigned integer.
Whole AsWhole(Whole def=0) const
Attempts to convert the value of the attribute to a Whole and returns the results.
virtual void RemoveChild(Widget *ToBeRemoved)
Removes a child Widget from this quadrenderable.
virtual void DestroyWidget(Widget *ToBeDestroyed)
Destroys a widget.
Child node iterator (a bidirectional iterator over a collection of Node)
void NotifyInactive()
Notifies this RenderLayerGroup that it is no longer the active group.
A light-weight handle for manipulating nodes in DOM tree.
iterator begin() const
Get a Child node iterator that references the first child Node.
void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
virtual Real GetIdealHeightForText() const
Gets the height needed for this quadrenderable to be able to completely display text in it's child te...
virtual UInt16 GetHighestChildZOrder() const
Gets the highest ZOrder among the children of this QuadRenderable.
unsigned int AsUint(unsigned int def=0) const
Attempts to convert the value of the attribute to an unsigned int and returns the results...
virtual Boole IsInside(const Vector2 &Point) const
Checks to see if a point in 2D space is inside this quad.
UnifiedVec2 Position
The top left position of this rect.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
uint32_t UInt32
An 32-bit unsigned integer.
void ResizeLayers(const Whole NewSize)
Resizes the container for RenderLayers in this QuadRenderable.
virtual UI::AspectRatioLock GetAspectRationLock() const
Gets how (and if) the aspect ratio of this quad is locked.
RenderLayerContainer::iterator RenderLayerIterator
Iterator type for RenderLayerPair instances stored by this class.
virtual void SetManualTransformUpdates(Boole Enable)
Sets whether or not this quad has specific behaviors for it's transform updates and they should not b...
Boole RenderLayerGroupExists(const UInt16 GroupID) const
Checks to see if a RenderLayerGroup exists.
This is used to represent a point on a 2 dimentional area, such as a screen.
iterator end() const
Get a Child node iterator that references one past the last child Node.
ChildContainer::const_reverse_iterator ConstReverseChildIterator
Const Reverse Iterator type for Widget instances stored by this class.
virtual void ProtoDeSerializeRenderLayers(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the RenderLayers of this object with it...
bool Empty() const
Is this storing anything at all?
RenderLayerIterator RenderLayerEnd()
Gets an iterator to one passed the last RenderLayer.
UInt32 GetNumRenderLayers() const
Gets the number of RenderLayers created for this renderable.
virtual void SetHorizontalSizingRules(const Whole Rules)
Sets the behavior this quad will have on the X axis when it is resized.
Boole ManualTransformUpdates
Controls whether or not this Quad and it's children will recieve automatic transform updates...
virtual void SetAspectRatioLock(const UI::AspectRatioLock Lock)
Sets how (and if) the aspect ratio of this quad is locked.
virtual Vector2 GetActualSize() const
Gets the pixel size of this widget.
RenderLayerIterator RenderLayerBegin()
Gets an iterator to the first RenderLayer.
RenderLayerGroupIterator RenderLayerGroupEnd()
Gets an iterator to one passed the last RenderLayerGroup.
RenderLayerIterator RenderLayerEnd()
Gets an iterator to one passed the last RenderLayer.
virtual void DestroyAllChildren()
Destroys all child Widgets currently inside this QuadRenderable.
void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
virtual void ProtoDeSerializeRenderLayerGroups(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the RenderLayerGroups of this object with it...
virtual ~QuadRenderable()
Class destructor.
virtual void UpdateChildDimensions()
Updates the dimensions of the children in this QuadRenderable.
This is a small convenience class used to store a RenderLayerGroup ID and a ZOrder on that RenderLaye...
ScreenRenderData * VertexCache
This is a pointer to the optional cache of vertex's belonging to this Quad and all of it's children...
virtual void RemoveAllChildren()
Removes all child Widgets from this QuadRenderable.
RenderLayerGroupIterator RenderLayerGroupBegin()
Gets an iterator to the first RenderLayerGroup.
RenderLayerGroup * GetActiveGroup() const
Gets the current RenderLayerGroup used for rendering.
void AddLayerToGroup(RenderLayer *Layer, const UInt16 LayerZOrder, const UInt16 GroupID)
Adds a RenderLayer to the specified group.
virtual void Layout(const Rect &OldSelfRect, const Rect &NewSelfRect, const ChildContainer &ChildQuads)
Updates the dimensions of a collection of QuadRenderables.
void AppendLayerVertices(std::vector< VertexData > &Vertices)
Adds all the vertices belonging to all the layers of this renderable to the provided vector...
String Name
The unique name of this Renderable.
Whole HorizontalRules
Rules for determining the position of a quad on the X axis.
virtual Boole CheckOverlap(const QuadRenderable *Quad) const
Checks to see if another Quad is overlapping with this one.
virtual Boole IsChildOfScreen() const
Gets whether or not this QuadRenderable is a direct child of it's screen.
std::vector< GroupOrderEntry > GroupOrderEntryVector
Convenience container type for GroupOrderEntry storage.
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
virtual void AddChild(Widget *Child)
Adds a Widget to this as a child of this quad.
virtual void _SetZOrder(const UInt16 &Zorder)
Ssts the ZOrder value for this renderable.
virtual void _AppendRenderDataCascading(ScreenRenderData &RenderData)
Appends the vertices of this renderable to another vector, and then does the same for this renderable...
UInt32 GetNumRenderLayerGroups() const
Gets the number of RenderLayerGroup's created for this renderable.
virtual void _SetLayoutStrat(LayoutStrategy *ToSet)
Sets a new LayoutStrategy for this quad to use.
virtual void SetSprite(Sprite *NewSprite)
Sets the fill image(if provided in the atlas) of the layer.
RenderLayerGroup * CreateRenderLayerGroupNoCheck(const UInt16 ID)
Creates a new RenderLayerGroup with the provided ID, without checking if it is unique.
virtual void UpdateChildOrder()
Updates the order of children in this QuadRenderable based on the ZOrder set on each child...
This class stores a group of render layers that can be set to be rendered.
UInt32 GetNumVisibleRenderLayers() const
Gets the number of RenderLayers that are visible in this renderable.
RenderLayerGroupContainer RenderLayerGroups
This is a container storing all the RenderLayerGroup instances created by and belonging to this Quad...
virtual void SetSizingPolicy(const SizingInfo &Policy)
Sets the behavior to be used when this QuadRenderable is sized.
UnifiedVec2 UPosition
Unified dimensions to be used if the resize rules permits it.
Thrown when the identity string wasn't valid at all.
RenderLayerType
This enum describes the type of RenderLayer this is for use in casting.
void AddLayerToGroups(RenderLayer *Layer, const GroupOrderEntryVector &Entrys)
Adds a RenderLayer to multiple groups.
void DestroyAllRenderLayerGroups()
Destroy's all RenderLayerGroups being stored/managed by this QuadRenderable.
ReverseChildIterator RChildrenBegin()
Gets an iterator to the last Widget.
Widget * GetClosestChild(Widget *Child)
Gets a pointer to the child of this QuadRenderable that is storing a child, or another quad that is...
UInt16 GroupID
The ID of the RenderLayerGroup this entry is referring to.
UInt16 LayerZOrder
The ZOrder within the specified RenderLayerGroup to modify.
The bulk of the engine components go in this namspace.
MultiLineTextLayer * CreateMultiLineTextLayer()
Creats a MultiLineTextLayer for this renderable.
This class stores all vertices pertaining to a layer sorted by their priority for rendering...
QuadRenderable * GetParent() const
Gets the parent of this quad.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
virtual void SetVerticalSizingRules(const Whole Rules)
Sets the behavior this quad will have on the Y axis when it is resized.
void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
UnifiedVec2 MinSize
The minumum permitted size.
RenderLayerGroup * CreateOrRetrieveRenderLayerGroup(const UInt16 GroupID)
Gets the named RenderLayerGroup or creates one with the specified ID if it does not exist...
virtual Whole GetNumChildren() const
Gets the number of children in this QuadRenderable.
ChildContainer::iterator ChildIterator
Iterator type for Widget instances stored by this class.
virtual Vector2 GetActualPosition() const
Gets the pixel position of this widget.
RenderLayer * GetRenderLayer(const UInt32 &Index) const
Gets a RenderLayer belonging to this QuadRenderable by index.
UnifiedVec2 USize
Unified dimensions to be used if the resize rules permits it.
Boole IsVertexCachingEnabled() const
Gets whether or not vertex caching is enabled for this Quad.
This class represents a point in 2D space using UnifiedDim's.
virtual UnifiedVec2 GetUnifiedPosition() const
Gets the position of this QuadRenderable as a Unified Vector2.
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
ReverseChildIterator RChildrenEnd()
Gets an iterator to one before the first child Widget.
Boole Dirty
Stores whether this Renderables vertices need to be regenerated.
virtual void SetUnifiedPosition(const UnifiedVec2 &Position)
Sets the position this QuadRenderable will have within it's parent.
void DestroyRenderLayer(RenderLayer *ToBeDestroyed)
Destroys a RenderLayer being stored by this renderable.
Boole IsInside(const Vector2 &Point) const
Checks to see if a point in 2D space is inside this rect.
virtual void SetPositioningPolicy(const PositioningInfo &Policy)
Sets the behavior to be used when this QuadRenderable is positioned.
virtual void SetVerticalPositioningRules(const Whole Rules)
Sets the behavior this quad will have when it is positioned automatically on the Y axis...
This represents a nestable quad for an object in a GUI layout.
virtual void UpdateDimensions()
Updates the dimensions of this QuadRenderable based on the transform of it's parent.
SingleLineTextLayer * CreateSingleLineTextLayer()
Creats a SingleLineTextLayer for this renderable.
QuadRenderable * GetNextSibling(Boole Wrap=true)
Gets the QuadRenderable after this one among the QuadRenderables owned by it's parent.
Vector2 Position
Vector2 representing the top-left position of the rect.
ChildIterator ChildrenBegin()
Gets an iterator to the first child Widget.
virtual void _MarkDirty()
Marks this renderable as dirty, and informs other renderables if needed.
void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
Whole HorizontalRules
Rules for resizing on the X axis.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
This is an image layer that supports rendering only a single image/sprite.
Boole MousePassthrough
Controls whether or not this Quad will be considered for mouse hover checks.
UInt32 GetNumRenderLayers() const
Gets the number of RenderLayers assigned to this group.
RenderLayerGroup * GetRenderLayerGroup(const UInt16 GroupID) const
Gets a RenderLayerGroup by ID.
void AddLayer(RenderLayer *RL, const UInt16 ZOrder)
Adds a layer to this group by it's ZOrder.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
virtual void ProtoDeSerializeChildQuads(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the ChildQuads of this object with it...
This class is a helper class for creating UI's. It is responsible for storing and keeping track of al...
MultiImageLayer * CreateMultiImageLayer()
Creates an MultiImageLayer for this renderable.
LayoutStrategy * LayoutStrat
This is a pointer to the strategy being used by this Quad to determine the positions and sizes of chi...
std::string String
A datatype used to a series of characters.
This is a base class for render layers that render text.
QuadRenderable * ParentQuad
This is a pointer to the Quad that owns this Quad and is responsible for transform updates applied to...
UnifiedVec2 MaxSize
The maximum permitted size.
This is an image layer that supports rendering of multiple images within it's space.
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
virtual Whole GetVerticalSizingRules() const
Gets the current behavior this quad will follow for the Y axis when it is resized.
This is the base class for the types of layers that can be added to a renderable. ...
This is a helper class designed to describe the behaviors of a quad when it needs to be repositioned...
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.
virtual UInt16 GetLowestChildZOrder() const
Gets the lowest ZOrder among the children of this QuadRenderable.
Screen * ParentScreen
A pointer to the Screen that created this Renderable.
virtual void _NotifyParenthood(QuadRenderable *NewParent)
Notifies this QuadRenderable that it has been added to another QuadRenderable.
virtual Widget * CreateWidget(const XML::Node &WidgetNode)
Creates a widget from an XML::Node.
void SetActiveGroup(const UInt16 GroupID)
Sets the RenderLayerGroup that will be used to render this renderable.