]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/common/treebase.cpp
added GetWindowSizeForVirtualSize() virtual hook for wxScrolledWindow (cuts down...
[wxWidgets.git] / src / common / treebase.cpp
... / ...
CommitLineData
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
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12// =============================================================================
13// declarations
14// =============================================================================
15
16// -----------------------------------------------------------------------------
17// headers
18// -----------------------------------------------------------------------------
19
20// For compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
27#if wxUSE_TREECTRL
28
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"
36
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)
60DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK)
61DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP)
62DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MENU)
63
64// ----------------------------------------------------------------------------
65// Tree event
66// ----------------------------------------------------------------------------
67
68IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent)
69
70
71wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
72 : wxNotifyEvent(commandType, id)
73{
74 m_itemOld = 0l;
75 m_editCancelled = false;
76}
77
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
89#endif // wxUSE_TREECTRL
90