]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/radiobut.h
only call GSocket_Init() when needed and do call it before using GAddress_XXX
[wxWidgets.git] / include / wx / msw / radiobut.h
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$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_RADIOBUT_H_
13 #define _WX_RADIOBUT_H_
14
15 #ifdef __GNUG__
16 #pragma interface "radiobut.h"
17 #endif
18
19 class WXDLLEXPORT wxRadioButton: public wxControl
20 {
21 public:
22 // ctors and creation functions
23 wxRadioButton() { Init(); }
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,
32 const wxString& name = wxRadioButtonNameStr)
33 {
34 Init();
35
36 Create(parent, id, label, pos, size, style, validator, name);
37 }
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);
55
56 virtual void SetFocus();
57
58 protected:
59 virtual wxSize DoGetBestSize() const;
60
61 private:
62 // common part of all ctors
63 void Init();
64
65 // see the comments in SetFocus()
66 bool m_focusJustSet;
67
68 DECLARE_DYNAMIC_CLASS(wxRadioButton)
69 };
70
71 #endif
72 // _WX_RADIOBUT_H_