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