1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxRadioButton class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_RADIOBUT_H_
13 #define _WX_RADIOBUT_H_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "radiobut.h"
19 class WXDLLEXPORT wxRadioButton
: public wxControl
22 // ctors and creation functions
25 wxRadioButton(wxWindow
*parent
,
27 const wxString
& label
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
& name
= wxRadioButtonNameStr
);
34 bool Create(wxWindow
*parent
,
36 const wxString
& label
,
37 const wxPoint
& pos
= wxDefaultPosition
,
38 const wxSize
& size
= wxDefaultSize
,
40 const wxValidator
& validator
= wxDefaultValidator
,
41 const wxString
& name
= wxRadioButtonNameStr
);
43 // implement the radio button interface
44 virtual void SetValue(bool value
);
45 virtual bool GetValue() const;
47 // implementation only from now on
48 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
49 virtual void Command(wxCommandEvent
& event
);
52 virtual wxSize
DoGetBestSize() const;
55 // common part of all ctors
58 // we need to store the state internally as the result of GetValue()
59 // sometimes gets out of sync in WM_COMMAND handler
62 DECLARE_DYNAMIC_CLASS_NO_COPY(wxRadioButton
)