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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "univradiobut.h"
19 #include "wx/checkbox.h"
21 // ----------------------------------------------------------------------------
23 // ----------------------------------------------------------------------------
25 class WXDLLEXPORT wxRadioButton
: public wxCheckBox
31 wxRadioButton(wxWindow
*parent
,
33 const wxString
& label
,
34 const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
,
37 const wxValidator
& validator
= wxDefaultValidator
,
38 const wxString
& name
= wxRadioButtonNameStr
);
40 bool Create(wxWindow
*parent
,
42 const wxString
& label
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
,
46 const wxValidator
& validator
= wxDefaultValidator
,
47 const wxString
& name
= wxRadioButtonNameStr
);
49 // override some base class methods
50 virtual void ChangeValue(bool value
);
53 // implement our own drawing
54 virtual void DoDraw(wxControlRenderer
*renderer
);
56 // we use the radio button bitmaps for size calculation
57 virtual wxSize
GetBitmapSize() const;
59 // the radio button can only be cleared using this method, not
60 // ChangeValue() above - and it is protected as it can only be called by
61 // another radiobutton
64 // called when the radio button becomes checked: we clear all the buttons
65 // in the same group with us here
66 virtual void OnCheck();
68 // send event about radio button selection
69 virtual void SendEvent();
72 DECLARE_DYNAMIC_CLASS(wxRadioButton
)
75 #endif // _WX_UNIV_RADIOBUT_H_