]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/controls2.i
Some tweaks and updates
[wxWidgets.git] / utils / wxPython / src / controls2.i
index 3b4527f54c8e6ffa363de86e5085e317cc68b198..fe0f0a62927b1d2d915f980ae09cfbbcc3a0c3f3 100644 (file)
@@ -143,6 +143,8 @@ public:
     wxTextCtrl* EditLabel(long item);
     bool EndEditLabel(bool cancel);
     wxTextCtrl* GetEditControl();
+#else
+    void EditLabel(long item);
 #endif
     bool EnsureVisible(long item);
     long FindItem(long start, const wxString& str, bool partial = FALSE);
@@ -245,13 +247,9 @@ public:
     }
 
     ~wxPyTreeItemData() {
-#ifdef WXP_WITH_THREAD
-        PyEval_RestoreThread(wxPyEventThreadState);
-#endif
+        bool doSave = wxPyRestoreThread();
        Py_DECREF(m_obj);
-#ifdef WXP_WITH_THREAD
-        PyEval_SaveThread();
-#endif
+        wxPySaveThread(doSave);
     }
 
     PyObject* GetData() {
@@ -284,13 +282,13 @@ public:
 
 
 
-class wxTreeEvent : public wxCommandEvent {
+class wxTreeEvent : public wxNotifyEvent {
 public:
     wxTreeItemId GetItem();
     wxTreeItemId GetOldItem();
     wxPoint GetPoint();
     int GetCode();
-    void Veto();
+    const wxString& GetLabel();
 };
 
 
@@ -412,15 +410,17 @@ public:
     void Toggle(const wxTreeItemId& item);
 
     void Unselect();
+    void UnselectAll();
     void SelectItem(const wxTreeItemId& item);
     void EnsureVisible(const wxTreeItemId& item);
     void ScrollTo(const wxTreeItemId& item);
-
+#ifdef __WXMSW__
     wxTextCtrl* EditLabel(const wxTreeItemId& item);
-                          // **** figure out how to do this
-                          // wxClassInfo* textCtrlClass = CLASSINFO(wxTextCtrl));
     wxTextCtrl* GetEditControl();
     void EndEditLabel(const wxTreeItemId& item, bool discardChanges = FALSE);
+#else
+    void EditLabel(const wxTreeItemId& item);
+#endif
 
 //    void SortChildren(const wxTreeItemId& item);
                       // **** And this too