]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/radiobox.h
Fix for link error
[wxWidgets.git] / include / wx / cocoa / radiobox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/radiobox.h
3 // Purpose: wxRadioBox class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/03/18
7 // RCS-ID: $Id:
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __WX_COCOA_RADIOBOX_H__
13 #define __WX_COCOA_RADIOBOX_H__
14
15 // #include "wx/cocoa/NSButton.h"
16
17 // ========================================================================
18 // wxRadioBox
19 // ========================================================================
20 class WXDLLEXPORT wxRadioBox: public wxControl, public wxRadioBoxBase// , protected wxCocoaNSButton
21 {
22 DECLARE_DYNAMIC_CLASS(wxRadioBox)
23 DECLARE_EVENT_TABLE()
24 // WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView)
25 // ------------------------------------------------------------------------
26 // initialization
27 // ------------------------------------------------------------------------
28 public:
29 wxRadioBox() { }
30 wxRadioBox(wxWindow *parent, wxWindowID winid,
31 const wxString& title,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 int n = 0, const wxString choices[] = NULL,
35 int majorDim = 0,
36 long style = 0, const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxRadioBoxNameStr)
38 {
39 Create(parent, winid, title, pos, size, n, choices, majorDim, style, validator, name);
40 }
41 wxRadioBox(wxWindow *parent, wxWindowID winid,
42 const wxString& title,
43 const wxPoint& pos,
44 const wxSize& size,
45 const wxArrayString& choices,
46 int majorDim = 0,
47 long style = 0, const wxValidator& validator = wxDefaultValidator,
48 const wxString& name = wxRadioBoxNameStr)
49 {
50 Create(parent, winid, title, pos, size, choices, majorDim, style, validator, name);
51 }
52
53 bool Create(wxWindow *parent, wxWindowID winid,
54 const wxString& title,
55 const wxPoint& pos = wxDefaultPosition,
56 const wxSize& size = wxDefaultSize,
57 int n = 0, const wxString choices[] = NULL,
58 int majorDim = 0,
59 long style = 0,
60 const wxValidator& validator = wxDefaultValidator,
61 const wxString& name = wxRadioBoxNameStr);
62 bool Create(wxWindow *parent, wxWindowID winid,
63 const wxString& title,
64 const wxPoint& pos,
65 const wxSize& size,
66 const wxArrayString& choices,
67 int majorDim = 0,
68 long style = 0,
69 const wxValidator& validator = wxDefaultValidator,
70 const wxString& name = wxRadioBoxNameStr);
71 virtual ~wxRadioBox();
72
73 // ------------------------------------------------------------------------
74 // Cocoa callbacks
75 // ------------------------------------------------------------------------
76 protected:
77 // Static boxes cannot be enabled/disabled
78 virtual void CocoaSetEnabled(bool enable) { }
79 // ------------------------------------------------------------------------
80 // Implementation
81 // ------------------------------------------------------------------------
82 public:
83 // Pure virtuals
84 // selection
85 virtual void SetSelection(int n);
86 virtual int GetSelection() const;
87 // string access
88 virtual int GetCount() const;
89 virtual wxString GetString(int n) const;
90 virtual void SetString(int n, const wxString& label);
91 // change the individual radio button state
92 virtual bool Enable(int n, bool enable = true);
93 virtual bool Show(int n, bool show = true);
94 // layout parameters
95 virtual int GetColumnCount() const;
96 virtual int GetRowCount() const;
97 protected:
98 virtual wxSize DoGetBestSize() const;
99 };
100
101 #endif // __WX_COCOA_RADIOBOX_H__