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:
Robin Dunn
2003-06-25 18:35:03 +00:00
parent e6874ccf25
commit f175a6e3dc
3 changed files with 62 additions and 19 deletions

View File

@@ -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;