Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
Mezzanine::UI::RadioButtonGroup Class Reference

This is a class designed to facilitate operations across an entire group of RadioButtons. More...

#include <radiobutton.h>

+ Inheritance diagram for Mezzanine::UI::RadioButtonGroup:
+ Collaboration diagram for Mezzanine::UI::RadioButtonGroup:

Public Types

typedef RadioButtonContainer::const_iterator ConstRadioButtonIterator
 Const Iterator type for RadioButton instances stored by this class.
 
typedef std::vector< RadioButton * > RadioButtonContainer
 Basic container type for RadioButton storage by this class.
 
typedef RadioButtonContainer::iterator RadioButtonIterator
 Iterator type for RadioButton instances stored by this class.
 
- Public Types inherited from Mezzanine::EventPublisher
typedef EventContainer::const_iterator ConstEventIterator
 Const Iterator type for Event instances stored by this class.
 
typedef std::map< String, Event * > EventContainer
 Basic container type for Event storage by this class.
 
typedef EventContainer::iterator EventIterator
 Iterator type for Event instances stored by this class.
 

Public Member Functions

 RadioButtonGroup ()
 Class constructor.
 
 ~RadioButtonGroup ()
 Class destructor.
 
void _NotifyButtonSelected (RadioButton *Selected)
 Notifies this group a button has been selected. More...
 
void AddButtonToGroup (RadioButton *ToAdd)
 Adds a RadioButton to this group. More...
 
void DeselectOtherButtons (RadioButton *Exclude)
 Deselects all but one (or just all) button(s) in this group. More...
 
RadioButtonGetCurrentSelection () const
 Gets the button that is currently selected among this group of buttons. More...
 
Whole GetNumButtons () const
 Gets the number of buttons in this group. More...
 
RadioButtonIterator RadioButtonBegin ()
 Gets an iterator to the first RadioButton. More...
 
ConstRadioButtonIterator RadioButtonBegin () const
 Gets a const iterator to the first RadioButton. More...
 
RadioButtonIterator RadioButtonEnd ()
 Gets an iterator to one passed the last RadioButton. More...
 
ConstRadioButtonIterator RadioButtonEnd () const
 Gets an iterator to one passed the last RadioButton. More...
 
void RemoveButtonFromGroup (RadioButton *ToRemove)
 Removes a RadioButton from this group. More...
 
void SelectButton (RadioButton *ToSelect)
 Makes a RadioButton in this group the selection, deselecting all other RadioButtons in the group. More...
 
- Public Member Functions inherited from Mezzanine::EventPublisher
 EventPublisher ()
 Class constructor.
 
virtual ~EventPublisher ()
 Class destructor.
 
EventGetEvent (const String &EventName) const
 Gets an event in this publisher. More...
 
EventGetEventExcept (const String &EventName) const
 Gets an event in this publisher.

Exceptions
Thisversion differs from the non-except version in that if it fails to find the event specified it will throw a "II_IDENTITY_NOT_FOUND_EXCEPTION".
More...
 
Boole GetMuteEvents () const
 Gets whether or not event firings by this publisher will be suppressed. More...
 
void SetMuteEvents (const Boole Mute)
 Sets whether or not event firings by this publisher will be suppressed. More...
 
EventSubscriberSlotSubscribe (const String &EventName, EventSubscriber *Sub)
 Adds a subscriber to this event. More...
 
EventSubscriberSlotSubscribe (const String &EventName, FunctorEventSubscriber *Funct, Boole CleanUpAfter)
 Subscribes a functor object to this event. More...
 
EventSubscriberSlotSubscribe (const String &EventName, CFunctionSubscriberSlot::SubscriberFunction *CFunct)
 Subscribes a C-style function to this event. More...
 
EventSubscriberSlotSubscribe (const String &EventName, Scripting::iScript *SubScript)
 Subscribes a script to this event. More...
 
void Unsubscribe (EventSubscriber *Subscriber)
 Unsubscribes a single subscriber all events in this publisher. More...
 
void Unsubscribe (FunctorEventSubscriber *Funct)
 Unsubscribes a single subscriber all events in this publisher. More...
 
void Unsubscribe (CFunctionSubscriberSlot::SubscriberFunction *CFunct)
 Unsubscribes a single subscriber from all events in this publisher. More...
 
void Unsubscribe (Scripting::iScript *SubScript)
 Unsubscribes a single subscriber from all events in this publisher. More...
 
void Unsubscribe (EventSubscriberSlot *SubSlot)
 Unsubscribes a single subscriber from all events in this publisher. More...
 
void Unsubscribe (const String &EventName, EventSubscriber *Subscriber)
 Unsubscribes a single subscriber from the named event. More...
 
void Unsubscribe (const String &EventName, FunctorEventSubscriber *Funct)
 Unsubscribes a single subscriber from the named event. More...
 
void Unsubscribe (const String &EventName, CFunctionSubscriberSlot::SubscriberFunction *CFunct)
 Unsubscribes a single subscriber from the named event. More...
 
void Unsubscribe (const String &EventName, Scripting::iScript *SubScript)
 Unsubscribes a single subscriber from the named event. More...
 
