]>
git.saurik.com Git - wxWidgets.git/blob - samples/treectrl/treetest.h
68279c9208996aeeb673674f659bc274b0b7b2db
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
19 class MyTreeItemData
: public wxTreeItemData
22 MyTreeItemData(const wxString
& desc
) : m_desc(desc
) { }
24 void ShowInfo(wxTreeCtrl
*tree
);
30 class MyTreeCtrl
: public wxTreeCtrl
39 MyTreeCtrl(wxWindow
*parent
, const wxWindowID id
,
40 const wxPoint
& pos
, const wxSize
& size
,
42 virtual ~MyTreeCtrl();
44 void OnBeginDrag(wxTreeEvent
& event
);
45 void OnBeginRDrag(wxTreeEvent
& event
);
46 void OnBeginLabelEdit(wxTreeEvent
& event
);
47 void OnEndLabelEdit(wxTreeEvent
& event
);
48 void OnDeleteItem(wxTreeEvent
& event
);
49 void OnGetInfo(wxTreeEvent
& event
);
50 void OnSetInfo(wxTreeEvent
& event
);
51 void OnItemExpanded(wxTreeEvent
& event
);
52 void OnItemExpanding(wxTreeEvent
& event
);
53 void OnItemCollapsed(wxTreeEvent
& event
);
54 void OnItemCollapsing(wxTreeEvent
& event
);
55 void OnSelChanged(wxTreeEvent
& event
);
56 void OnSelChanging(wxTreeEvent
& event
);
57 void OnKeyDown(wxTreeEvent
& event
);
60 void AddItemsRecursively(const wxTreeItemId
& idParent
,
64 void AddTestItemsToTree(size_t numChildren
,
67 wxImageList
*m_imageListNormal
;
72 // Define a new frame type
73 class MyFrame
: public wxFrame
77 MyFrame(const wxString
& title
, int x
, int y
, int w
, int h
);
81 void OnQuit(wxCommandEvent
& event
);
82 void OnAbout(wxCommandEvent
& event
);
85 MyTreeCtrl
*m_treeCtrl
;
90 // menu and control ids