]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_treectrl.i
SetDefaultXXX -> SetOwnXXX
[wxWidgets.git] / wxPython / src / _treectrl.i
index 4341ad5cf7b6bf2ca356d9c7d8d26210a92c8554..d1509302d9c115b19baf5351ca0a27e174afd681 100644 (file)
@@ -309,6 +309,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl);
 
 
  
+MustHaveApp(wxPyTreeCtrl);
+
 %name(TreeCtrl)class wxPyTreeCtrl : public wxControl {
 public:
     %pythonAppend wxPyTreeCtrl         "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)"
@@ -510,6 +512,7 @@ public:
                 wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
                 PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), True);
                 PyList_Append(rval, item);
+                Py_DECREF(item);
             }
             wxPyEndBlockThreads(blocked);
             return rval;
@@ -521,6 +524,8 @@ public:
     wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
 
 
+    // NOTE: These are a copy of the same methods in gizmos.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
@@ -707,6 +712,11 @@ value is set to a bitmask of wxTREE_HITTEST_xxx constants.
         }
     }
 
+#ifdef __WXMSW__
+    // set/get the item state.image (state == -1 means cycle to the next one)
+    void SetState(const wxTreeItemId& node, int state);
+    int GetState(const wxTreeItemId& node);
+#endif
 
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);