Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Types | Public Member Functions | List of all members
hdi::core::RadioButtonGroup Class Reference

Allows for logically grouping radio buttons together, such that one can be chosen and others automatically unchosen, etc. More...

#include <hdicoreRadioButtonGroup.h>

Public Types

typedef std::list< RadioButton * > RadioButtonList
 

Public Member Functions

 RadioButtonGroup ()
 Constructs a new radio button group. More...
 
 RadioButtonGroup (const RadioButtonGroup &group_)
 Constructs a new RadioButtonGroup object from an existing RadioButtonGroup object (copy constructor) More...
 
virtual ~RadioButtonGroup ()
 RadioButtonGroup destructor. More...
 
virtual RadioButtonGroupoperator= (const RadioButtonGroup &rhs_)
 Allows one RadioButtonGroup object to be assigned from another. More...
 
virtual bool operator== (const RadioButtonGroup &rhs_) const
 Tests whether a given RadioButtonGroup object is the same as another. More...
 
virtual bool operator!= (const RadioButtonGroup &rhs_) const
 Tests whether a given RadioButtonGroup object is not the same as another. More...
 
virtual void add (const RadioButton &rb_)
 Adds a button to the group. More...
 
virtual void remove (const RadioButton &rb_)
 Removes a button from the group. More...
 
virtual bool hasButton (const RadioButton &rb_)
 Checks for the existence of a button in the group. More...
 
virtual const RadioButtonList buttons () const
 Gets a list of the contained buttons. More...
 
virtual RadioButton *const defaultButton () const
 Gets the default radio button for the group. More...
 
virtual void setDefaultButton (const RadioButton &radio_)
 Sets the default radio button for the group. More...
 
virtual void clearDefaultButton ()
 Clears the default radio button for the group (i.e. unsets it) More...
 

Detailed Description

Allows for logically grouping radio buttons together, such that one can be chosen and others automatically unchosen, etc.

Constructor & Destructor Documentation

hdi::core::RadioButtonGroup::RadioButtonGroup ( )

Constructs a new radio button group.

Author
GW
Date
09/2013
hdi::core::RadioButtonGroup::RadioButtonGroup ( const RadioButtonGroup group_)

Constructs a new RadioButtonGroup object from an existing RadioButtonGroup object (copy constructor)

Author
GW
Date
11/2013
Parameters
group_Existing RadioButtonGroup object
virtual hdi::core::RadioButtonGroup::~RadioButtonGroup ( )
virtual

RadioButtonGroup destructor.

Author
GW
Date
09/2013

Member Function Documentation

virtual void hdi::core::RadioButtonGroup::add ( const RadioButton rb_)
virtual

Adds a button to the group.

Author
GW
Date
09/2013
Parameters
rb_Radio button object to add
Note
If the button is already in a group, this method will bail early
virtual const RadioButtonList hdi::core::RadioButtonGroup::buttons ( ) const
virtual

Gets a list of the contained buttons.

Author
GW
Date
09/2013
Returns
A vector containing all RadioButton objects in the target group
virtual void hdi::core::RadioButtonGroup::clearDefaultButton ( )
virtual

Clears the default radio button for the group (i.e. unsets it)

Author
GW
Date
06/2015
virtual RadioButton* const hdi::core::RadioButtonGroup::defaultButton ( ) const
virtual

Gets the default radio button for the group.

A radio button group can have a default button, which will be automatically chosen in the case that all other buttons have become unchosen (i.e. the group itself can never have all buttons unchosen). A default button is optional (allowing all buttons in the group to be unchosen).

Author
GW
Date
09/2013
Returns
The default RadioButton object for the group, or NULL if none
virtual bool hdi::core::RadioButtonGroup::hasButton ( const RadioButton rb_)
virtual

Checks for the existence of a button in the group.

Author
GW
Date
09/2013
Parameters
rb_Radio button in question
Returns
true if the button is contained in the group, false otherwise
virtual bool hdi::core::RadioButtonGroup::operator!= ( const RadioButtonGroup rhs_) const
virtual

Tests whether a given RadioButtonGroup object is not the same as another.

Author
GW
Date
09/2013
Parameters
rhs_RadioButtonGroup to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different radio button groups, false otherwise
virtual RadioButtonGroup& hdi::core::RadioButtonGroup::operator= ( const RadioButtonGroup rhs_)
virtual

Allows one RadioButtonGroup object to be assigned from another.

Author
GW
Date
09/2013
Parameters
rhs_Righthand side of the = operator; the object to copy values from
Returns
The target RadioButtonGroup object, but with its value updated to match that of rhs_
virtual bool hdi::core::RadioButtonGroup::operator== ( const RadioButtonGroup rhs_) const
virtual

Tests whether a given RadioButtonGroup object is the same as another.

Author
GW
Date
09/2013
Parameters
rhs_RadioButtonGroup to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same radio button group, false otherwise
virtual void hdi::core::RadioButtonGroup::remove ( const RadioButton rb_)
virtual

Removes a button from the group.

Author
GW
Date
09/2013
Parameters
rb_Radio button to remove
Note
If the button isn't in the group, this method will bail early
virtual void hdi::core::RadioButtonGroup::setDefaultButton ( const RadioButton radio_)
virtual

Sets the default radio button for the group.

Author
GW
Date
09/2013
Parameters
radio_The radio button to act as the default for the group
Precondition
This method must be called after all radios have been added to the group.
Note
For more info about the default radio button functionality, see the defaultButton() method.