// 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
// 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) {
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);
};
//---------------------------------------------------------------------------