40 #ifndef _uimenuentry_cpp
41 #define _uimenuentry_cpp
43 #include "UI/menuentry.h"
44 #include "UI/stackbutton.h"
45 #include "UI/uimanager.h"
46 #include "UI/screen.h"
47 #include "UI/layoutstrategy.h"
49 #include "stringtool.h"
147 return ( this->
MenuStack->back() == this );
155 if( RollBackTo != NULL && !(this->
MenuStack->empty()) ) {
159 while( MenuBeg != MenuEnd )
161 if( (*MenuBeg) == RollBackTo ) {
249 }
else if( this->
PushButton == ConfigButton ) {
251 }
else if( this->
PopButton == ConfigButton ) {
351 if( !PropertiesNode.
Empty() ) {
353 CurrAttrib = PropertiesNode.
GetAttribute(
"AutoHideEntry");
354 if( !CurrAttrib.
Empty() )
357 CurrAttrib = PropertiesNode.
GetAttribute(
"PushButtonName");
358 if( !CurrAttrib.
Empty() ) {
361 this->
SetPushButton( static_cast<StackButton*>( UncastedButton ) );
367 CurrAttrib = PropertiesNode.
GetAttribute(
"PopButtonName");
368 if( !CurrAttrib.
Empty() ) {
371 this->
SetPopButton( static_cast<StackButton*>( UncastedButton ) );
419 if( Selected != NULL && Selected->
IsHovered() ) {
447 }
else if( this->
PopButton == Selected ) {
529 {
delete static_cast<MenuEntry*
>( ToBeDestroyed ); }
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.
This is a base class for the algorithms used by QuadRenderables to determine how they should update t...
bool Boole
Generally acts a single bit, true or false.
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.
bool Empty() const
Is this storing anything at all?
This implements the exception hiearchy for Mezzanine.
ChildContainer ChildWidgets
This is a container storing all the children that belong to this Quad.
The interface for serialization.
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...
uint16_t UInt16
An 16-bit unsigned integer.
A light-weight handle for manipulating nodes in DOM tree.
This is the base class for containers that stack their children one on top of the other...
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?
Thrown when parameters are checked at runtime and found invalid.
virtual void _SetLayoutStrat(LayoutStrategy *ToSet)
Sets a new LayoutStrategy for this quad to use.
virtual Widget * GetWidget(const String &Name)
Gets a widget in this screen by name.
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.
ChildContainer::iterator ChildIterator
Iterator type for Widget instances stored by this class.
Boole IsWidget() const
Gets whether or not this renderable is a Widget.
This represents a nestable quad for an object in a GUI layout.
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.
std::map< String, String > NameValuePairMap
This is a datatype mostly used for describing settings or parameters that can't be declared in advanc...
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.
QuadRenderable * ParentQuad
This is a pointer to the Quad that owns this Quad and is responsible for transform updates applied to...
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.
virtual void _NotifyParenthood(QuadRenderable *NewParent)
Notifies this QuadRenderable that it has been added to another QuadRenderable.