X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5dbe15d0bacde245539f54c4d97af6b4696f01f..a99bcb5e5ed1ed59ea1975b6262aa602bd490539:/include/wx/treectrl.h diff --git a/include/wx/treectrl.h b/include/wx/treectrl.h index 8a4d940a1d..77a10793c7 100644 --- a/include/wx/treectrl.h +++ b/include/wx/treectrl.h @@ -30,7 +30,7 @@ class WXDLLIMPEXP_FWD_CORE wxImageList; // wxTreeCtrlBase // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxTreeCtrlBase : public wxControl +class WXDLLIMPEXP_CORE wxTreeCtrlBase : public wxControl { public: wxTreeCtrlBase() @@ -118,6 +118,12 @@ public: // get the item's font virtual wxFont GetItemFont(const wxTreeItemId& item) const = 0; + // get the items state + int GetItemState(const wxTreeItemId& item) const + { + return DoGetItemState(item); + } + // modifiers // --------- @@ -156,6 +162,9 @@ public: virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font) = 0; + // set the items state (special state values: wxTREE_ITEMSTATE_NONE/NEXT/PREV) + void SetItemState(const wxTreeItemId& item, int state); + // item status inquiries // --------------------- @@ -290,13 +299,13 @@ public: // expand this item virtual void Expand(const wxTreeItemId& item) = 0; - // expand the item and all its childs and thats childs + // expand the item and all its children recursively void ExpandAllChildren(const wxTreeItemId& item); // expand all items void ExpandAll(); // collapse the item without removing its children virtual void Collapse(const wxTreeItemId& item) = 0; - // collapse the item and all its childs and thats childs + // collapse the item and all its children void CollapseAllChildren(const wxTreeItemId& item); // collapse all items void CollapseAll(); @@ -387,6 +396,10 @@ public: protected: virtual wxSize DoGetBestSize() const; + // comon part of Get/SetItemState() + virtual int DoGetItemState(const wxTreeItemId& item) const = 0; + virtual void DoSetItemState(const wxTreeItemId& item, int state) = 0; + // common part of Append/Prepend/InsertItem() // // pos is the position at which to insert the item or (size_t)-1 to append @@ -435,7 +448,7 @@ protected: #if defined(__WXUNIVERSAL__) #include "wx/generic/treectlg.h" #elif defined(__WXPALMOS__) - #include "wx/palmos/treectrl.h" + #include "wx/generic/treectlg.h" #elif defined(__WXMSW__) #include "wx/msw/treectrl.h" #elif defined(__WXMOTIF__)