X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b4a9377b0af45636390cf201fa4efbb3046e143..1338c59a025505bc066be220fe56e898a72b3ad3:/include/wx/msw/treectrl.h diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index a923425377..2d2e4ff563 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -5,8 +5,8 @@ // Modified by: Vadim Zeitlin to be less MSW-specific on 10/10/98 // Created: 01/02/97 // RCS-ID: $Id$ -// Copyright: (c) Julian Smart and Markus Holzem -// Licence: wxWindows license +// Copyright: (c) Julian Smart +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_TREECTRL_H_ @@ -76,7 +76,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "wxTreeCtrl") + const wxString& name = wxTreeCtrlNameStr) { Create(parent, id, pos, size, style, validator, name); } @@ -88,7 +88,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT, const wxValidator& validator = wxDefaultValidator, - const wxString& name = "wxTreeCtrl"); + const wxString& name = wxTreeCtrlNameStr); // accessors // --------- @@ -141,6 +141,15 @@ public: // get the data associated with the item wxTreeItemData *GetItemData(const wxTreeItemId& item) const; + // get the item's text colour + wxColour GetItemTextColour(const wxTreeItemId& item) const; + + // get the item's background colour + wxColour GetItemBackgroundColour(const wxTreeItemId& item) const; + + // get the item's font + wxFont GetItemFont(const wxTreeItemId& item) const; + // modifiers // --------- @@ -213,7 +222,16 @@ public: size_t GetSelections(wxArrayTreeItemIds& selections) const; // get the parent of this item (may return NULL if root) - wxTreeItemId GetParent(const wxTreeItemId& item) const; + wxTreeItemId GetItemParent(const wxTreeItemId& item) const; + +#if WXWIN_COMPATIBILITY_2_2 + // deprecated: Use GetItemParent instead. + wxTreeItemId GetParent(const wxTreeItemId& item) const + { return GetItemParent( item ); } + + // Expose the base class method hidden by the one above. + wxWindow *GetParent() const { return wxControl::GetParent(); } +#endif // WXWIN_COMPATIBILITY_2_2 // for this enumeration function you must pass in a "cookie" parameter // which is opaque for the application but is necessary for the library @@ -450,6 +468,9 @@ 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; @@ -457,6 +478,7 @@ private: friend class wxTreeSortHelper; DECLARE_DYNAMIC_CLASS(wxTreeCtrl) + DECLARE_NO_COPY_CLASS(wxTreeCtrl) }; #endif // wxUSE_TREECTRL