43 #include "UI/uimanager.h"
44 #include "UI/button.h"
45 #include "UI/screen.h"
62 Activation(AS_Deactivated),
69 Activation(AS_Deactivated),
75 Widget(RendName,RendRect,Parent),
76 Activation(AS_Deactivated),
83 Activation(AS_Deactivated),
124 this->
AddEvent(Button::EventActivated);
125 this->
AddEvent(Button::EventStandby);
126 this->
AddEvent(Button::EventDeactivated);
131 for(
Whole X = 0 ; X < Codes.size() ; X++ )
138 return (Input::KEY_FIRST < Code && Input::KEY_LAST > Code) ||
139 (Input::MOUSEBUTTON_FIRST <= Code && Input::MOUSEBUTTON_LAST >= Code) ||
140 (Input::CONTROLLERBUTTON_FIRST <= Code && Input::CONTROLLERBUTTON_LAST >= Code);
221 if( (*ActIt).GetKeyData().IsKeyboardButton() ) {
233 if( (*ActIt).GetKeyData().IsMouseButton() ) {
245 if( (*ActIt).GetKeyData().IsControllerButton() ) {
287 (*CodeIt).GetKeyData().ProtoSerialize(CodesNode);
303 if( !PropertiesNode.
Empty() ) {
305 CurrAttrib = PropertiesNode.
GetAttribute(
"LockoutTime");
306 if( !CurrAttrib.
Empty() )
310 if( !CodesNode.
Empty() ) {
377 {
return new Button(RendName,Parent); }
380 {
return new Button(RendName,RendRect,Parent); }
383 {
return new Button(XMLNode,Parent); }
386 {
return new Button(Parent); }
392 {
return this->
CreateButton(RendName,RendRect,Parent); }
398 {
delete static_cast<Button*
>( ToBeDestroyed ); }
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.
const InputContainer & GetAutoRegisteredCodes() const
Gets the list of codes that will be auto-registered with each UI button.
Boole ButtonAutoRegisterEnabled() const
Gets whether or not the ButtonAutoRegister feature is enabled.
Boole IsStopped()
Gets whether or not this Timer is currently running.
Thrown when the requested identity could not be found.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
A simple reference counting pointer.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
virtual UIManager * GetManager() const
Gets the UIManager this screen belongs to.
std::vector< Input::MetaCode > InputContainer
Basic container type for Input::MetaCode storage by this class.
bool Empty() const
Is this storing anything at all?
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...
Child node iterator (a bidirectional iterator over a collection of Node)
A light-weight handle for manipulating nodes in DOM tree.
iterator begin() const
Get a Child node iterator that references the first child Node.
unsigned int AsUint(unsigned int def=0) const
Attempts to convert the value of the attribute to an unsigned int and returns the results...
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.
iterator end() const
Get a Child node iterator that references one past the last child Node.
bool Empty() const
Is this storing anything at all?
void Start()
Activates the Timer.
Event * AddEvent(const String &EventName)
Creates a new event this Publisher can fire.
void SetCountMode(const Mezzanine::CountMode Mode)
Sets the mode the timer should use to increment time.
String Name
The unique name of this Renderable.
void FireEvent(EventArgumentsPtr Args)
Fires an event.
void Reset(const Whole StartTime=0)
Sets the current time to an initial value and stops the Timer if it is running.
Thrown when parameters are checked at runtime and found invalid.
The timer counts down, meaning the Timer current time is showing remaining time.
This class is responsible for any and all user interactions with the User interface/HUD.
A basic timer class to assist in timed operations.
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.
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
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.
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.