X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4523ebb3f1c3576d687112d3a65141f7297ea02b..9dcf65d3c1a2dc99917f2fcd1743a0290e41a0d5:/include/wx/msw/treectrl.h diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 99906f62f7..905c330c7f 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 @@ -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 // -------------- @@ -224,6 +196,7 @@ public: virtual WXLRESULT MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); virtual bool MSWCommand(WXUINT param, WXWORD id); virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + virtual bool MSWShouldPreProcessMessage(WXMSG* msg); // override some base class virtuals virtual bool SetBackgroundColour(const wxColour &colour); @@ -257,7 +230,7 @@ protected: const wxString& text, int image = -1, int selImage = -1, wxTreeItemData *data = NULL); - virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags); + virtual wxTreeItemId DoTreeHitTest(const wxPoint& point, int& flags) const; // obtain the user data for the lParam member of TV_ITEM class wxTreeItemParam *GetItemParam(const wxTreeItemId& item) const; @@ -272,13 +245,18 @@ 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; @@ -304,5 +282,4 @@ private: #endif // wxUSE_TREECTRL -#endif - // _WX_TREECTRL_H_ +#endif // _WX_MSW_TREECTRL_H_