class MASKING_DLL_DECLSPEC RadioButton

A radio button is almost identical to a checkbox.

Inheritance:

RadioButton - CheckBox - Button - Label - Widget - Rect


Public Methods

[more] RadioButton()
default constructor
[more]void SetGroup(int g)
Assings the radio button to the group g.
[more]int GetGroup()
returns the group id of this button
[more]void Setup(int x, int y, int w, int h, int key, int flags, const char* t, int g)
Shortcut for Button::Setup() and SetGroup()

Protected Fields

[more]int group
The ID of the group the radio button belongs to

Protected Methods

[more]void MsgKey()
Like Button::MsgKey() except that this one doesn't toggle the button but only select it if it isn't already selected and send MSG_RADIO to all the widgets in the dialog
[more]void MsgLPress()
Like Button::MsgLPress() except that this one doesn't toggle the button but only select it if it isn't already selected and send MSG_RADIO to all the widgets in the dialog
[more]void MsgLRelease()
Like Button::MsgLRelease() except that this one doesn't toggle the button but only select it if it isn't already selected and send MSG_RADIO to all the widgets in the dialog
[more]void MsgRadio(int g)
If the button is in the same group as the widget that sent this message (group g), the button deselects itself
[more]void MsgInitSkin()
Initializes the widget with the default radio button bitmap, fonts and font colours from the skin and sets all the flags that define the behaviour of a radio button


Documentation

A radio button is almost identical to a checkbox. The only two differences are that usually a radio button uses a sligtly different bitmap (although both widgets use the same format so the bitmaps can be exchanged between a RadioButton and a CheckBox) and radio buttons are organized in groups. At any given time only one radio button in the group may be selected. Whenever a radio button is toggled it sends a MSG_RADIO message to all the widgets in the dialog so they can uncheck themselves. Also a radio button cannot deselect iteslf. Only another button from the same group can do this.
oint group
The ID of the group the radio button belongs to

ovoid MsgKey()
Like Button::MsgKey() except that this one doesn't toggle the button but only select it if it isn't already selected and send MSG_RADIO to all the widgets in the dialog

ovoid MsgLPress()
Like Button::MsgLPress() except that this one doesn't toggle the button but only select it if it isn't already selected and send MSG_RADIO to all the widgets in the dialog

ovoid MsgLRelease()
Like Button::MsgLRelease() except that this one doesn't toggle the button but only select it if it isn't already selected and send MSG_RADIO to all the widgets in the dialog

ovoid MsgRadio(int g)
If the button is in the same group as the widget that sent this message (group g), the button deselects itself

ovoid MsgInitSkin()
Initializes the widget with the default radio button bitmap, fonts and font colours from the skin and sets all the flags that define the behaviour of a radio button

o RadioButton()
default constructor

ovoid SetGroup(int g)
Assings the radio button to the group g. There may be any number of buttons in a group and there may be any number of groups in a dialog but they all have to have unique IDs.

oint GetGroup()
returns the group id of this button

ovoid Setup(int x, int y, int w, int h, int key, int flags, const char* t, int g)
Shortcut for Button::Setup() and SetGroup()


This class has no child classes.

Alphabetic index Hierarchy of classes


Back to front page   |   page generated with DOC++