X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/484523cf522b02385cd47c432d50d117940b46b9..10769d8c47c21fe0ec5034726791a5ad4cf19475:/include/wx/msw/treectrl.h diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 78c77e0714..dd1deab918 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -20,6 +20,8 @@ #pragma interface "treectrl.h" #endif +#if wxUSE_TREECTRL + #include "wx/textctrl.h" #include "wx/dynarray.h" #include "wx/treebase.h" @@ -120,6 +122,8 @@ public: void SetImageList(wxImageList *imageList); void SetStateImageList(wxImageList *imageList); + void AssignImageList(wxImageList *imageList); + void AssignStateImageList(wxImageList *imageList); // Functions to work with tree ctrl items. Unfortunately, they can _not_ be // member functions of wxTreeItem because they must know the tree the item @@ -396,9 +400,13 @@ protected: // SetImageList helper void SetAnyImageList(wxImageList *imageList, int which); + // refresh a single item + void RefreshItem(const wxTreeItemId& item); + wxTextCtrl *m_textCtrl; // used while editing the item label wxImageList *m_imageListNormal, // images for tree elements *m_imageListState; // special images for app defined states + bool m_ownsImageListNormal, m_ownsImageListState; private: // the common part of all ctors @@ -425,14 +433,13 @@ private: void DeleteTextCtrl(); - // support for additional item images - friend class wxTreeItemIndirectData; + // support for additional item images which we implement using + // wxTreeItemIndirectData technique - see the comments in msw/treectrl.cpp void SetIndirectItemData(const wxTreeItemId& item, - wxTreeItemIndirectData *data); + class wxTreeItemIndirectData *data); bool HasIndirectData(const wxTreeItemId& item) const; - - // the array storing all item ids which have indirect data - wxArrayTreeItemIds m_itemsWithIndirectData; + bool IsDataIndirect(wxTreeItemData *data) const + { return data && data->GetId().m_pItem == 0; } // the hash storing the items attributes (indexed by items ids) wxHashTable m_attrs; @@ -443,11 +450,19 @@ private: // used for dragging wxDragImage *m_dragImage; + // Virtual root item, if wxTR_HIDE_ROOT is set. + void* m_pVirtualRoot; + // the starting item for selection with Shift WXHTREEITEM m_htSelStart; + friend class wxTreeItemIndirectData; + friend class wxTreeSortHelper; + DECLARE_DYNAMIC_CLASS(wxTreeCtrl) }; +#endif // wxUSE_TREECTRL + #endif // _WX_TREECTRL_H_