]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/radiobox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/radiobox.h
3 // Purpose: wxRadioBox class
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_RADIOBOX_H__
13 #define __WX_COCOA_RADIOBOX_H__
15 // #include "wx/cocoa/NSButton.h"
16 DECLARE_WXCOCOA_OBJC_CLASS(NSMatrix
);
18 // ========================================================================
20 // ========================================================================
21 class WXDLLEXPORT wxRadioBox
: public wxControl
, public wxRadioBoxBase
// , protected wxCocoaNSButton
23 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
25 WX_DECLARE_COCOA_OWNER(NSBox
,NSView
,NSView
)
26 // ------------------------------------------------------------------------
28 // ------------------------------------------------------------------------
31 wxRadioBox(wxWindow
*parent
, wxWindowID winid
,
32 const wxString
& title
,
33 const wxPoint
& pos
= wxDefaultPosition
,
34 const wxSize
& size
= wxDefaultSize
,
35 int n
= 0, const wxString choices
[] = NULL
,
37 long style
= 0, const wxValidator
& validator
= wxDefaultValidator
,
38 const wxString
& name
= wxRadioBoxNameStr
)
40 Create(parent
, winid
, title
, pos
, size
, n
, choices
, majorDim
, style
, validator
, name
);
42 wxRadioBox(wxWindow
*parent
, wxWindowID winid
,
43 const wxString
& title
,
46 const wxArrayString
& choices
,
48 long style
= 0, const wxValidator
& validator
= wxDefaultValidator
,
49 const wxString
& name
= wxRadioBoxNameStr
)
51 Create(parent
, winid
, title
, pos
, size
, choices
, majorDim
, style
, validator
, name
);
54 bool Create(wxWindow
*parent
, wxWindowID winid
,
55 const wxString
& title
,
56 const wxPoint
& pos
= wxDefaultPosition
,
57 const wxSize
& size
= wxDefaultSize
,
58 int n
= 0, const wxString choices
[] = NULL
,
61 const wxValidator
& validator
= wxDefaultValidator
,
62 const wxString
& name
= wxRadioBoxNameStr
);
63 bool Create(wxWindow
*parent
, wxWindowID winid
,
64 const wxString
& title
,
67 const wxArrayString
& choices
,
70 const wxValidator
& validator
= wxDefaultValidator
,
71 const wxString
& name
= wxRadioBoxNameStr
);
72 virtual ~wxRadioBox();
75 virtual bool Enable(unsigned int n
, bool enable
= true);
76 virtual bool IsItemEnabled(unsigned int WXUNUSED(n
)) const
83 virtual bool Show(unsigned int n
, bool show
= true);
84 virtual bool IsItemShown(unsigned int WXUNUSED(n
)) const
90 // ------------------------------------------------------------------------
92 // ------------------------------------------------------------------------
94 // Static boxes cannot be enabled/disabled
95 virtual void CocoaSetEnabled(bool enable
) { }
96 // ------------------------------------------------------------------------
98 // ------------------------------------------------------------------------
102 virtual void SetSelection(int n
);
103 virtual int GetSelection() const;
105 virtual unsigned int GetCount() const;
106 virtual wxString
GetString(unsigned int n
) const;
107 virtual void SetString(unsigned int n
, const wxString
& label
);
108 // change the individual radio button state
110 WX_NSMatrix
GetNSMatrix() const;
111 virtual wxSize
DoGetBestSize() const;
114 #endif // __WX_COCOA_RADIOBOX_H__