X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa8166dd51a1ee24437798653580223945c8f0df..da8b1d4b3b535aba94d04494f5b6e2b3e47901ee:/include/wx/msw/treectrl.h?ds=sidebyside diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 99b1a61a9e..e2b76ae601 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -127,6 +127,7 @@ public: virtual wxTreeItemId GetRootItem() const; virtual wxTreeItemId GetSelection() const; virtual size_t GetSelections(wxArrayTreeItemIds& selections) const; + virtual wxTreeItemId GetFocusedItem() const; virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const; virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item, @@ -270,6 +271,10 @@ private: void DoExpand(const wxTreeItemId& item, int flag); + void DoSelectItem(const wxTreeItemId& item, bool select = true); + void DoUnselectItem(const wxTreeItemId& item); + void DoToggleItemSelection(const wxTreeItemId& item); + void DoUnselectAll(); void DeleteTextCtrl(); @@ -278,6 +283,9 @@ private: // and the tree has wxTR_HIDE_ROOT style) bool IsHiddenRoot(const wxTreeItemId& item) const; + // clears/sets the currently focused item + void ClearFocusedItem(); + void SetFocusedItem(const wxTreeItemId& item); // the hash storing the items attributes (indexed by item ids) wxMapTreeAttr m_attrs; @@ -303,9 +311,16 @@ private: // whether focus was lost between subsequent clicks of a single item bool m_focusLost; + // set when we are changing selection ourselves (only used in multi + // selection mode) + bool m_changingSelection; + // whether we need to trigger a state image click event bool m_triggerStateImageClick; + // whether we need to deselect other items on mouse up + bool m_mouseUpDeselect; + friend class wxTreeItemIndirectData; friend class wxTreeSortHelper;