X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c2a39bec10bb23d8c4cdf6c15e391ebc0096e1d..c670c85582ca995105f14a6c62b54c580582f624:/include/wx/msw/treectrl.h diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 8574600564..0afc4f5c5d 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -34,13 +34,14 @@ class WXDLLEXPORT wxImageList; class WXDLLEXPORT wxDragImage; struct WXDLLEXPORT wxTreeViewItem; -// NB: all the following flags are for compatbility only and will be removed in the -// next versions - -// flags for deprecated InsertItem() variant (their values are the same as of -// TVI_FIRST and TVI_LAST) -#define wxTREE_INSERT_FIRST 0xFFFF0001 -#define wxTREE_INSERT_LAST 0xFFFF0002 +#if WXWIN_COMPATIBILITY_2_6 + // NB: all the following flags are for compatbility only and will be removed in the + // next versions + // flags for deprecated InsertItem() variant (their values are the same as of + // TVI_FIRST and TVI_LAST) + #define wxTREE_INSERT_FIRST 0xFFFF0001 + #define wxTREE_INSERT_LAST 0xFFFF0002 +#endif // hash storing attributes for our items WX_DECLARE_EXPORTED_VOIDPTR_HASH_MAP(wxTreeItemAttr *, wxMapTreeAttr); @@ -78,7 +79,7 @@ public: // implement base class pure virtuals // ---------------------------------- - virtual size_t GetCount() const; + virtual unsigned int GetCount() const; virtual unsigned int GetIndent() const; virtual void SetIndent(unsigned int indent); @@ -192,10 +193,10 @@ public: wxDEPRECATED( void ExpandItem(const wxTreeItemId& item, int action) ); // use Set/GetImageList and Set/GetStateImageList - wxDEPRECATED( wxImageList *GetImageList(int) const ); + // Use base class GetImageList() wxDEPRECATED( void SetImageList(wxImageList *imageList, int) ); - // use Set/GetItemImage directly + // use Set/GetItemImage directly wxDEPRECATED( int GetItemSelectedImage(const wxTreeItemId& item) const ); wxDEPRECATED( void SetItemSelectedImage(const wxTreeItemId& item, int image) ); @@ -251,21 +252,6 @@ protected: wxTextCtrl *m_textCtrl; // text control in which it is edited wxTreeItemId m_idEdited; // the item being edited - 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 - void Init(); - - // helper functions - inline bool DoGetItem(wxTreeViewItem *tvItem) const; - inline void DoSetItem(wxTreeViewItem *tvItem); - - inline void DoExpand(const wxTreeItemId& item, int flag); - virtual wxTreeItemId DoInsertItem(const wxTreeItemId& parent, size_t pos, const wxString& text, @@ -276,7 +262,17 @@ private: const wxString& text, int image = -1, int selImage = -1, wxTreeItemData *data = NULL); - virtual wxTreeItemId DoHitTest(const wxPoint& point, int& flags); + virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags); + +private: + // the common part of all ctors + void Init(); + + // helper functions + inline bool DoGetItem(wxTreeViewItem *tvItem) const; + inline void DoSetItem(wxTreeViewItem *tvItem); + + inline void DoExpand(const wxTreeItemId& item, int flag); int DoGetItemImageFromData(const wxTreeItemId& item, wxTreeItemIcon which) const;