wxTreeListCtrl updates: fixed wrapping of GetSelections and made
keyboard navigation work like MSW's native tree when on MSW. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@21403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -719,7 +719,24 @@ public:
|
||||
wxTreeItemId GetSelection() const;
|
||||
|
||||
// get the items currently selected, return the number of such item
|
||||
size_t GetSelections(wxArrayTreeItemIds&) const;
|
||||
//size_t GetSelections(wxArrayTreeItemIds&) const;
|
||||
%addmethods {
|
||||
PyObject* GetSelections() {
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* rval = PyList_New(0);
|
||||
wxArrayTreeItemIds array;
|
||||
size_t num, x;
|
||||
num = self->GetSelections(array);
|
||||
for (x=0; x < num; x++) {
|
||||
wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
|
||||
PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), TRUE);
|
||||
PyList_Append(rval, item);
|
||||
}
|
||||
wxPyEndBlockThreads();
|
||||
return rval;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// get the parent of this item (may return NULL if root)
|
||||
%name(GetItemParent)wxTreeItemId GetParent(const wxTreeItemId& item) const;
|
||||
|
Reference in New Issue
Block a user