]>
git.saurik.com Git - wxWidgets.git/blob - samples/listctrl/listtest.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxListCtrl 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
;
18 wxImageList
*m_imageListSmall
;
21 class MyListCtrl
: public wxListCtrl
24 MyListCtrl(wxWindow
*parent
, const wxWindowID id
, const wxPoint
& pos
,
25 const wxSize
& size
, long style
):
26 wxListCtrl(parent
, id
, pos
, size
, style
)
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 OnKeyDown(wxListEvent
& event
);
44 // Define a new frame type
45 class MyFrame
: public wxFrame
47 MyListCtrl
*m_listCtrl
;
48 wxTextCtrl
*m_logWindow
;
50 MyFrame(wxFrame
*frame
, char *title
, int x
, int y
, int w
, int h
);
54 void OnQuit(wxCommandEvent
& event
);
55 void OnAbout(wxCommandEvent
& event
);
56 void OnListView(wxCommandEvent
& event
);
57 void OnReportView(wxCommandEvent
& event
);
58 void OnIconView(wxCommandEvent
& event
);
59 void OnIconTextView(wxCommandEvent
& event
);
60 void OnSmallIconView(wxCommandEvent
& event
);
61 void OnSmallIconTextView(wxCommandEvent
& event
);
62 bool OnClose(void) { return TRUE
; }
68 // ID for the menu quit command
70 #define LIST_LIST_VIEW 2
71 #define LIST_ICON_VIEW 3
72 #define LIST_ICON_TEXT_VIEW 4
73 #define LIST_SMALL_ICON_VIEW 5
74 #define LIST_SMALL_ICON_TEXT_VIEW 6
75 #define LIST_REPORT_VIEW 7
76 #define LIST_ABOUT 102
78 #define LIST_CTRL 1000