]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/radiobut.h
Added wxRadioButton::MSWWindowProc to reset m_focusJustSet -- otherwise,
[wxWidgets.git] / include / wx / mac / radiobut.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: radiobut.h
3 // Purpose: wxRadioButton class
4 // Author: AUTHOR
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
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 DECLARE_DYNAMIC_CLASS(wxRadioButton)
22 protected:
23 public:
24 inline wxRadioButton() {}
25 inline wxRadioButton(wxWindow *parent, wxWindowID id,
26 const wxString& label,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize, long style = 0,
29 const wxValidator& validator = wxDefaultValidator,
30 const wxString& name = wxRadioButtonNameStr)
31 {
32 Create(parent, id, label, pos, size, style, validator, name);
33 }
34
35 bool Create(wxWindow *parent, wxWindowID id,
36 const wxString& label,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize, long style = 0,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxRadioButtonNameStr);
41
42 virtual void SetValue(bool val);
43 virtual bool GetValue() const ;
44
45 // implementation
46
47 virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart );
48 void Command(wxCommandEvent& event);
49 wxRadioButton *AddInCycle(wxRadioButton *cycle);
50 inline wxRadioButton *NextInCycle() {return m_cycle;}
51
52 protected:
53
54 wxRadioButton *m_cycle;
55 };
56
57 // Not implemented
58 #if 0
59 class WXDLLEXPORT wxBitmap ;
60
61 WXDLLEXPORT_DATA(extern const char*) wxBitmapRadioButtonNameStr;
62
63 class WXDLLEXPORT wxBitmapRadioButton: public wxRadioButton
64 {
65 DECLARE_DYNAMIC_CLASS(wxBitmapRadioButton)
66 protected:
67 wxBitmap *theButtonBitmap;
68 public:
69 inline wxBitmapRadioButton() { theButtonBitmap = NULL; }
70 inline wxBitmapRadioButton(wxWindow *parent, wxWindowID id,
71 const wxBitmap *label,
72 const wxPoint& pos = wxDefaultPosition,
73 const wxSize& size = wxDefaultSize, long style = 0,
74 const wxValidator& validator = wxDefaultValidator,
75 const wxString& name = wxBitmapRadioButtonNameStr)
76 {
77 Create(parent, id, label, pos, size, style, validator, name);
78 }
79
80 bool Create(wxWindow *parent, wxWindowID id,
81 const wxBitmap *label,
82 const wxPoint& pos = wxDefaultPosition,
83 const wxSize& size = wxDefaultSize, long style = 0,
84 const wxValidator& validator = wxDefaultValidator,
85 const wxString& name = wxBitmapRadioButtonNameStr);
86
87 virtual void SetLabel(const wxBitmap *label);
88 virtual void SetValue(bool val) ;
89 virtual bool GetValue() const ;
90 };
91 #endif
92
93 #endif
94 // _WX_RADIOBUT_H_