X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/53a2db124c633f80bdb16336084262037d879a2c..644b283d6aa7740c0f4478945ca423279fe6d2da:/include/wx/treectrl.h diff --git a/include/wx/treectrl.h b/include/wx/treectrl.h index bdcc2b3201..ee13f4f4a4 100644 --- a/include/wx/treectrl.h +++ b/include/wx/treectrl.h @@ -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 // --------------------- @@ -201,6 +210,10 @@ public: // control with a lot of items (~ O(number of items)). virtual size_t GetSelections(wxArrayTreeItemIds& selections) const = 0; + // get the last item to be clicked when the control has wxTR_MULTIPLE + // equivalent to GetSelection() if not wxTR_MULTIPLE + virtual wxTreeItemId GetFocusedItem() const = 0; + // get the parent of this item (may return NULL if root) virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const = 0; @@ -387,6 +400,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 @@ -425,7 +442,7 @@ protected: bool m_quickBestSize; - DECLARE_NO_COPY_CLASS(wxTreeCtrlBase) + wxDECLARE_NO_COPY_CLASS(wxTreeCtrlBase); }; // ----------------------------------------------------------------------------