1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/choice.h
3 // Purpose: wxChoice class
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_CHOICE_H__
13 #define __WX_COCOA_CHOICE_H__
15 //#include "wx/cocoa/NSPopUpButton.h"
16 #include "wx/cocoa/NSMenu.h"
18 // ========================================================================
20 // ========================================================================
21 class WXDLLEXPORT wxChoice
: public wxChoiceBase
/*, protected wxCocoaNSPopUpButton */, protected wxCocoaNSMenu
23 DECLARE_DYNAMIC_CLASS(wxChoice
)
25 // WX_DECLARE_COCOA_OWNER(NSTableView,NSControl,NSView)
26 // ------------------------------------------------------------------------
28 // ------------------------------------------------------------------------
30 wxChoice() { Init(); }
31 wxChoice(wxWindow
*parent
, wxWindowID winid
,
32 const wxPoint
& pos
= wxDefaultPosition
,
33 const wxSize
& size
= wxDefaultSize
,
34 int n
= 0, const wxString choices
[] = NULL
,
36 const wxValidator
& validator
= wxDefaultValidator
,
37 const wxString
& name
= wxChoiceNameStr
)
40 Create(parent
, winid
, pos
, size
, n
, choices
, style
, validator
, name
);
43 bool Create(wxWindow
*parent
, wxWindowID winid
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
,
46 int n
= 0, const wxString choices
[] = NULL
,
48 const wxValidator
& validator
= wxDefaultValidator
,
49 const wxString
& name
= wxChoiceNameStr
);
54 // ------------------------------------------------------------------------
56 // ------------------------------------------------------------------------
58 void CocoaNotification_menuDidSendAction(WX_NSNotification notification
);
59 // ------------------------------------------------------------------------
61 // ------------------------------------------------------------------------
64 virtual void Delete(int);
65 virtual int GetCount() const;
66 virtual wxString
GetString(int) const;
67 virtual void SetString(int, const wxString
&);
68 virtual int FindString(const wxString
&) const;
69 virtual int GetSelection() const;
70 virtual int DoAppend(const wxString
&);
71 virtual int DoInsert(const wxString
&, int);
72 virtual void DoSetItemClientData(int, void*);
73 virtual void* DoGetItemClientData(int) const;
74 virtual void DoSetItemClientObject(int, wxClientData
*);
75 virtual wxClientData
* DoGetItemClientObject(int) const;
76 virtual void SetSelection(int);
78 wxSortedArrayString
*m_sortedStrings
;
79 wxArrayPtrVoid m_itemsClientData
;
82 #endif // __WX_COCOA_CHOICE_H__