]>
git.saurik.com Git - wxWidgets.git/blob - samples/treectrl/treetest.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxTreeCtrl sample
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 // Define a new application type
13 class MyApp
: public wxApp
17 wxImageList
*m_imageListNormal
;
20 class MyTreeCtrl
: public wxTreeCtrl
23 MyTreeCtrl(wxWindow
*parent
, const wxWindowID id
, const wxPoint
& pos
,
24 const wxSize
& size
, long style
):
25 wxTreeCtrl(parent
, id
, pos
, size
, style
)
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
);
45 // Define a new frame type
46 class MyFrame
: public wxFrame
48 MyTreeCtrl
*m_treeCtrl
;
49 wxTextCtrl
*m_logWindow
;
51 MyFrame(wxFrame
*frame
, char *title
, int x
, int y
, int w
, int h
);
55 void OnQuit(wxCommandEvent
& event
);
56 void OnAbout(wxCommandEvent
& event
);
57 bool OnClose(void) { return TRUE
; }
63 // ID for the menu quit command
65 #define TREE_ABOUT 102
67 #define TREE_CTRL 1000