|
W32DLib
|
The RadioButton class. More...
#include <w32dlib/radiobutton.h>
Public Member Functions | |
| RadioButton (Dialog *parent, int resource_id, int first_radio, int last_radio, DataX *datax) | |
| Constructor. | |
| virtual | ~RadioButton () |
| Destructor. | |
| void | OnPress (Window *owner, W32DLibCallback callback) |
| Sets a callback for a button press. | |
| void | SetState () |
| Sets the radio button on. | |
| bool | GetState () |
| Gets the tickstate. | |
| virtual void | DoDataExchange (bool set) |
| Performs data exchange. | |
Public Member Functions inherited from W32DLib::Control | |
| Control (Dialog *parent, int resource_id, DataX *datax) | |
| Constructor. | |
| virtual | ~Control () |
| Destructor. | |
| int | ResourceID () |
| Returns the Resource ID for the control. | |
| BOOL | ProcessMessage (UINT msg, WPARAM wp, LPARAM lp) |
| Processes a windows event. | |
Public Member Functions inherited from W32DLib::Window | |
| Window () | |
| Constructor. | |
| virtual | ~Window () |
| Destructor. | |
| bool | HasMutex () |
| Whether the Window() constructor could create a mutex. | |
| HWND | GetHWND () |
| Returns the HWND for the window. | |
| HMENU | GetHMENU () |
| Returns the HMENU associated with this window. | |
| bool | SetHMENU (HMENU menu) |
| Sets the HMENU associated with this window. | |
| bool | Move (int x, int y, int width, int height, bool repaint=true) |
| Sets a Window's position and size. | |
| bool | MoveBase (Window *w, int x, int y, int width, int height, bool repaint=true) |
| Sets a Window's position and size using Dialog base units. | |
| LRESULT | SendMsg (UINT msg, WPARAM wp, LPARAM lp) |
| Send a message to the window. | |
| void | SetText (const TCHAR *text) |
| Sets the window text. | |
| void | SetText (const W32String &text) |
| Sets the window text. | |
| W32String | GetText () |
| Gets the window text. | |
| void | Enable (bool enable) |
| Enables or disables the window. | |
Additional Inherited Members | |
Protected Member Functions inherited from W32DLib::Control | |
| void | AddCallback (UINT msg, UINT notification, Window *owner, W32DLibCallback callback) |
| Add a callback for the control. | |
Static Protected Member Functions inherited from W32DLib::Window | |
| static BOOL CALLBACK | WindowProc (HWND wnd, UINT msg, WPARAM wp, LPARAM lp) |
| The base WindProc. | |
Protected Attributes inherited from W32DLib::Control | |
| Dialog * | m_parent |
| Filled in by the constructor with the parent dialog. | |
| int | m_resid |
| Filled in by the constructor with the resource ID. | |
| DataX * | m_data |
| Filled in by the constructor with the DataX object. | |
The RadioButton class.
| W32DLib::RadioButton::RadioButton | ( | Dialog * | parent, |
| int | resource_id, | ||
| int | first_radio, | ||
| int | last_radio, | ||
| DataX * | datax | ||
| ) |
Constructor.
| parent | The dialog the control belongs to. |
| resource_id | The ID of the control in the resource file. |
| first_radio | The ID of the first radio button in the group. |
| last_radio | The ID of the last radio button in the group. |
| datax | The DataX to use. NULL means don't use data exchange. |
|
virtual |
Destructor.
|
virtual |
Performs data exchange.
Support types:
eString – see Control::DoDataExchange()
eBool – same as GetState() / SetState()
| set | If true the set the Control from the DataX object. If false then set the DataX object from the Control. |
Reimplemented from W32DLib::Control.
| bool W32DLib::RadioButton::GetState | ( | ) |
| void W32DLib::RadioButton::OnPress | ( | Window * | owner, |
| W32DLibCallback | callback | ||
| ) |
Sets a callback for a button press.
| owner | The class the callback resides in. |
| callback | The callback. |
| void W32DLib::RadioButton::SetState | ( | ) |
Sets the radio button on.
Note that this will affect other radio buttons in the group if appropriate. If DataX is used to set this and more than two buttons in the group are set the results are indeterminate.