]> git.saurik.com Git - wxWidgets.git/blame - samples/listctrl/listtest.h
Work on streams of all sorts. More to come.
[wxWidgets.git] / samples / listctrl / listtest.h
CommitLineData
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
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 wxImageList *m_imageListSmall;
19};
20
21class MyListCtrl: public wxListCtrl
22{
23public:
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);
e487524e 39 void OnListKeyDown(wxListEvent& event);
435fe83e 40 void OnActivated(wxListEvent& event);
457814b5 41
88ac883a
VZ
42 void OnChar(wxKeyEvent& event);
43
457814b5
JS
44 DECLARE_EVENT_TABLE()
45};
46
47// Define a new frame type
48class MyFrame: public wxFrame
49{ public:
50 MyListCtrl *m_listCtrl;
51 wxTextCtrl *m_logWindow;
52
53 MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h);
54 ~MyFrame(void);
55
56 public:
57 void OnQuit(wxCommandEvent& event);
58 void OnAbout(wxCommandEvent& event);
59 void OnListView(wxCommandEvent& event);
60 void OnReportView(wxCommandEvent& event);
61 void OnIconView(wxCommandEvent& event);
62 void OnIconTextView(wxCommandEvent& event);
63 void OnSmallIconView(wxCommandEvent& event);
64 void OnSmallIconTextView(wxCommandEvent& event);
c4771147
KB
65 void OnDeselectAll(wxCommandEvent& event);
66 void OnSelectAll(wxCommandEvent& event);
457814b5
JS
67
68 DECLARE_EVENT_TABLE()
69};
70
71
72// ID for the menu quit command
73#define LIST_QUIT 1
74#define LIST_LIST_VIEW 2
75#define LIST_ICON_VIEW 3
76#define LIST_ICON_TEXT_VIEW 4
77#define LIST_SMALL_ICON_VIEW 5
78#define LIST_SMALL_ICON_TEXT_VIEW 6
79#define LIST_REPORT_VIEW 7
c4771147
KB
80#define LIST_DESELECT_ALL 8
81#define LIST_SELECT_ALL 9
457814b5
JS
82#define LIST_ABOUT 102
83
84#define LIST_CTRL 1000
85
86