1. changed spelling error in wxTR_HAS_VARIABLE_HEIGHT (missing 'E')
[wxWidgets.git] / samples / listctrl / listtest.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: listctrl.h
3 // Purpose: wxListCtrl 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
13 class MyApp: public wxApp
14 { public:
15 bool OnInit();
16
17 wxImageList *m_imageListNormal;
18 wxImageList *m_imageListSmall;
19 };
20
21 class MyListCtrl: public wxListCtrl
22 {
23 public:
24 MyListCtrl(wxWindow *parent, const wxWindowID id, const wxPoint& pos,
25 const wxSize& size, long style):
26 wxListCtrl(parent, id, pos, size, style)
27 {
28 }
29
30 void OnBeginDrag(wxListEvent& event);
31 void OnBeginRDrag(wxListEvent& event);
32 void OnBeginLabelEdit(wxListEvent& event);
33 void OnEndLabelEdit(wxListEvent& event);
34 void OnDeleteItem(wxListEvent& event);
35 void OnGetInfo(wxListEvent& event);
36 void OnSetInfo(wxListEvent& event);
37 void OnSelected(wxListEvent& event);
38 void OnDeselected(wxListEvent& event);
39 void OnListKeyDown(wxListEvent& event);
40 void OnActivated(wxListEvent& event);
41
42 void OnChar(wxKeyEvent& event);
43
44 DECLARE_EVENT_TABLE()
45 };
46
47 // Define a new frame type
48 class MyFrame: public wxFrame
49 {
50 public:
51 MyListCtrl *m_listCtrl;
52 wxTextCtrl *m_logWindow;
53
54 MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
55 ~MyFrame();
56
57 public:
58 void OnQuit(wxCommandEvent& event);
59 void OnAbout(wxCommandEvent& event);
60 void OnListView(wxCommandEvent& event);
61 void OnReportView(wxCommandEvent& event);
62 void OnIconView(wxCommandEvent& event);
63 void OnIconTextView(wxCommandEvent& event);
64 void OnSmallIconView(wxCommandEvent& event);
65 void OnSmallIconTextView(wxCommandEvent& event);
66 void OnDeselectAll(wxCommandEvent& event);
67 void OnSelectAll(wxCommandEvent& event);
68 void OnDeleteAll(wxCommandEvent& event);
69
70 void BusyOn(wxCommandEvent& event);
71 void BusyOff(wxCommandEvent& event);
72
73 DECLARE_EVENT_TABLE()
74 };
75
76
77 // ID for the menu quit command
78 #define LIST_QUIT 1
79 #define LIST_LIST_VIEW 2
80 #define LIST_ICON_VIEW 3
81 #define LIST_ICON_TEXT_VIEW 4
82 #define LIST_SMALL_ICON_VIEW 5
83 #define LIST_SMALL_ICON_TEXT_VIEW 6
84 #define LIST_REPORT_VIEW 7
85 #define LIST_DESELECT_ALL 8
86 #define LIST_SELECT_ALL 9
87 #define LIST_ABOUT 102
88 #define BUSY_ON 10
89 #define BUSY_OFF 11
90 #define LIST_DELETE_ALL 12
91
92 #define LIST_CTRL 1000
93
94