]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/treectrl/treetest.h
Use template class instead of template function in wxVectorSort().
[wxWidgets.git] / samples / treectrl / treetest.h
index 5b93a8113290e4ce11591c1aabe579e4eae9214c..50db3d92e394e503a14fe18014ac5b4222d64420 100644 (file)
@@ -123,6 +123,13 @@ public:
     void SetAlternateStates(bool show) { m_alternateStates = show; }
     bool AlternateStates() const { return m_alternateStates; }
 
+    void ResetBrokenStateImages()
+    {
+        const size_t count = GetStateImageList()->GetImageCount();
+        int state = count > 0 ? count - 1 : wxTREE_ITEMSTATE_NONE;
+        DoResetBrokenStateImages(GetRootItem(), 0, state);
+    }
+
 protected:
     virtual int OnCompareItems(const wxTreeItemId& i1, const wxTreeItemId& i2);
 
@@ -139,6 +146,9 @@ private:
                              size_t depth,
                              size_t folder);
 
+    void DoResetBrokenStateImages(const wxTreeItemId& idParent,
+                                  wxTreeItemIdValue cookie, int state);
+
     void LogEvent(const wxChar *name, const wxTreeEvent& event);
 
     int          m_imageSize;               // current size of images
@@ -199,6 +209,7 @@ public:
     void OnSelect(wxCommandEvent& event);
     void OnUnselect(wxCommandEvent& event);
     void OnToggleSel(wxCommandEvent& event);
+    void OnSelectChildren(wxCommandEvent& event);
 #endif // NO_MULTIPLE_SELECTION
     void OnSelectRoot(wxCommandEvent& event);
     void OnDelete(wxCommandEvent& event);
@@ -218,6 +229,7 @@ public:
     void OnClearBold(wxCommandEvent& WXUNUSED(event)) { DoSetBold(false); }
 
     void OnEnsureVisible(wxCommandEvent& event);
+    void OnSetFocus(wxCommandEvent& event);
 
     void OnCount(wxCommandEvent& event);
     void OnCountRec(wxCommandEvent& event);
@@ -257,6 +269,8 @@ public:
     void OnShowNextSibling(wxCommandEvent& WXUNUSED(event))
         { DoShowRelativeItem(&wxTreeCtrl::GetNextSibling, "next sibling"); }
 
+    void OnScrollTo(wxCommandEvent& event);
+
     void OnIdle(wxIdleEvent& event);
     void OnSize(wxSizeEvent& event);
 
@@ -329,6 +343,7 @@ enum
     TreeTest_ToggleSel,
     TreeTest_CollapseAndReset,
     TreeTest_EnsureVisible,
+    TreeTest_SetFocus,
     TreeTest_AddItem,
     TreeTest_InsertItem,
     TreeTest_IncIndent,
@@ -340,6 +355,7 @@ enum
     TreeTest_Select,
     TreeTest_Unselect,
     TreeTest_SelectRoot,
+    TreeTest_SelectChildren,
     TreeTest_ShowFirstVisible,
     TreeTest_ShowLastVisible,
     TreeTest_ShowNextVisible,
@@ -347,5 +363,6 @@ enum
     TreeTest_ShowParent,
     TreeTest_ShowPrevSibling,
     TreeTest_ShowNextSibling,
+    TreeTest_ScrollTo,
     TreeTest_Ctrl = 1000
 };