]>
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"
17 // ========================================================================
19 // ========================================================================
20 class WXDLLEXPORT wxRadioBox
: public wxControl
, public wxRadioBoxBase
// , protected wxCocoaNSButton
22 DECLARE_DYNAMIC_CLASS(wxRadioBox
)
24 // WX_DECLARE_COCOA_OWNER(NSButton,NSControl,NSView)
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
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
,
36 long style
= 0, const wxValidator
& validator
= wxDefaultValidator
,
37 const wxString
& name
= wxRadioBoxNameStr
)
39 Create(parent
, winid
, title
, pos
, size
, n
, choices
, majorDim
, style
, validator
, name
);
41 wxRadioBox(wxWindow
*parent
, wxWindowID winid
,
42 const wxString
& title
,
45 const wxArrayString
& choices
,
47 long style
= 0, const wxValidator
& validator
= wxDefaultValidator
,
48 const wxString
& name
= wxRadioBoxNameStr
)
50 Create(parent
, winid
, title
, pos
, size
, choices
, majorDim
, style
, validator
, name
);
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
,
60 const wxValidator
& validator
= wxDefaultValidator
,
61 const wxString
& name
= wxRadioBoxNameStr
);
62 bool Create(wxWindow
*parent
, wxWindowID winid
,
63 const wxString
& title
,
66 const wxArrayString
& choices
,
69 const wxValidator
& validator
= wxDefaultValidator
,
70 const wxString
& name
= wxRadioBoxNameStr
);
71 virtual ~wxRadioBox();
74 virtual bool Enable(unsigned int n
, bool enable
= true);
75 virtual bool IsItemEnabled(unsigned int WXUNUSED(n
)) const
82 virtual bool Show(unsigned int n
, bool show
= true);
83 virtual bool IsItemShown(unsigned int WXUNUSED(n
)) const
89 // ------------------------------------------------------------------------
91 // ------------------------------------------------------------------------
93 // Static boxes cannot be enabled/disabled
94 virtual void CocoaSetEnabled(bool enable
) { }
95 // ------------------------------------------------------------------------
97 // ------------------------------------------------------------------------
101 virtual void SetSelection(int n
);
102 virtual int GetSelection() const;
104 virtual unsigned int GetCount() const;
105 virtual wxString
GetString(unsigned int n
) const;
106 virtual void SetString(unsigned int n
, const wxString
& label
);
107 // change the individual radio button state
109 virtual wxSize
DoGetBestSize() const;
112 #endif // __WX_COCOA_RADIOBOX_H__