]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/listbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/listbox.h
3 // Purpose: wxListBox class
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_LISTBOX_H__
13 #define __WX_COCOA_LISTBOX_H__
15 //#include "wx/cocoa/NSTableView.h"
17 // ========================================================================
19 // ========================================================================
20 class WXDLLEXPORT wxListBox
: public wxListBoxBase
//, protected wxCocoaNSTableView
22 DECLARE_DYNAMIC_CLASS(wxListBox
)
24 WX_DECLARE_COCOA_OWNER(NSTableView
,NSControl
,NSView
)
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
30 wxListBox(wxWindow
*parent
, wxWindowID winid
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
,
33 int n
= 0, const wxString choices
[] = NULL
,
35 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
& name
= wxListBoxNameStr
)
38 Create(parent
, winid
, pos
, size
, n
, choices
, style
, validator
, name
);
41 bool Create(wxWindow
*parent
, wxWindowID winid
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
,
44 int n
= 0, const wxString choices
[] = NULL
,
46 const wxValidator
& validator
= wxDefaultValidator
,
47 const wxString
& name
= wxListBoxNameStr
);
50 // ------------------------------------------------------------------------
52 // ------------------------------------------------------------------------
54 // ------------------------------------------------------------------------
56 // ------------------------------------------------------------------------
58 // pure virtuals from wxListBoxBase
59 virtual bool IsSelected(int n
) const;
60 virtual void SetSelection(int n
, bool select
= TRUE
);
61 virtual int GetSelections(wxArrayInt
& aSelections
) const;
63 virtual void DoInsertItems(const wxArrayString
& items
, int pos
);
64 virtual void DoSetItems(const wxArrayString
& items
, void **clientData
);
65 virtual void DoSetFirstItem(int n
);
67 // pure virtuals from wxItemContainer
71 virtual void Delete(int n
);
73 virtual int GetCount() const;
74 virtual wxString
GetString(int n
) const;
75 virtual void SetString(int n
, const wxString
& s
);
76 virtual int FindString(const wxString
& s
) const;
78 virtual void Select(int n
);
79 virtual int GetSelection() const;
81 virtual int DoAppend(const wxString
& item
);
82 virtual void DoSetItemClientData(int n
, void* clientData
);
83 virtual void* DoGetItemClientData(int n
) const;
84 virtual void DoSetItemClientObject(int n
, wxClientData
* clientData
);
85 virtual wxClientData
* DoGetItemClientObject(int n
) const;
88 #endif // __WX_COCOA_LISTBOX_H__