]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/radiobut.h
added wxDynamicLibrary::GetSymbolAorW()
[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
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
5f199b71 16 #pragma interface "radiobut.h"
2bda0e17
KB
17#endif
18
2bda0e17
KB
19class WXDLLEXPORT wxRadioButton: public wxControl
20{
5f199b71
VZ
21public:
22 // ctors and creation functions
6463b9f5 23 wxRadioButton() { Init(); }
5f199b71
VZ
24
25 wxRadioButton(wxWindow *parent,
26 wxWindowID id,
27 const wxString& label,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = 0,
31 const wxValidator& validator = wxDefaultValidator,
6463b9f5
JS
32 const wxString& name = wxRadioButtonNameStr)
33 {
34 Init();
35
36 Create(parent, id, label, pos, size, style, validator, name);
37 }
5f199b71
VZ
38
39 bool Create(wxWindow *parent,
40 wxWindowID id,
41 const wxString& label,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize,
44 long style = 0,
45 const wxValidator& validator = wxDefaultValidator,
46 const wxString& name = wxRadioButtonNameStr);
47
48 // implement the radio button interface
49 virtual void SetValue(bool value);
50 virtual bool GetValue() const;
51
52 // implementation only from now on
53 virtual bool MSWCommand(WXUINT param, WXWORD id);
54 virtual void Command(wxCommandEvent& event);
c3732409 55 virtual bool HasTransparentBackground() { return true; }
5f199b71
VZ
56
57protected:
58 virtual wxSize DoGetBestSize() const;
59
60private:
61 // common part of all ctors
62 void Init();
63
f607434a
VZ
64 // we need to store the state internally as the result of GetValue()
65 // sometimes gets out of sync in WM_COMMAND handler
66 bool m_isChecked;
5f199b71 67
fc7a2a60 68 DECLARE_DYNAMIC_CLASS_NO_COPY(wxRadioButton)
2bda0e17
KB
69};
70
2bda0e17 71#endif
bbcdf8bc 72 // _WX_RADIOBUT_H_