41 #ifndef _uipageprovider_cpp
42 #define _uipageprovider_cpp
44 #include "UI/pageprovider.h"
45 #include "UI/pagedcontainer.h"
46 #include "UI/screen.h"
63 Widget(RendName,RendRect,Parent),
106 if( !PageDataNode.
Empty() ) {
111 CurrAttrib = PageDataNode.
GetAttribute(
"ContainerName");
112 if( !CurrAttrib.
Empty() )
113 ContainerName = CurrAttrib.
AsString();
115 CurrAttrib = PageDataNode.
GetAttribute(
"ProviderConfig");
116 if( !CurrAttrib.
Empty() )
117 ProviderConfig = static_cast<PagedContainer::ProviderMode>( CurrAttrib.
AsWhole() );
119 if( !ContainerName.empty() ) {
121 if( ToSet != NULL ) {
122 switch( ProviderConfig )
This is the base class for containers that have a render area and work area of different sizes...
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.
There is only one PageProvider providing pages for both the X and Y axes of this container, or the queried provider is being used for both the X and Y axes be the container.
virtual void SetProviders(PageProvider *XProv, PageProvider *YProv)=0
Sets the page providers for both axes.
virtual void ProtoSerializePageData(XML::Node &SelfRoot) const
Convert the PageProvider data of this class to an XML::Node ready for serialization.
virtual void ProtoDeSerializePageData(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the PageProvider data of this object with it...
Thrown when the requested identity could not be found.
#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...
const Char8 * AsString(const Char8 *def="") const
Attempts to convert the value of the attribute to a String and returns the results.
virtual void _SetContainer(PagedContainer *ToUpdate)
Sets the container that is using this provider to update which renderables are visible.
bool Empty() const
Is this storing anything at all?
PagedContainer * Container
A pointer to the PagedContainer this scrollbar is providing page data for.
bool SetValue(const Char8 *rhs)
Set the value of this.
This class represents a 2D rect which can express the size and position of a renderable on screen...
Whole AsWhole(Whole def=0) const
Attempts to convert the value of the attribute to a Whole and returns the results.
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?
virtual void SetXProvider(PageProvider *XProv)=0
Sets the PageProvider for the X axis.
virtual ProviderMode GetProviderConfig() const
Gets the current provider configuration of this container.
virtual void ProtoDeSerializeImpl(const XML::Node &SelfRoot)
Implementation method for deseriailizing additional sets of data.
There is only one PageProvider providing pages for the Y axis of this container, or the queried provi...
virtual void ProtoSerializeImpl(XML::Node &SelfRoot) const
Implementation method for serializing additional sets of data.
virtual Widget * GetWidget(const String &Name)
Gets a widget in this screen by name.
virtual void SetYProvider(PageProvider *YProv)=0
Sets the PageProvider for the Y axis.
The bulk of the engine components go in this namspace.
ProviderMode
An enum describing how the providers for this container are configured and being used.
virtual ~PageProvider()
Standard destructor.
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.
PageProvider(Screen *Parent)
Blank constructor.
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.
There is only one PageProvider providing pages for the X axis of this container, or the queried provi...
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.