]> git.saurik.com Git - wxWidgets.git/blame - samples/treectrl/treetest.h
More Motif changes (colour/font stuff)
[wxWidgets.git] / samples / treectrl / treetest.h
CommitLineData
457814b5
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: treetest.h
3// Purpose: wxTreeCtrl sample
4// Author: Julian Smart
5// Modified by:
6// Created: 04/01/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart and Markus Holzem
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
12// Define a new application type
13class MyApp: public wxApp
14{ public:
15 bool OnInit(void);
16
17 wxImageList *m_imageListNormal;
18};
19
20class MyTreeCtrl: public wxTreeCtrl
21{
22public:
23 MyTreeCtrl(wxWindow *parent, const wxWindowID id, const wxPoint& pos,
24 const wxSize& size, long style):
25 wxTreeCtrl(parent, id, pos, size, style)
26 {
27 }
28
29 void OnBeginDrag(wxTreeEvent& event);
30 void OnBeginRDrag(wxTreeEvent& event);
31 void OnBeginLabelEdit(wxTreeEvent& event);
32 void OnEndLabelEdit(wxTreeEvent& event);
33 void OnDeleteItem(wxTreeEvent& event);
34 void OnGetInfo(wxTreeEvent& event);
35 void OnSetInfo(wxTreeEvent& event);
36 void OnItemExpanded(wxTreeEvent& event);
37 void OnItemExpanding(wxTreeEvent& event);
38 void OnSelChanged(wxTreeEvent& event);
39 void OnSelChanging(wxTreeEvent& event);
40 void OnKeyDown(wxTreeEvent& event);
41
42 DECLARE_EVENT_TABLE()
43};
44
45// Define a new frame type
46class MyFrame: public wxFrame
47{ public:
48 MyTreeCtrl *m_treeCtrl;
49 wxTextCtrl *m_logWindow;
50
51 MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
52 ~MyFrame(void);
53
54 public:
55 void OnQuit(wxCommandEvent& event);
56 void OnAbout(wxCommandEvent& event);
57 bool OnClose(void) { return TRUE; }
58
59 DECLARE_EVENT_TABLE()
60};
61
62
63// ID for the menu quit command
64#define TREE_QUIT 1
65#define TREE_ABOUT 102
66
67#define TREE_CTRL 1000
68
69