]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_listbox.i
log wxChoice events in the same format as wxComboBox ones to make it simpler to compa...
[wxWidgets.git] / wxPython / src / _listbox.i
index 41fdd0eb02288351116d41d7515dc1ee5143aa7e..ef426b07a030d028d1b6e8fc6828172f7739741e 100644 (file)
@@ -37,7 +37,6 @@ 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,
@@ -47,7 +46,6 @@ public:
     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,
@@ -81,15 +79,15 @@ public:
     // 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; i<lst.GetCount(); i++) {
-              PyTuple_SetItem(tup, i, PyInt_FromLong(lst[i]));
-          }
-          return tup;
-      }
+        PyObject* GetSelections() {
+            wxArrayInt lst;
+            self->GetSelections(lst);
+            PyObject *tup = PyTuple_New(lst.GetCount());
+            for(size_t i=0; i<lst.GetCount(); i++) {
+                PyTuple_SetItem(tup, i, PyInt_FromLong(lst[i]));
+            }
+            return tup;
+        }
     }
 
     // set the specified item at the first visible item or scroll to max
@@ -108,6 +106,8 @@ public:
     // return True if this listbox is sorted
     bool IsSorted() const;
 
+    // return the index of the item at this position or wxNOT_FOUND
+    int HitTest(const wxPoint& pt) const;
 
     %extend {
         void SetItemForegroundColour(int item, const wxColour& c) {
@@ -151,7 +151,6 @@ public:
     wxCheckListBox(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,
@@ -161,7 +160,6 @@ public:
     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,
@@ -174,9 +172,6 @@ public:
     int GetItemHeight();
 #endif
 
-    // return the index of the item at this position or wxNOT_FOUND
-    int HitTest(const wxPoint& pt) const;
-    %Rename(HitTestXY, int, HitTest(wxCoord x, wxCoord y) const);
 };
 
 //---------------------------------------------------------------------------