1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/univ/radiobut.h
3 // Purpose: wxRadioButton declaration
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_UNIV_RADIOBUT_H_
12 #define _WX_UNIV_RADIOBUT_H_
14 #include "wx/checkbox.h"
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxRadioButton
: public wxCheckBox
24 wxRadioButton() { Init(); }
26 wxRadioButton(wxWindow
*parent
,
28 const wxString
& label
,
29 const wxPoint
& pos
= wxDefaultPosition
,
30 const wxSize
& size
= wxDefaultSize
,
32 const wxValidator
& validator
= wxDefaultValidator
,
33 const wxString
& name
= wxRadioButtonNameStr
)
37 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
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 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
55 // implement our own drawing
56 virtual void DoDraw(wxControlRenderer
*renderer
);
58 // we use the radio button bitmaps for size calculation
59 virtual wxSize
GetBitmapSize() const;
61 // the radio button can only be cleared using this method, not
62 // ChangeValue() above - and it is protected as it can only be called by
63 // another radiobutton
66 // called when the radio button becomes checked: we clear all the buttons
67 // in the same group with us here
68 virtual void OnCheck();
70 // send event about radio button selection
71 virtual void SendEvent();
74 DECLARE_DYNAMIC_CLASS(wxRadioButton
)
77 #endif // _WX_UNIV_RADIOBUT_H_