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