#pragma interface "listbox.h"
#endif
-#include "wx/control.h"
+#include "wx/ctrlsub.h"
WXDLLEXPORT_DATA(extern const char*) wxListBoxNameStr;
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
// List box item
-class WXDLLEXPORT wxListBox: public wxControl
+class WXDLLEXPORT wxListBox: public wxControlWithItems
{
DECLARE_DYNAMIC_CLASS(wxListBox)
~wxListBox();
+ // Virtual functions required by wxControlWithItems.
+ // They are not all implemented yet :-(
+ virtual int GetCount() const;
+ virtual int DoAppend(const wxString& item);
+ virtual void DoInsertItems(const wxArrayString& items, int pos);
+ virtual void DoSetItems(const wxArrayString& items, void **clientData);
+ virtual void DoSetFirstItem(int n);
+ virtual void DoSetItemClientData(int n, void* clientData);
+ virtual void* DoGetItemClientData(int n) const;
+ virtual void DoSetItemClientObject(int n, wxClientData* clientData);
+ virtual wxClientData* DoGetItemClientObject(int n) const;
+ virtual void Select(int n);
+
virtual void Append(const wxString& item);
- virtual void Append(const wxString& item, char *clientData);
- virtual void Set(int n, const wxString* choices, char **clientData = NULL);
+ virtual void Append(const wxString& item, void *clientData);
+ virtual void Set(int n, const wxString* choices, void **clientData = NULL);
virtual int FindString(const wxString& s) const ;
virtual void Clear();
virtual void SetSelection(int n, bool select = TRUE);
// For single choice list item only
virtual int GetSelection() const ;
virtual void Delete(int n);
- virtual char *GetClientData(int n) const ;
+ virtual void *GetClientData(int n) const ;
virtual void *GetClientData() { return wxWindow::GetClientData(); }
- virtual void SetClientData(int n, char *clientData);
+ virtual void SetClientData(int n, void *clientData);
virtual void SetClientData( void *data ) { wxWindow::SetClientData(data); }
virtual void SetString(int n, const wxString& s);