40 #ifndef _uiradiobutton_cpp
41 #define _uiradiobutton_cpp
43 #include "UI/radiobutton.h"
44 #include "UI/screen.h"
46 #include "stringtool.h"
65 CurrentSelection(NULL)
66 { this->
AddEvent(RadioButtonGroup::EventGroupButtonSelected); }
108 if( (*RadioIt) != Exclude ) {
109 (*RadioIt)->ManualSelect(
false);
198 if( OtherGroup == NULL ) {
204 if( OtherGroup != NULL ) {
246 SerializeError(
"Create XML Version Attribute",
"GroupButton",
true);
250 SerializeError(
"Create XML Version Attribute",
"GroupButtons",
true);
266 if( !ButtonsNode.
Empty() ) {
270 if( (*ButtonNodeIt).GetAttribute(
"Version").AsInt() == 1 ) {
273 CurrAttrib = (*ButtonNodeIt).GetAttribute(
"GroupButtonName");
274 if( !CurrAttrib.
Empty() )
275 GroupButtonName = CurrAttrib.
AsString();
277 if( !GroupButtonName.empty() ) {
283 ExceptionStream <<
"Named Widget \"" << GroupButtonName <<
"\" not found or not a RadioButton when deserializing Widget named \"" << this->
GetName() <<
"\".";
304 if( !PropertiesNode.
Empty() ) {
306 CurrAttrib = PropertiesNode.
GetAttribute(
"LockoutTime");
307 if( !CurrAttrib.
Empty() )
364 {
return new RadioButton(RendName,RendRect,Parent); }
382 {
delete static_cast<RadioButton*
>( 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.
virtual void _OnDeselected()
Self logic to be executed when this checkbox is deselected.
Boole SelectLock
Stores whether or not the current state of this CheckBox is locked.
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 ProtoDeSerializeProperties(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite the properties of this object with it...
A simple reference counting pointer.
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.
std::stringstream StringStream
A Datatype used for streaming operations with strings.
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...
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.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
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?
Event * AddEvent(const String &EventName)
Creates a new event this Publisher can fire.
void FireEvent(EventArgumentsPtr Args)
Fires an event.
Thrown when the available information should have worked but failed for unknown reasons.
Thrown when parameters are checked at runtime and found invalid.
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.
virtual void ManualSelect(Boole Select)
Manually select or deselect this checkbox.
virtual void ProtoDeSerialize(const XML::Node &SelfRoot)
Take the data stored in an XML Node and overwrite this object with it.
virtual void _OnSelected()
Self logic to be executed when this checkbox is selected.
This is a simple widget for storing a bool value.
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.
virtual void ProtoSerializeProperties(XML::Node &SelfRoot) const
Convert the properties of this class to an XML::Node ready for serialization.
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.