X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c00fed0ef4d70c9b45d9b8405f636d30eadb7ea6..0b6cf205888513d5bffb2cd0c13fcde5cf313168:/include/wx/gtk/listbox.h diff --git a/include/wx/gtk/listbox.h b/include/wx/gtk/listbox.h index 7804a96625..92df4f2497 100644 --- a/include/wx/gtk/listbox.h +++ b/include/wx/gtk/listbox.h @@ -18,7 +18,10 @@ class WXDLLIMPEXP_CORE wxListBox : public wxListBoxBase { public: // ctors and such - wxListBox(); + wxListBox() + { + Init(); + } wxListBox( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, @@ -27,9 +30,7 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr ) { -#if wxUSE_CHECKLISTBOX - m_hasCheckBoxes = FALSE; -#endif // wxUSE_CHECKLISTBOX + Init(); Create(parent, id, pos, size, n, choices, style, validator, name); } wxListBox( wxWindow *parent, wxWindowID id, @@ -40,9 +41,7 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr ) { -#if wxUSE_CHECKLISTBOX - m_hasCheckBoxes = FALSE; -#endif // wxUSE_CHECKLISTBOX + Init(); Create(parent, id, pos, size, choices, style, validator, name); } virtual ~wxListBox(); @@ -66,7 +65,7 @@ public: virtual void Clear(); virtual void Delete(int n); - virtual int GetCount() const; + virtual size_t GetCount() const; virtual wxString GetString(int n) const; virtual void SetString(int n, const wxString& s); virtual int FindString(const wxString& s, bool bCase = false) const; @@ -99,8 +98,8 @@ public: bool m_spacePressed; struct _GtkTreeEntry* GtkGetEntry(int pos) const; - void GtkInsertItems(const wxArrayString& items, - void** clientData, int pos); + void GtkInsertItems(const wxArrayString& items, + void** clientData, size_t pos); void GtkSetSelection(int n, const bool select, const bool blockEvent); protected: @@ -119,6 +118,8 @@ protected: void DoApplyWidgetStyle(GtkRcStyle *style); private: + void Init(); //common construction + DECLARE_DYNAMIC_CLASS(wxListBox) };