X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d55734102e25f5d11bcb4bbac39083320afd3699..0e859e32234b3178254146f31653f478de0c5fba:/wxPython/src/_listbox.i diff --git a/wxPython/src/_listbox.i b/wxPython/src/_listbox.i index 2b3da1dc43..565dea0bd1 100644 --- a/wxPython/src/_listbox.i +++ b/wxPython/src/_listbox.i @@ -37,17 +37,15 @@ public: wxListBox(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - //int choices=0, wxString* choices_array = NULL, const wxArrayString& choices = wxPyEmptyStringArray, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyListBoxNameStr); - %name(PreListBox)wxListBox(); + %RenameCtor(PreListBox, wxListBox()); bool Create(wxWindow* parent, wxWindowID id=-1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - //int choices=0, wxString* choices_array = NULL, const wxArrayString& choices = wxPyEmptyStringArray, long style = 0, const wxValidator& validator = wxDefaultValidator, @@ -70,32 +68,32 @@ public: // multiple selection logic virtual bool IsSelected(int n) const; - virtual void SetSelection(int n, bool select = True); + virtual void SetSelection(int n, bool select = true); virtual void Select(int n); void Deselect(int n); void DeselectAll(int itemToLeaveSelected = -1); - virtual bool SetStringSelection(const wxString& s, bool select = True); + virtual bool SetStringSelection(const wxString& s, bool select = true); // works for single as well as multiple selection listboxes (unlike // GetSelection which only works for listboxes with single selection) //virtual int GetSelections(wxArrayInt& aSelections) const; %extend { - PyObject* GetSelections() { - wxArrayInt lst; - self->GetSelections(lst); - PyObject *tup = PyTuple_New(lst.GetCount()); - for(size_t i=0; iGetSelections(lst); + PyObject *tup = PyTuple_New(lst.GetCount()); + for(size_t i=0; i