void Unsubscribe (const String &EventName, EventSubscriberSlot *SubSlot)
 Unsubscribes a single subscriber from the named event. More...
 
Whole UnsubscribeAll ()
 Unsubscribes all subscribers from all events in this publisher. More...
 
Whole UnsubscribeAll (const String &EventName)
 Unsubscribes all subscribers from the named Event. More...
 

Static Public Attributes

static const String EventGroupButtonSelected = "GroupButtonSelected"
 Event name for when the selection among radio buttons has changed.
 

Protected Attributes

RadioButtonCurrentSelection
 A pointer to the RadioButton that is the current selection, or NULL if none are selected. More...
 
RadioButtonContainer GroupButtons
 A container storing all the RadioButtons belonging to this group. More...
 
- Protected Attributes inherited from Mezzanine::EventPublisher
EventContainer Events
 A container storing all the Events published by this class by name. More...
 
Boole MuteEvents
 Stores whether or not events will actually be fired when requested. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Mezzanine::EventPublisher
EventAddEvent (const String &EventName)
 Creates a new event this Publisher can fire. More...
 
void FireEvent (EventArgumentsPtr Args)
 Fires an event. More...
 
void RemoveAllEvents ()
 Removes all events in this Publisher. More...
 
void RemoveEvent (const String &EventName)
 Removes an existing event in this Publisher. More...
 

Detailed Description

This is a class designed to facilitate operations across an entire group of RadioButtons.

Definition at line 54 of file radiobutton.h.

Member Function Documentation

void Mezzanine::UI::RadioButtonGroup::_NotifyButtonSelected ( RadioButton Selected)

Notifies this group a button has been selected.

Parameters
SelectedThe radio button that was selected.

Definition at line 132 of file radiobutton.cpp.

void Mezzanine::UI::RadioButtonGroup::AddButtonToGroup ( RadioButton ToAdd)

Adds a RadioButton to this group.

Parameters
ToAddA pointer to the RadioButton to be added to this group.

Definition at line 74 of file radiobutton.cpp.

void Mezzanine::UI::RadioButtonGroup::DeselectOtherButtons ( RadioButton Exclude)

Deselects all but one (or just all) button(s) in this group.

Note
You can pass in NULL to deselect all buttons in this group.
Parameters
ExcludeThe Button that will be excluded from forced deselection.

Definition at line 104 of file radiobutton.cpp.

RadioButton * Mezzanine::UI::RadioButtonGroup::GetCurrentSelection ( ) const

Gets the button that is currently selected among this group of buttons.

Returns
Returns a pointer to the currently selected button in this group.

Definition at line 114 of file radiobutton.cpp.

Whole Mezzanine::UI::RadioButtonGroup::GetNumButtons ( ) const

Gets the number of buttons in this group.

Returns
Returns a Whole representing the number of buttons that belong to this group.

Definition at line 82 of file radiobutton.cpp.

RadioButtonGroup::RadioButtonIterator Mezzanine::UI::RadioButtonGroup::RadioButtonBegin ( )

Gets an iterator to the first RadioButton.

Returns
Returns an iterator to the first RadioButton being stored by this renderable.

Definition at line 117 of file radiobutton.cpp.

RadioButtonGroup::ConstRadioButtonIterator Mezzanine::UI::RadioButtonGroup::RadioButtonBegin ( ) const

Gets a const iterator to the first RadioButton.

Returns
Returns a const iterator to the first RadioButton being stored by this renderable.

Definition at line 123 of file radiobutton.cpp.

RadioButtonGroup::RadioButtonIterator Mezzanine::UI::RadioButtonGroup::RadioButtonEnd ( )

Gets an iterator to one passed the last RadioButton.

Returns
Returns an iterator to one passed the last RadioButton being stored by this renderable.

Definition at line 120 of file radiobutton.cpp.

RadioButtonGroup::ConstRadioButtonIterator Mezzanine::UI::RadioButtonGroup::RadioButtonEnd ( ) const

Gets an iterator to one passed the last RadioButton.

Returns
Returns an iterator to one passed the last RadioButton being stored by this renderable.

Definition at line 126 of file radiobutton.cpp.

void Mezzanine::UI::RadioButtonGroup::RemoveButtonFromGroup ( RadioButton ToRemove)

Removes a RadioButton from this group.

Parameters
ToRemoveA pointer to the RadioButton to be removed from this group.

Definition at line 87 of file radiobutton.cpp.

void Mezzanine::UI::RadioButtonGroup::SelectButton ( RadioButton ToSelect)

Makes a RadioButton in this group the selection, deselecting all other RadioButtons in the group.

Note
You can pass in NULL to ensure none of the RadioButtons in this group are selected.
Parameters
ToSelectA pointer to the RadioButton in this group that will be selected.

Definition at line 95 of file radiobutton.cpp.

Member Data Documentation

RadioButton* Mezzanine::UI::RadioButtonGroup::CurrentSelection
protected

A pointer to the RadioButton that is the current selection, or NULL if none are selected.

Definition at line 72 of file radiobutton.h.

RadioButtonContainer Mezzanine::UI::RadioButtonGroup::GroupButtons
protected

A container storing all the RadioButtons belonging to this group.

Definition at line 69 of file radiobutton.h.


The documentation for this class was generated from the following files: