]> git.saurik.com Git - wxWidgets.git/blame - src/common/treebase.cpp
removed cleanup module which was only used for working around bugs in memory debuggin...
[wxWidgets.git] / src / common / treebase.cpp
CommitLineData
484523cf
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: treebase.cpp
3// Purpose: Base wxTreeCtrl classes
4// Author: Julian Smart
5// Created: 01/02/97
6// Modified:
7// Id: $Id$
8// Copyright: (c) 1998 Robert Roebling, Julian Smart et al
65571936 9// Licence: wxWindows licence
484523cf
JS
10/////////////////////////////////////////////////////////////////////////////
11
12// =============================================================================
13// declarations
14// =============================================================================
15
16// -----------------------------------------------------------------------------
17// headers
18// -----------------------------------------------------------------------------
19
14f355c2 20#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
484523cf
JS
21 #pragma implementation "treebase.h"
22#endif
23
24// For compilers that support precompilation, includes "wx.h".
25#include "wx/wxprec.h"
26
27#ifdef __BORLANDC__
1e6feb95 28 #pragma hdrstop
484523cf
JS
29#endif
30
1e6feb95
VZ
31#if wxUSE_TREECTRL
32
484523cf
JS
33#include "wx/treebase.h"
34#include "wx/settings.h"
35#include "wx/log.h"
36#include "wx/intl.h"
37#include "wx/dynarray.h"
38#include "wx/arrimpl.cpp"
39#include "wx/dcclient.h"
484523cf 40
ed2ec17c
GT
41
42// ----------------------------------------------------------------------------
43// events
44// ----------------------------------------------------------------------------
45
46DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_DRAG)
47DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_RDRAG)
48DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT)
49DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_LABEL_EDIT)
50DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_DELETE_ITEM)
51DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_GET_INFO)
52DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SET_INFO)
53DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDED)
54DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDING)
55DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSED)
56DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSING)
57DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGED)
58DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGING)
59DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_KEY_DOWN)
60DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_ACTIVATED)
61DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK)
62DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK)
63DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_DRAG)
ae8c4b33 64DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK)
156194e1 65DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP)
ed2ec17c 66
484523cf
JS
67// ----------------------------------------------------------------------------
68// Tree event
69// ----------------------------------------------------------------------------
70
b8fbf1a0
RD
71IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent)
72
73
484523cf
JS
74wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
75 : wxNotifyEvent(commandType, id)
76{
51d67338 77 m_itemOld = 0l;
cb719f2e 78 m_editCancelled = false;
484523cf
JS
79}
80
0cd936a4
WS
81wxTreeEvent::wxTreeEvent(const wxTreeEvent & event)
82 : wxNotifyEvent(event)
83{
84 m_evtKey = event.m_evtKey;
85 m_item = event.m_item;
86 m_itemOld = event.m_itemOld;
87 m_pointDrag = event.m_pointDrag;
88 m_label = event.m_label;
89 m_editCancelled = event.m_editCancelled;
90}
91
1e6feb95
VZ
92#endif // wxUSE_TREECTRL
93