X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/696e1ea0b7cee1394693a0e507bbf49c9863952b..8cb9f0d0f82650b707adc39823a73531d080ffec:/include/wx/msw/treectrl.h?ds=sidebyside diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 32c41d8554..91d4eea2ab 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.h +// Name: wx/msw/treectrl.h // Purpose: wxTreeCtrl class // Author: Julian Smart // Modified by: Vadim Zeitlin to be less MSW-specific on 10/10/98 @@ -34,6 +34,7 @@ typedef long wxDataType; // fwd decl class WXDLLEXPORT wxImageList; +class WXDLLEXPORT wxDragImage; struct WXDLLEXPORT wxTreeViewItem; // a callback function used for sorting tree items, it should return -1 if the @@ -319,6 +320,13 @@ public: int image = -1, int selectedImage = -1, wxTreeItemData *data = NULL); + // insert a new item before the one with the given index + wxTreeItemId InsertItem(const wxTreeItemId& parent, + size_t index, + const wxString& text, + int image = -1, int selectedImage = -1, + wxTreeItemData *data = NULL); + // insert a new item in as the last child of the parent wxTreeItemId AppendItem(const wxTreeItemId& parent, const wxString& text, @@ -432,9 +440,15 @@ public: // implementation // -------------- + + virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); virtual bool MSWCommand(WXUINT param, WXWORD id); virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); + // override some base class virtuals + virtual bool SetBackgroundColour(const wxColour &colour); + virtual bool SetForegroundColour(const wxColour &colour); + // get/set the check state for the item (only for wxTR_MULTIPLE) bool IsItemChecked(const wxTreeItemId& item) const; void SetItemCheck(const wxTreeItemId& item, bool check = TRUE); @@ -487,6 +501,12 @@ private: // TRUE if the hash above is not empty bool m_hasAnyAttr; + // used for dragging + wxDragImage *m_dragImage; + + // the starting item for selection with Shift + WXHTREEITEM m_htSelStart; + DECLARE_DYNAMIC_CLASS(wxTreeCtrl) };