X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c6afdbf4ca53111339a65994bedc29da138b2f4..ee00931326788270a5ec1bd4aa31b19b49b386ed:/samples/treectrl/treetest.h diff --git a/samples/treectrl/treetest.h b/samples/treectrl/treetest.h index 5b93a81132..90bbebb0da 100644 --- a/samples/treectrl/treetest.h +++ b/samples/treectrl/treetest.h @@ -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 @@ -218,6 +228,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 +268,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 +342,7 @@ enum TreeTest_ToggleSel, TreeTest_CollapseAndReset, TreeTest_EnsureVisible, + TreeTest_SetFocus, TreeTest_AddItem, TreeTest_InsertItem, TreeTest_IncIndent, @@ -347,5 +361,6 @@ enum TreeTest_ShowParent, TreeTest_ShowPrevSibling, TreeTest_ShowNextSibling, + TreeTest_ScrollTo, TreeTest_Ctrl = 1000 };