X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90c6edd706882b8fd06b6d5359d9682ac0ee858c..c282ec44024689f736f76772a3ffd1fccf4b7d07:/include/wx/msw/treectrl.h diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 5729f58904..cfb43004a0 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -9,8 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_TREECTRL_H_ -#define _WX_TREECTRL_H_ +#ifndef _WX_MSW_TREECTRL_H_ +#define _WX_MSW_TREECTRL_H_ // ---------------------------------------------------------------------------- // headers @@ -32,7 +32,7 @@ // fwd decl class WXDLLEXPORT wxImageList; class WXDLLEXPORT wxDragImage; -struct WXDLLEXPORT wxTreeViewItem; +struct WXDLLIMPEXP_FWD_CORE wxTreeViewItem; #if WXWIN_COMPATIBILITY_2_6 // NB: all the following flags are for compatbility only and will be removed in the @@ -180,34 +180,6 @@ public: wxRect& rect, bool textOnly = false) const; - // deprecated - // ---------- - -#if WXWIN_COMPATIBILITY_2_4 - // these methods are deprecated and will be removed in future versions of - // wxWidgets, they're here for compatibility only, don't use them in new - // code (the comments indicate why these methods are now useless and how to - // replace them) - - // use Expand, Collapse, CollapseAndReset or Toggle - wxDEPRECATED( void ExpandItem(const wxTreeItemId& item, int action) ); - - // use Set/GetImageList and Set/GetStateImageList - // Use base class GetImageList() - wxDEPRECATED( void SetImageList(wxImageList *imageList, int) ); - - // use Set/GetItemImage directly - wxDEPRECATED( int GetItemSelectedImage(const wxTreeItemId& item) const ); - wxDEPRECATED( void SetItemSelectedImage(const wxTreeItemId& item, int image) ); - - // use the versions taking wxTreeItemIdValue cookies - wxDEPRECATED( wxTreeItemId GetFirstChild(const wxTreeItemId& item, - long& cookie) const ); - wxDEPRECATED( wxTreeItemId GetNextChild(const wxTreeItemId& item, - long& cookie) const ); -#endif // WXWIN_COMPATIBILITY_2_4 - - // implementation // -------------- @@ -238,6 +210,9 @@ public: void SetState(const wxTreeItemId& node, int state); int GetState(const wxTreeItemId& node); + // returns true if the platform should explicitly apply a theme border + virtual bool CanApplyThemeBorder() const { return false; } + protected: // SetImageList helper void SetAnyImageList(wxImageList *imageList, int which); @@ -273,21 +248,28 @@ private: void Init(); // helper functions - inline bool DoGetItem(wxTreeViewItem *tvItem) const; - inline void DoSetItem(wxTreeViewItem *tvItem); + bool DoGetItem(wxTreeViewItem *tvItem) const; + void DoSetItem(wxTreeViewItem *tvItem); - inline void DoExpand(const wxTreeItemId& item, int flag); + void DoExpand(const wxTreeItemId& item, int flag); void DeleteTextCtrl(); + // return true if the item is the hidden root one (i.e. it's the root item + // and the tree has wxTR_HIDE_ROOT style) + bool IsHiddenRoot(const wxTreeItemId& item) const; + + // the hash storing the items attributes (indexed by item ids) wxMapTreeAttr m_attrs; // true if the hash above is not empty bool m_hasAnyAttr; +#if wxUSE_DRAGIMAGE // used for dragging wxDragImage *m_dragImage; +#endif // Virtual root item, if wxTR_HIDE_ROOT is set. void* m_pVirtualRoot; @@ -305,5 +287,4 @@ private: #endif // wxUSE_TREECTRL -#endif - // _WX_TREECTRL_H_ +#endif // _WX_MSW_TREECTRL_H_