]> git.saurik.com Git - wxWidgets.git/blame - src/common/treebase.cpp
Ambiguous overload fix for gcc
[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
484523cf
JS
20// For compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
1e6feb95 24 #pragma hdrstop
484523cf
JS
25#endif
26
1e6feb95
VZ
27#if wxUSE_TREECTRL
28
484523cf
JS
29#include "wx/treebase.h"
30#include "wx/settings.h"
31#include "wx/log.h"
32#include "wx/intl.h"
33#include "wx/dynarray.h"
34#include "wx/arrimpl.cpp"
35#include "wx/dcclient.h"
484523cf 36
ed2ec17c
GT
37
38// ----------------------------------------------------------------------------
39// events
40// ----------------------------------------------------------------------------
41
42DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_DRAG)
43DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_RDRAG)
44DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT)
45DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_LABEL_EDIT)
46DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_DELETE_ITEM)
47DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_GET_INFO)
48DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SET_INFO)
49DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDED)
50DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_EXPANDING)
51DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSED)
52DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_COLLAPSING)
53DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGED)
54DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_SEL_CHANGING)
55DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_KEY_DOWN)
56DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_ACTIVATED)
57DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK)
58DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK)
59DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_END_DRAG)
ae8c4b33 60DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK)
156194e1 61DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP)
f7c6f947 62DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MENU)
ed2ec17c 63
484523cf
JS
64// ----------------------------------------------------------------------------
65// Tree event
66// ----------------------------------------------------------------------------
67
b8fbf1a0
RD
68IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent)
69
70
484523cf
JS
71wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
72 : wxNotifyEvent(commandType, id)
73{
51d67338 74 m_itemOld = 0l;
cb719f2e 75 m_editCancelled = false;
484523cf
JS
76}
77
0cd936a4
WS
78wxTreeEvent::wxTreeEvent(const wxTreeEvent & event)
79 : wxNotifyEvent(event)
80{
81 m_evtKey = event.m_evtKey;
82 m_item = event.m_item;
83 m_itemOld = event.m_itemOld;
84 m_pointDrag = event.m_pointDrag;
85 m_label = event.m_label;
86 m_editCancelled = event.m_editCancelled;
87}
88
ec157c8f
WS
89#if WXWIN_COMPATIBILITY_2_2
90
91int wxTreeEvent::GetCode() const
92{
93 return m_evtKey.GetKeyCode();
94}
95
96#endif // WXWIN_COMPATIBILITY_2_2
97
1e6feb95
VZ
98#endif // wxUSE_TREECTRL
99