40 #ifndef _uipositioninginfo_h
41 #define _uipositioninginfo_h
43 #include "uienumerations.h"
44 #include "UI/unifieddim.h"
79 HorizontalRules(HRules), VerticalRules(VRules) { }
89 UPosition(Position), HorizontalRules(HRules), VerticalRules(VRules) { }
93 UPosition(Other.UPosition), HorizontalRules(Other.HorizontalRules), VerticalRules(Other.VerticalRules) { }
143 if( !CurrAttrib.
Empty() )
144 this->HorizontalRules = CurrAttrib.
AsWhole();
147 if( !CurrAttrib.
Empty() )
148 this->VerticalRules = CurrAttrib.
AsWhole();
151 if( !PositionNode.
Empty() )
163 {
return "PositioningInfo"; }
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
A light-weight handle for manipulating attributes in DOM tree.
bool Boole
Generally acts a single bit, true or false.
static String GetSerializableName()
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialize...
Does not anchor to any side, using only the provided unified dimensions.
PositioningInfo(const Whole HRules, const Whole VRules)
PositionFlags constructor.
Whole VerticalRules
Rules for determining the position of a quad on the Y axis.
Thrown when the requested identity could not be found.
Node GetFirstChild() const
Get the first child Node of this Node.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
bool Empty() const
Is this storing anything at all?
PositioningInfo()
Class constructor.
PositioningInfo(const UnifiedVec2 &Position)
Position constructor.
bool SetValue(const Char8 *rhs)
Set the value of this.
Whole AsWhole(Whole def=0) const
Attempts to convert the value of the attribute to a Whole and returns the results.
~PositioningInfo()
Class destructor.
Boole operator!=(const PositioningInfo &Other) const
Inequality comparison operator.
PositioningInfo(const PositioningInfo &Other)
Copy constructor.
A light-weight handle for manipulating nodes in DOM tree.
void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
bool Empty() const
Is this storing anything at all?
Whole HorizontalRules
Rules for determining the position of a quad on the X axis.
UnifiedVec2 UPosition
Unified dimensions to be used if the resize rules permits it.
void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
This class represents a point in 2D space using UnifiedDim's.
const Char8 * Name() const
ptrdiff_tGet the name of this Node.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
Boole operator==(const PositioningInfo &Other) const
Equality comparison operator.
std::string String
A datatype used to a series of characters.
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
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.
PositioningInfo(const Whole HRules, const Whole VRules, const UnifiedVec2 &Position)
Descriptive constructor.