X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/994453b843b007de6367fedbf4a49ac9d920c63c..e86fbab1bade4c76243ab6552d0823989295cad5:/wxPython/src/_treectrl.i diff --git a/wxPython/src/_treectrl.i b/wxPython/src/_treectrl.i index e87e7ba7b3..d992e451b6 100644 --- a/wxPython/src/_treectrl.i +++ b/wxPython/src/_treectrl.i @@ -132,7 +132,7 @@ public: const wxTreeItemId& GetId(); void SetId(const wxTreeItemId& id); - %pythonAppend Destroy "args[0].thisown = 0" + %pythonPrepend Destroy "args[0].this.own(False)" %extend { void Destroy() { delete self; } } %property(Data, GetData, SetData, doc="See `GetData` and `SetData`"); @@ -344,7 +344,7 @@ MustHaveApp(wxPyTreeCtrl); %rename(TreeCtrl) wxPyTreeCtrl; class wxPyTreeCtrl : public wxControl { public: - %pythonAppend wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)" + %pythonAppend wxPyTreeCtrl "self._setOORInfo(self);" setCallbackInfo(TreeCtrl) %pythonAppend wxPyTreeCtrl() "" %typemap(out) wxPyTreeCtrl*; // turn off this typemap @@ -516,6 +516,9 @@ public: // is item text in bold font? bool IsBold(const wxTreeItemId& item) const; + // is the control empty? + bool IsEmpty() const; + // if 'recursively' is False, only immediate children count, otherwise // the returned number is the number of all items in this branch @@ -673,6 +676,12 @@ public: // collapse the item without removing its children void Collapse(const wxTreeItemId& item); + // collapse the item and all its childs and thats childs + void CollapseAllChildren(const wxTreeItemId& item); + + // collapse all items + void CollapseAll(); + // collapse the item and remove all children void CollapseAndReset(const wxTreeItemId& item);