]> git.saurik.com Git - wxWidgets.git/blame - include/wx/univ/radiobut.h
using Run of base class
[wxWidgets.git] / include / wx / univ / radiobut.h
CommitLineData
1e6feb95
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/univ/radiobut.h
3// Purpose: wxRadioButton declaration
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 10.09.00
442b35b5 7// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
65571936 8// Licence: wxWindows licence
1e6feb95
VZ
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_UNIV_RADIOBUT_H_
12#define _WX_UNIV_RADIOBUT_H_
13
1e6feb95
VZ
14#include "wx/checkbox.h"
15
16// ----------------------------------------------------------------------------
17// wxRadioButton
18// ----------------------------------------------------------------------------
19
53a2db12 20class WXDLLIMPEXP_CORE wxRadioButton : public wxCheckBox
1e6feb95
VZ
21{
22public:
23 // constructors
6463b9f5 24 wxRadioButton() { Init(); }
1e6feb95
VZ
25
26 wxRadioButton(wxWindow *parent,
27 wxWindowID id,
28 const wxString& label,
29 const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxDefaultSize,
31 long style = 0,
32 const wxValidator& validator = wxDefaultValidator,
6463b9f5
JS
33 const wxString& name = wxRadioButtonNameStr)
34 {
35 Init();
36
37 Create(parent, id, label, pos, size, style, validator, name);
38 }
1e6feb95
VZ
39
40 bool Create(wxWindow *parent,
41 wxWindowID id,
42 const wxString& label,
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 long style = 0,
46 const wxValidator& validator = wxDefaultValidator,
47 const wxString& name = wxRadioButtonNameStr);
48
49 // override some base class methods
50 virtual void ChangeValue(bool value);
51
52protected:
677dc0ed
JS
53 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
54
1e6feb95
VZ
55 // implement our own drawing
56 virtual void DoDraw(wxControlRenderer *renderer);
57
58 // we use the radio button bitmaps for size calculation
59 virtual wxSize GetBitmapSize() const;
60
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
64 void ClearValue();
65
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();
69
70 // send event about radio button selection
71 virtual void SendEvent();
72
73private:
74 DECLARE_DYNAMIC_CLASS(wxRadioButton)
75};
76
77#endif // _WX_UNIV_RADIOBUT_H_