1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/radiobut.h
3 // Purpose: wxRadioButton class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_RADIOBUT_H_
12 #define _WX_RADIOBUT_H_
14 class WXDLLIMPEXP_CORE wxRadioButton
: public wxControl
17 // ctors and creation functions
18 wxRadioButton() { Init(); }
20 wxRadioButton(wxWindow
*parent
,
22 const wxString
& label
,
23 const wxPoint
& pos
= wxDefaultPosition
,
24 const wxSize
& size
= wxDefaultSize
,
26 const wxValidator
& validator
= wxDefaultValidator
,
27 const wxString
& name
= wxRadioButtonNameStr
)
31 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
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
);
50 virtual bool HasTransparentBackground() { return true; }
52 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const;
55 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
56 virtual wxSize
DoGetBestSize() const;
59 // common part of all ctors
62 // we need to store the state internally as the result of GetValue()
63 // sometimes gets out of sync in WM_COMMAND handler
66 DECLARE_DYNAMIC_CLASS_NO_COPY(wxRadioButton
)