Exponent::GUI::Controls::CRadioButton Class Reference

Inheritance diagram for Exponent::GUI::Controls::CRadioButton:

Exponent::GUI::Controls::CControlPanel Exponent::GUI::Listeners::IActionListener Exponent::GUI::Controls::CControlRoot Exponent::GUI::Controls::CControl Exponent::GUI::Controls::IControlRoot Exponent::GUI::Controls::IControl Exponent::GUI::Listeners::IMouseListener Exponent::GUI::Listeners::IDropFileListener Exponent::GUI::Listeners::IKeyboardListener List of all members.

Detailed Description

Multiple linked buttons.

A radio button is a panel with a set of buttons
To set the postions of the panel, call getButtons,
and then loop through the array, remmebering that the
radio button itself is a panel and therefore controls are set relative to it..

Date:
19/03/2005
Author:
Paul Chana
Version:
1.0.0 Initial version
Note:
All contents of this source code are copyright 2005 Exp Digital Uk.
This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
Certain sections of this code may come from other sources. They are credited where applicable.
If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk
Id
CRadioButton.hpp,v 1.7 2007/02/08 21:07:54 paul Exp

Definition at line 44 of file CRadioButton.hpp.

Public Member Functions

Protected Attributes


Constructor & Destructor Documentation

Exponent::GUI::Controls::CRadioButton::CRadioButton ( IControlRoot root,
const long  uniqueId,
const CRect &  area,
const long  numberOfButtons,
IActionListener listener = NULL 
)

Construction

Parameters:
root The root control that this control is being added to
uniqueId The unique Identifier of this control or CCONTROL_NO_ID_REQUIRED if no id is required
area The area of this control relative to the root controls top left
numberOfButtons The number of buttons to be displayed as part of the radio button
listener The action listener

virtual Exponent::GUI::Controls::CRadioButton::~CRadioButton (  )  [virtual]

Destruction


Member Function Documentation

virtual TCountedPointerArray<IControl>* Exponent::GUI::Controls::CRadioButton::getButtons (  )  const [inline, virtual]

Get the buttons array

Return values:
TCountedPointerArray<IControl>* The array of button, guaranteed to be valid
Note:
The only safe conversion of the controls contained within this is to CLatchingButton, any other conversion is invalid
See also:
CLatchingButton

Definition at line 97 of file CRadioButton.hpp.

References Exponent::GUI::Controls::CControlRoot::m_controlArray.

virtual long Exponent::GUI::Controls::CRadioButton::getSelectedIndex (  )  const [inline, virtual]

Get the selected index

Return values:
long The index of the currently selected button

Definition at line 83 of file CRadioButton.hpp.

References m_selectedIndex.

virtual void Exponent::GUI::Controls::CRadioButton::handleActionEvent ( const CActionEvent &  event  )  [virtual]

Handle the action event

Parameters:
event The event to handle

virtual void Exponent::GUI::Controls::CRadioButton::setArea ( const CRect &  area  )  [virtual]

Set the size of the control

Parameters:
area The are of the control

Reimplemented from Exponent::GUI::Controls::CControlPanel.

virtual void Exponent::GUI::Controls::CRadioButton::setNumberOfButtons ( const long  number  )  [virtual]

Set the number of buttons

Parameters:
number The number of buttons. Implies reinitialisation of class

virtual void Exponent::GUI::Controls::CRadioButton::setSelectedButton ( const long  index  )  [virtual]

Set the selected indx

Parameters:
index THe index of the button you want to be selected


Member Data Documentation

long Exponent::GUI::Controls::CRadioButton::m_numberOfButtons [protected]

How many buttons do we have

Definition at line 118 of file CRadioButton.hpp.

long Exponent::GUI::Controls::CRadioButton::m_selectedIndex [protected]

Which is currently selected

Definition at line 117 of file CRadioButton.hpp.

Referenced by getSelectedIndex().


Infinity API - Exponent::GUI::Controls::CRadioButton Class Reference generated on 7 Mar 2007