X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/092bddef5aef2ca6a39bd1e15848d0e494764a07..f4e325b3df3d4c0b3ca21d4d1781acab6a488e4c:/include/wx/msw/treectrl.h diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index e11a0b6bf6..24eb312a81 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -9,8 +9,8 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#ifndef __TREECTRLH__ -#define __TREECTRLH__ +#ifndef _WX_TREECTRL_H_ +#define _WX_TREECTRL_H_ #ifdef __GNUG__ #pragma interface "treectrl.h" @@ -75,11 +75,9 @@ enum { }; // Flags for InsertItem -enum { - wxTREE_INSERT_LAST = -1, - wxTREE_INSERT_FIRST = -2, - wxTREE_INSERT_SORT = -3 -}; +#define wxTREE_INSERT_FIRST 0xFFFF0001 +#define wxTREE_INSERT_LAST 0xFFFF0002 +#define wxTREE_INSERT_SORT 0xFFFF0003 class WXDLLEXPORT wxTreeItem: public wxObject { @@ -194,7 +192,7 @@ public: // bounding rect bool GetItemRect(long item, wxRectangle& rect, bool textOnly = FALSE) const; // - wxTextCtrl& GetEditControl() const; + wxTextCtrl* GetEditControl() const; // operations // ---------- @@ -219,7 +217,13 @@ public: bool SelectItem(long item); bool ScrollTo(long item); bool DeleteAllItems(); - wxTextCtrl& Edit(long item); + + // Edit the label (tree must have the focus) + wxTextCtrl* EditLabel(long item, wxClassInfo* textControlClass = CLASSINFO(wxTextCtrl)); + + // End label editing, optionally cancelling the edit + bool EndEditLabel(bool cancel); + long HitTest(const wxPoint& point, int& flags); // wxImageList *CreateDragImage(long item); bool SortChildren(long item); @@ -231,9 +235,9 @@ public: bool MSWNotify(WXWPARAM wParam, WXLPARAM lParam); protected: - wxTextCtrl m_textCtrl; - wxImageList *m_imageListNormal; - wxImageList *m_imageListState; + wxTextCtrl* m_textCtrl; + wxImageList* m_imageListNormal; + wxImageList* m_imageListState; DECLARE_DYNAMIC_CLASS(wxTreeCtrl) }; @@ -291,4 +295,4 @@ typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); #define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, #endif - // __TREECTRLH__ + // _WX_TREECTRL_H_