// 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()
- {
+ %extend {
+ PyObject* GetSelections() {
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
wxArrayInt lst;
self->GetSelections(lst);
PyObject *tup = PyTuple_New(lst.GetCount());
{
PyTuple_SetItem(tup, i, PyInt_FromLong(lst[i]));
}
+ wxPyEndBlockThreads(blocked);
return tup;
}
}
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+ %property(Selections, GetSelections, doc="See `GetSelections`");
};
#if defined(__WXMSW__) || defined(__WXGTK__)
int GetItemHeight();
+#else
+ %pythoncode {
+ def GetItemHeight(self):
+ raise NotImplementedError
+ }
#endif
+
+ %property(ItemHeight, GetItemHeight, doc="See `GetItemHeight`");
};
//---------------------------------------------------------------------------