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