]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/radiobut.h
Make wxComboCtrlBase::Set*groundColour() methods public.
[wxWidgets.git] / include / wx / msw / radiobut.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/msw/radiobut.h
2bda0e17
KB
3// Purpose: wxRadioButton class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
bbcdf8bc 7// Copyright: (c) Julian Smart
65571936 8// Licence: wxWindows licence
2bda0e17
KB
9/////////////////////////////////////////////////////////////////////////////
10
bbcdf8bc
JS
11#ifndef _WX_RADIOBUT_H_
12#define _WX_RADIOBUT_H_
2bda0e17 13
53a2db12 14class WXDLLIMPEXP_CORE wxRadioButton: public wxControl
2bda0e17 15{
5f199b71
VZ
16public:
17 // ctors and creation functions
6463b9f5 18 wxRadioButton() { Init(); }
5f199b71
VZ
19
20 wxRadioButton(wxWindow *parent,
21 wxWindowID id,
22 const wxString& label,
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize,
25 long style = 0,
26 const wxValidator& validator = wxDefaultValidator,
6463b9f5
JS
27 const wxString& name = wxRadioButtonNameStr)
28 {
29 Init();
30
31 Create(parent, id, label, pos, size, style, validator, name);
32 }
5f199b71
VZ
33
34 bool Create(wxWindow *parent,
35 wxWindowID id,
36 const wxString& label,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = 0,
40 const wxValidator& validator = wxDefaultValidator,
41 const wxString& name = wxRadioButtonNameStr);
42
43 // implement the radio button interface
44 virtual void SetValue(bool value);
45 virtual bool GetValue() const;
46
47 // implementation only from now on
48 virtual bool MSWCommand(WXUINT param, WXWORD id);
49 virtual void Command(wxCommandEvent& event);
c3732409 50 virtual bool HasTransparentBackground() { return true; }
5f199b71 51
bec08b39
VZ
52 virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
53
5f199b71 54protected:
677dc0ed 55 virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
5f199b71
VZ
56 virtual wxSize DoGetBestSize() const;
57
58private:
59 // common part of all ctors
60 void Init();
61
f607434a
VZ
62 // we need to store the state internally as the result of GetValue()
63 // sometimes gets out of sync in WM_COMMAND handler
64 bool m_isChecked;
5f199b71 65
fc7a2a60 66 DECLARE_DYNAMIC_CLASS_NO_COPY(wxRadioButton)
2bda0e17
KB
67};
68
2bda0e17 69#endif
bbcdf8bc 70 // _WX_RADIOBUT_H_