treebase.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/treebase.h
  3. // Purpose: wxTreeCtrl base classes and types
  4. // Author: Julian Smart et al
  5. // Modified by:
  6. // Created: 01/02/97
  7. // Copyright: (c) 1997,1998 Robert Roebling
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_TREEBASE_H_
  11. #define _WX_TREEBASE_H_
  12. // ----------------------------------------------------------------------------
  13. // headers
  14. // ----------------------------------------------------------------------------
  15. #include "wx/defs.h"
  16. #if wxUSE_TREECTRL
  17. #include "wx/window.h" // for wxClientData
  18. #include "wx/event.h"
  19. #include "wx/dynarray.h"
  20. #include "wx/itemid.h"
  21. #if WXWIN_COMPATIBILITY_2_6
  22. // flags for deprecated `Expand(int action)', will be removed in next versions
  23. enum
  24. {
  25. wxTREE_EXPAND_EXPAND,
  26. wxTREE_EXPAND_COLLAPSE,
  27. wxTREE_EXPAND_COLLAPSE_RESET,
  28. wxTREE_EXPAND_TOGGLE
  29. };
  30. #endif // WXWIN_COMPATIBILITY_2_6
  31. // ----------------------------------------------------------------------------
  32. // wxTreeItemId identifies an element of the tree. It's opaque for the
  33. // application and the only method which can be used by user code is IsOk().
  34. // ----------------------------------------------------------------------------
  35. // This is a class and not a typedef because existing code may forward declare
  36. // wxTreeItemId as a class and we don't want to break it without good reason.
  37. class wxTreeItemId : public wxItemId<void*>
  38. {
  39. public:
  40. wxTreeItemId() : wxItemId<void*>() { }
  41. wxTreeItemId(void* pItem) : wxItemId<void*>(pItem) { }
  42. };
  43. // ----------------------------------------------------------------------------
  44. // wxTreeItemData is some (arbitrary) user class associated with some item. The
  45. // main advantage of having this class (compared to old untyped interface) is
  46. // that wxTreeItemData's are destroyed automatically by the tree and, as this
  47. // class has virtual dtor, it means that the memory will be automatically
  48. // freed. OTOH, we don't just use wxObject instead of wxTreeItemData because
  49. // the size of this class is critical: in any real application, each tree leaf
  50. // will have wxTreeItemData associated with it and number of leaves may be
  51. // quite big.
  52. //
  53. // Because the objects of this class are deleted by the tree, they should
  54. // always be allocated on the heap!
  55. // ----------------------------------------------------------------------------
  56. class WXDLLIMPEXP_CORE wxTreeItemData: public wxClientData
  57. {
  58. friend class WXDLLIMPEXP_FWD_CORE wxTreeCtrl;
  59. friend class WXDLLIMPEXP_FWD_CORE wxGenericTreeCtrl;
  60. public:
  61. // creation/destruction
  62. // --------------------
  63. // default ctor
  64. wxTreeItemData() { }
  65. // default copy ctor/assignment operator are ok
  66. // accessor: get the item associated with us
  67. const wxTreeItemId& GetId() const { return m_pItem; }
  68. void SetId(const wxTreeItemId& id) { m_pItem = id; }
  69. protected:
  70. wxTreeItemId m_pItem;
  71. };
  72. typedef void *wxTreeItemIdValue;
  73. WX_DEFINE_EXPORTED_ARRAY_PTR(wxTreeItemIdValue, wxArrayTreeItemIdsBase);
  74. // this is a wrapper around the array class defined above which allow to wok
  75. // with values of natural wxTreeItemId type instead of using wxTreeItemIdValue
  76. // and does it without any loss of efficiency
  77. class WXDLLIMPEXP_CORE wxArrayTreeItemIds : public wxArrayTreeItemIdsBase
  78. {
  79. public:
  80. void Add(const wxTreeItemId& id)
  81. { wxArrayTreeItemIdsBase::Add(id.m_pItem); }
  82. void Insert(const wxTreeItemId& id, size_t pos)
  83. { wxArrayTreeItemIdsBase::Insert(id.m_pItem, pos); }
  84. wxTreeItemId Item(size_t i) const
  85. { return wxTreeItemId(wxArrayTreeItemIdsBase::Item(i)); }
  86. wxTreeItemId operator[](size_t i) const { return Item(i); }
  87. };
  88. // ----------------------------------------------------------------------------
  89. // constants
  90. // ----------------------------------------------------------------------------
  91. // enum for different images associated with a treectrl item
  92. enum wxTreeItemIcon
  93. {
  94. wxTreeItemIcon_Normal, // not selected, not expanded
  95. wxTreeItemIcon_Selected, // selected, not expanded
  96. wxTreeItemIcon_Expanded, // not selected, expanded
  97. wxTreeItemIcon_SelectedExpanded, // selected, expanded
  98. wxTreeItemIcon_Max
  99. };
  100. // special values for the 'state' parameter of wxTreeCtrl::SetItemState()
  101. static const int wxTREE_ITEMSTATE_NONE = -1; // not state (no display state image)
  102. static const int wxTREE_ITEMSTATE_NEXT = -2; // cycle to the next state
  103. static const int wxTREE_ITEMSTATE_PREV = -3; // cycle to the previous state
  104. // ----------------------------------------------------------------------------
  105. // wxTreeCtrl flags
  106. // ----------------------------------------------------------------------------
  107. #define wxTR_NO_BUTTONS 0x0000 // for convenience
  108. #define wxTR_HAS_BUTTONS 0x0001 // draw collapsed/expanded btns
  109. #define wxTR_NO_LINES 0x0004 // don't draw lines at all
  110. #define wxTR_LINES_AT_ROOT 0x0008 // connect top-level nodes
  111. #define wxTR_TWIST_BUTTONS 0x0010 // still used by wxTreeListCtrl
  112. #define wxTR_SINGLE 0x0000 // for convenience
  113. #define wxTR_MULTIPLE 0x0020 // can select multiple items
  114. #if WXWIN_COMPATIBILITY_2_8
  115. #define wxTR_EXTENDED 0x0040 // deprecated, don't use
  116. #endif // WXWIN_COMPATIBILITY_2_8
  117. #define wxTR_HAS_VARIABLE_ROW_HEIGHT 0x0080 // what it says
  118. #define wxTR_EDIT_LABELS 0x0200 // can edit item labels
  119. #define wxTR_ROW_LINES 0x0400 // put border around items
  120. #define wxTR_HIDE_ROOT 0x0800 // don't display root node
  121. #define wxTR_FULL_ROW_HIGHLIGHT 0x2000 // highlight full horz space
  122. // make the default control appearance look more native-like depending on the
  123. // platform
  124. #if defined(__WXGTK20__)
  125. #define wxTR_DEFAULT_STYLE (wxTR_HAS_BUTTONS | wxTR_NO_LINES)
  126. #elif defined(__WXMAC__)
  127. #define wxTR_DEFAULT_STYLE \
  128. (wxTR_HAS_BUTTONS | wxTR_NO_LINES | wxTR_FULL_ROW_HIGHLIGHT)
  129. #else
  130. #define wxTR_DEFAULT_STYLE (wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT)
  131. #endif
  132. #if WXWIN_COMPATIBILITY_2_6
  133. // deprecated, don't use
  134. #define wxTR_MAC_BUTTONS 0
  135. #define wxTR_AQUA_BUTTONS 0
  136. #endif // WXWIN_COMPATIBILITY_2_6
  137. // values for the `flags' parameter of wxTreeCtrl::HitTest() which determine
  138. // where exactly the specified point is situated:
  139. static const int wxTREE_HITTEST_ABOVE = 0x0001;
  140. static const int wxTREE_HITTEST_BELOW = 0x0002;
  141. static const int wxTREE_HITTEST_NOWHERE = 0x0004;
  142. // on the button associated with an item.
  143. static const int wxTREE_HITTEST_ONITEMBUTTON = 0x0008;
  144. // on the bitmap associated with an item.
  145. static const int wxTREE_HITTEST_ONITEMICON = 0x0010;
  146. // on the indent associated with an item.
  147. static const int wxTREE_HITTEST_ONITEMINDENT = 0x0020;
  148. // on the label (string) associated with an item.
  149. static const int wxTREE_HITTEST_ONITEMLABEL = 0x0040;
  150. // on the right of the label associated with an item.
  151. static const int wxTREE_HITTEST_ONITEMRIGHT = 0x0080;
  152. // on the label (string) associated with an item.
  153. static const int wxTREE_HITTEST_ONITEMSTATEICON = 0x0100;
  154. // on the left of the wxTreeCtrl.
  155. static const int wxTREE_HITTEST_TOLEFT = 0x0200;
  156. // on the right of the wxTreeCtrl.
  157. static const int wxTREE_HITTEST_TORIGHT = 0x0400;
  158. // on the upper part (first half) of the item.
  159. static const int wxTREE_HITTEST_ONITEMUPPERPART = 0x0800;
  160. // on the lower part (second half) of the item.
  161. static const int wxTREE_HITTEST_ONITEMLOWERPART = 0x1000;
  162. // anywhere on the item
  163. static const int wxTREE_HITTEST_ONITEM = wxTREE_HITTEST_ONITEMICON |
  164. wxTREE_HITTEST_ONITEMLABEL;
  165. // tree ctrl default name
  166. extern WXDLLIMPEXP_DATA_CORE(const char) wxTreeCtrlNameStr[];
  167. // ----------------------------------------------------------------------------
  168. // wxTreeItemAttr: a structure containing the visual attributes of an item
  169. // ----------------------------------------------------------------------------
  170. class WXDLLIMPEXP_CORE wxTreeItemAttr
  171. {
  172. public:
  173. // ctors
  174. wxTreeItemAttr() { }
  175. wxTreeItemAttr(const wxColour& colText,
  176. const wxColour& colBack,
  177. const wxFont& font)
  178. : m_colText(colText), m_colBack(colBack), m_font(font) { }
  179. // setters
  180. void SetTextColour(const wxColour& colText) { m_colText = colText; }
  181. void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
  182. void SetFont(const wxFont& font) { m_font = font; }
  183. // accessors
  184. bool HasTextColour() const { return m_colText.IsOk(); }
  185. bool HasBackgroundColour() const { return m_colBack.IsOk(); }
  186. bool HasFont() const { return m_font.IsOk(); }
  187. const wxColour& GetTextColour() const { return m_colText; }
  188. const wxColour& GetBackgroundColour() const { return m_colBack; }
  189. const wxFont& GetFont() const { return m_font; }
  190. private:
  191. wxColour m_colText,
  192. m_colBack;
  193. wxFont m_font;
  194. };
  195. // ----------------------------------------------------------------------------
  196. // wxTreeEvent is a special class for all events associated with tree controls
  197. //
  198. // NB: note that not all accessors make sense for all events, see the event
  199. // descriptions below
  200. // ----------------------------------------------------------------------------
  201. class WXDLLIMPEXP_FWD_CORE wxTreeCtrlBase;
  202. class WXDLLIMPEXP_CORE wxTreeEvent : public wxNotifyEvent
  203. {
  204. public:
  205. wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
  206. wxTreeEvent(wxEventType commandType,
  207. wxTreeCtrlBase *tree,
  208. const wxTreeItemId &item = wxTreeItemId());
  209. wxTreeEvent(const wxTreeEvent& event);
  210. virtual wxEvent *Clone() const { return new wxTreeEvent(*this); }
  211. // accessors
  212. // get the item on which the operation was performed or the newly
  213. // selected item for wxEVT_TREE_SEL_CHANGED/ING events
  214. wxTreeItemId GetItem() const { return m_item; }
  215. void SetItem(const wxTreeItemId& item) { m_item = item; }
  216. // for wxEVT_TREE_SEL_CHANGED/ING events, get the previously
  217. // selected item
  218. wxTreeItemId GetOldItem() const { return m_itemOld; }
  219. void SetOldItem(const wxTreeItemId& item) { m_itemOld = item; }
  220. // the point where the mouse was when the drag operation started (for
  221. // wxEVT_TREE_BEGIN_(R)DRAG events only) or click position
  222. wxPoint GetPoint() const { return m_pointDrag; }
  223. void SetPoint(const wxPoint& pt) { m_pointDrag = pt; }
  224. // keyboard data (for wxEVT_TREE_KEY_DOWN only)
  225. const wxKeyEvent& GetKeyEvent() const { return m_evtKey; }
  226. int GetKeyCode() const { return m_evtKey.GetKeyCode(); }
  227. void SetKeyEvent(const wxKeyEvent& evt) { m_evtKey = evt; }
  228. // label (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only)
  229. const wxString& GetLabel() const { return m_label; }
  230. void SetLabel(const wxString& label) { m_label = label; }
  231. // edit cancel flag (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only)
  232. bool IsEditCancelled() const { return m_editCancelled; }
  233. void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
  234. // Set the tooltip for the item (for EVT\_TREE\_ITEM\_GETTOOLTIP events)
  235. void SetToolTip(const wxString& toolTip) { m_label = toolTip; }
  236. wxString GetToolTip() { return m_label; }
  237. private:
  238. // not all of the members are used (or initialized) for all events
  239. wxKeyEvent m_evtKey;
  240. wxTreeItemId m_item,
  241. m_itemOld;
  242. wxPoint m_pointDrag;
  243. wxString m_label;
  244. bool m_editCancelled;
  245. friend class WXDLLIMPEXP_FWD_CORE wxTreeCtrl;
  246. friend class WXDLLIMPEXP_FWD_CORE wxGenericTreeCtrl;
  247. DECLARE_DYNAMIC_CLASS(wxTreeEvent)
  248. };
  249. typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
  250. // ----------------------------------------------------------------------------
  251. // tree control events and macros for handling them
  252. // ----------------------------------------------------------------------------
  253. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_DRAG, wxTreeEvent );
  254. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_RDRAG, wxTreeEvent );
  255. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_LABEL_EDIT, wxTreeEvent );
  256. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_END_LABEL_EDIT, wxTreeEvent );
  257. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_DELETE_ITEM, wxTreeEvent );
  258. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_GET_INFO, wxTreeEvent );
  259. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SET_INFO, wxTreeEvent );
  260. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_EXPANDED, wxTreeEvent );
  261. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_EXPANDING, wxTreeEvent );
  262. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_COLLAPSED, wxTreeEvent );
  263. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_COLLAPSING, wxTreeEvent );
  264. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SEL_CHANGED, wxTreeEvent );
  265. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SEL_CHANGING, wxTreeEvent );
  266. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_KEY_DOWN, wxTreeEvent );
  267. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_ACTIVATED, wxTreeEvent );
  268. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_RIGHT_CLICK, wxTreeEvent );
  269. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_MIDDLE_CLICK, wxTreeEvent );
  270. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_END_DRAG, wxTreeEvent );
  271. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_STATE_IMAGE_CLICK, wxTreeEvent );
  272. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_GETTOOLTIP, wxTreeEvent );
  273. wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_MENU, wxTreeEvent );
  274. #define wxTreeEventHandler(func) \
  275. wxEVENT_HANDLER_CAST(wxTreeEventFunction, func)
  276. #define wx__DECLARE_TREEEVT(evt, id, fn) \
  277. wx__DECLARE_EVT1(wxEVT_TREE_ ## evt, id, wxTreeEventHandler(fn))
  278. // GetItem() returns the item being dragged, GetPoint() the mouse coords
  279. //
  280. // if you call event.Allow(), the drag operation will start and a
  281. // EVT_TREE_END_DRAG event will be sent when the drag is over.
  282. #define EVT_TREE_BEGIN_DRAG(id, fn) wx__DECLARE_TREEEVT(BEGIN_DRAG, id, fn)
  283. #define EVT_TREE_BEGIN_RDRAG(id, fn) wx__DECLARE_TREEEVT(BEGIN_RDRAG, id, fn)
  284. // GetItem() is the item on which the drop occurred (if any) and GetPoint() the
  285. // current mouse coords
  286. #define EVT_TREE_END_DRAG(id, fn) wx__DECLARE_TREEEVT(END_DRAG, id, fn)
  287. // GetItem() returns the itme whose label is being edited, GetLabel() returns
  288. // the current item label for BEGIN and the would be new one for END.
  289. //
  290. // Vetoing BEGIN event means that label editing won't happen at all,
  291. // vetoing END means that the new value is discarded and the old one kept
  292. #define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) wx__DECLARE_TREEEVT(BEGIN_LABEL_EDIT, id, fn)
  293. #define EVT_TREE_END_LABEL_EDIT(id, fn) wx__DECLARE_TREEEVT(END_LABEL_EDIT, id, fn)
  294. // provide/update information about GetItem() item
  295. #define EVT_TREE_GET_INFO(id, fn) wx__DECLARE_TREEEVT(GET_INFO, id, fn)
  296. #define EVT_TREE_SET_INFO(id, fn) wx__DECLARE_TREEEVT(SET_INFO, id, fn)
  297. // GetItem() is the item being expanded/collapsed, the "ING" versions can use
  298. #define EVT_TREE_ITEM_EXPANDED(id, fn) wx__DECLARE_TREEEVT(ITEM_EXPANDED, id, fn)
  299. #define EVT_TREE_ITEM_EXPANDING(id, fn) wx__DECLARE_TREEEVT(ITEM_EXPANDING, id, fn)
  300. #define EVT_TREE_ITEM_COLLAPSED(id, fn) wx__DECLARE_TREEEVT(ITEM_COLLAPSED, id, fn)
  301. #define EVT_TREE_ITEM_COLLAPSING(id, fn) wx__DECLARE_TREEEVT(ITEM_COLLAPSING, id, fn)
  302. // GetOldItem() is the item which had the selection previously, GetItem() is
  303. // the item which acquires selection
  304. #define EVT_TREE_SEL_CHANGED(id, fn) wx__DECLARE_TREEEVT(SEL_CHANGED, id, fn)
  305. #define EVT_TREE_SEL_CHANGING(id, fn) wx__DECLARE_TREEEVT(SEL_CHANGING, id, fn)
  306. // GetKeyCode() returns the key code
  307. // NB: this is the only message for which GetItem() is invalid (you may get the
  308. // item from GetSelection())
  309. #define EVT_TREE_KEY_DOWN(id, fn) wx__DECLARE_TREEEVT(KEY_DOWN, id, fn)
  310. // GetItem() returns the item being deleted, the associated data (if any) will
  311. // be deleted just after the return of this event handler (if any)
  312. #define EVT_TREE_DELETE_ITEM(id, fn) wx__DECLARE_TREEEVT(DELETE_ITEM, id, fn)
  313. // GetItem() returns the item that was activated (double click, enter, space)
  314. #define EVT_TREE_ITEM_ACTIVATED(id, fn) wx__DECLARE_TREEEVT(ITEM_ACTIVATED, id, fn)
  315. // GetItem() returns the item for which the context menu shall be shown
  316. #define EVT_TREE_ITEM_MENU(id, fn) wx__DECLARE_TREEEVT(ITEM_MENU, id, fn)
  317. // GetItem() returns the item that was clicked on
  318. #define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) wx__DECLARE_TREEEVT(ITEM_RIGHT_CLICK, id, fn)
  319. #define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) wx__DECLARE_TREEEVT(ITEM_MIDDLE_CLICK, id, fn)
  320. // GetItem() returns the item whose state image was clicked on
  321. #define EVT_TREE_STATE_IMAGE_CLICK(id, fn) wx__DECLARE_TREEEVT(STATE_IMAGE_CLICK, id, fn)
  322. // GetItem() is the item for which the tooltip is being requested
  323. #define EVT_TREE_ITEM_GETTOOLTIP(id, fn) wx__DECLARE_TREEEVT(ITEM_GETTOOLTIP, id, fn)
  324. // old wxEVT_COMMAND_* constants
  325. #define wxEVT_COMMAND_TREE_BEGIN_DRAG wxEVT_TREE_BEGIN_DRAG
  326. #define wxEVT_COMMAND_TREE_BEGIN_RDRAG wxEVT_TREE_BEGIN_RDRAG
  327. #define wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT wxEVT_TREE_BEGIN_LABEL_EDIT
  328. #define wxEVT_COMMAND_TREE_END_LABEL_EDIT wxEVT_TREE_END_LABEL_EDIT
  329. #define wxEVT_COMMAND_TREE_DELETE_ITEM wxEVT_TREE_DELETE_ITEM
  330. #define wxEVT_COMMAND_TREE_GET_INFO wxEVT_TREE_GET_INFO
  331. #define wxEVT_COMMAND_TREE_SET_INFO wxEVT_TREE_SET_INFO
  332. #define wxEVT_COMMAND_TREE_ITEM_EXPANDED wxEVT_TREE_ITEM_EXPANDED
  333. #define wxEVT_COMMAND_TREE_ITEM_EXPANDING wxEVT_TREE_ITEM_EXPANDING
  334. #define wxEVT_COMMAND_TREE_ITEM_COLLAPSED wxEVT_TREE_ITEM_COLLAPSED
  335. #define wxEVT_COMMAND_TREE_ITEM_COLLAPSING wxEVT_TREE_ITEM_COLLAPSING
  336. #define wxEVT_COMMAND_TREE_SEL_CHANGED wxEVT_TREE_SEL_CHANGED
  337. #define wxEVT_COMMAND_TREE_SEL_CHANGING wxEVT_TREE_SEL_CHANGING
  338. #define wxEVT_COMMAND_TREE_KEY_DOWN wxEVT_TREE_KEY_DOWN
  339. #define wxEVT_COMMAND_TREE_ITEM_ACTIVATED wxEVT_TREE_ITEM_ACTIVATED
  340. #define wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK wxEVT_TREE_ITEM_RIGHT_CLICK
  341. #define wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK wxEVT_TREE_ITEM_MIDDLE_CLICK
  342. #define wxEVT_COMMAND_TREE_END_DRAG wxEVT_TREE_END_DRAG
  343. #define wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK wxEVT_TREE_STATE_IMAGE_CLICK
  344. #define wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP wxEVT_TREE_ITEM_GETTOOLTIP
  345. #define wxEVT_COMMAND_TREE_ITEM_MENU wxEVT_TREE_ITEM_MENU
  346. #endif // wxUSE_TREECTRL
  347. #endif // _WX_TREEBASE_H_