1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/univ/radiobut.h
3 // Purpose: wxRadioButton declaration
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_UNIV_RADIOBUT_H_
13 #define _WX_UNIV_RADIOBUT_H_
15 #include "wx/checkbox.h"
17 // ----------------------------------------------------------------------------
19 // ----------------------------------------------------------------------------
21 class WXDLLEXPORT wxRadioButton
: public wxCheckBox
25 wxRadioButton() { Init(); }
27 wxRadioButton(wxWindow
*parent
,
29 const wxString
& label
,
30 const wxPoint
& pos
= wxDefaultPosition
,
31 const wxSize
& size
= wxDefaultSize
,
33 const wxValidator
& validator
= wxDefaultValidator
,
34 const wxString
& name
= wxRadioButtonNameStr
)
38 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
41 bool Create(wxWindow
*parent
,
43 const wxString
& label
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
,
47 const wxValidator
& validator
= wxDefaultValidator
,
48 const wxString
& name
= wxRadioButtonNameStr
);
50 // override some base class methods
51 virtual void ChangeValue(bool value
);
54 // implement our own drawing
55 virtual void DoDraw(wxControlRenderer
*renderer
);
57 // we use the radio button bitmaps for size calculation
58 virtual wxSize
GetBitmapSize() const;
60 // the radio button can only be cleared using this method, not
61 // ChangeValue() above - and it is protected as it can only be called by
62 // another radiobutton
65 // called when the radio button becomes checked: we clear all the buttons
66 // in the same group with us here
67 virtual void OnCheck();
69 // send event about radio button selection
70 virtual void SendEvent();
73 DECLARE_DYNAMIC_CLASS(wxRadioButton
)
76 #endif // _WX_UNIV_RADIOBUT_H_