Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
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::vector< std::shared_ptr< RadioButton > > RadioButtonVector
 

Public Member Functions

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

Detailed Description

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

Constructor & Destructor Documentation

◆ RadioButtonGroup() [1/2]

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

Constructs a new radio button group.

Author
GW
Date
09/2013

◆ RadioButtonGroup() [2/2]

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

◆ ~RadioButtonGroup()

virtual hdi::core::RadioButtonGroup::~RadioButtonGroup ( )
virtual

RadioButtonGroup destructor.

Author
GW
Date
09/2013

Member Function Documentation

◆ add()

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

◆ buttons()

virtual RadioButtonVector 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

◆ clearDefaultButton()

virtual void hdi::core::RadioButtonGroup::clearDefaultButton ( )
virtual

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

Author
GW
Date
06/2015

◆ defaultButton()

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

◆ hasButton()

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

◆ operator!=()

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

◆ operator=()

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_

◆ operator==()

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

◆ remove()

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

◆ setDefaultButton()

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.