+ // NOTE: These are a copy of the same methods in _treectrl.i, be sure to
+ // update both at the same time. (Or find a good way to refactor!)
+ %extend {
+ // Get the first child of this item. Returns a wxTreeItemId and an
+ // opaque "cookie" value that should be passed to GetNextChild in
+ // order to continue the search.
+ PyObject* GetFirstChild(const wxTreeItemId& item) {
+ void* cookie = 0;
+ wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie));
+ bool blocked = wxPyBeginBlockThreads();
+ PyObject* tup = PyTuple_New(2);
+ PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
+ PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
+ wxPyEndBlockThreads(blocked);
+ return tup;
+ }
+
+
+ // Get the next child of this item. The cookie parameter is the 2nd
+ // value returned from GetFirstChild or the previous GetNextChild.
+ // Returns a wxTreeItemId and an opaque "cookie" value that should be
+ // passed to GetNextChild in order to continue the search.
+ PyObject* GetNextChild(const wxTreeItemId& item, void* cookie) {
+ wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie));
+ bool blocked = wxPyBeginBlockThreads();
+ PyObject* tup = PyTuple_New(2);
+ PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
+ PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
+ wxPyEndBlockThreads(blocked);
+ return tup;
+ }
+
+
+ // TODO: GetPrevChild
+
+ }