40 #ifndef _uirenderable_cpp
41 #define _uirenderable_cpp
43 #include "UI/renderable.h"
44 #include "UI/uimanager.h"
45 #include "stringtool.h"
78 {
return this->
Name; }
123 if( !PropertiesNode.
Empty() ) {
126 if( !CurrAttrib.
Empty() )
130 if( !CurrAttrib.
Empty() )
144 {
return "Renderable"; }
150 {
return this->
Dirty; }
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
const String & GetName() const
Gets the name of this renderable.
A light-weight handle for manipulating attributes in DOM tree.
bool Boole
Generally acts a single bit, true or false.
Renderable(Screen *Parent)
Blank constructor.
bool AsBool(bool def=false) const
Attempts to convert the value of the attribute to a float and returns the results.
Thrown when the requested identity could not be found.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
virtual void ProtoDeSerializeImpl(const XML::Node &SelfRoot)
Implementation method for deseriailizing additional sets of data.
virtual ~Renderable()
Class destructor.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
const Char8 * AsString(const Char8 *def="") const
Attempts to convert the value of the attribute to a String and returns the results.
Boole Visible
Stores whether this Renderable is to be rendered (also dependent on parent visibility).
Screen * GetScreen() const
Gets the parent screen of this renderable.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
bool Empty() const
Is this storing anything at all?
virtual RenderableType GetRenderableType() const =0
Gets the type of renderable this is.
The interface for serialization.
bool SetValue(const Char8 *rhs)
Set the value of this.
A light-weight handle for manipulating nodes in DOM tree.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
bool Empty() const
Is this storing anything at all?
Boole _IsDirty() const
Gets whether or not this renderable is dirty.
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
String Name
The unique name of this Renderable.
virtual void ProtoSerialize(XML::Node &ParentNode) const
Convert this class to an XML::Node ready for serialization.
Boole IsScreen() const
Gets whether or not this renderable is a Screen.
virtual void ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
static String GetSerializableName()
Get the name of the the XML tag the Renderable class will leave behind as its instances are serialize...
virtual String GetDerivedSerializableName() const
Gets the most derived serializable name of this Renderable.
The bulk of the engine components go in this namspace.
Boole IsWidget() const
Gets whether or not this renderable is a Widget.
Boole Dirty
Stores whether this Renderables vertices need to be regenerated.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
virtual void ProtoSerializeImpl(XML::Node &SelfRoot) const
Implementation method for serializing additional sets of data.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
This class is a helper class for creating UI's. It is responsible for storing and keeping track of al...
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.
Node GetChild(const Char8 *Name) const
Attempt to get a child Node with a given name.
Screen * ParentScreen
A pointer to the Screen that created this Renderable.