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 WXDLLIMPEXP_CORE 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 virtual wxBorder
GetDefaultBorder() const { return wxBORDER_NONE
; }
56 // implement our own drawing
57 virtual void DoDraw(wxControlRenderer
*renderer
);
59 // we use the radio button bitmaps for size calculation
60 virtual wxSize
GetBitmapSize() const;
62 // the radio button can only be cleared using this method, not
63 // ChangeValue() above - and it is protected as it can only be called by
64 // another radiobutton
67 // called when the radio button becomes checked: we clear all the buttons
68 // in the same group with us here
69 virtual void OnCheck();
71 // send event about radio button selection
72 virtual void SendEvent();
75 DECLARE_DYNAMIC_CLASS(wxRadioButton
)
78 #endif // _WX_UNIV_RADIOBUT_H_