+ // Make a menubar
+ wxMenu *menuFile = new wxMenu;
+ menuFile->Append(LIST_ABOUT, _T("&About"));
+ menuFile->AppendSeparator();
+ menuFile->Append(LIST_QUIT, _T("E&xit\tAlt-X"));
+
+ wxMenu *menuView = new wxMenu;
+ menuView->Append(LIST_LIST_VIEW, _T("&List view\tF1"));
+ menuView->Append(LIST_REPORT_VIEW, _T("&Report view\tF2"));
+ menuView->Append(LIST_ICON_VIEW, _T("&Icon view\tF3"));
+ menuView->Append(LIST_ICON_TEXT_VIEW, _T("Icon view with &text\tF4"));
+ menuView->Append(LIST_SMALL_ICON_VIEW, _T("&Small icon view\tF5"));
+ menuView->Append(LIST_SMALL_ICON_TEXT_VIEW, _T("Small icon &view with text\tF6"));
+ menuView->Append(LIST_VIRTUAL_VIEW, _T("Virtual view\tF7"));
+
+ wxMenu *menuList = new wxMenu;
+ menuList->Append(LIST_TOGGLE_FIRST, _T("&Toggle first item\tCtrl-T"));
+ menuList->Append(LIST_DESELECT_ALL, _T("&Deselect All\tCtrl-D"));
+ menuList->Append(LIST_SELECT_ALL, _T("S&elect All\tCtrl-A"));
+ menuList->AppendSeparator();
+ menuList->Append(LIST_SHOW_COL_INFO, _T("Show &column info\tCtrl-C"));
+ menuList->Append(LIST_SHOW_SEL_INFO, _T("Show &selected items\tCtrl-S"));
+ menuList->AppendSeparator();
+ menuList->Append(LIST_SORT, _T("&Sort\tCtrl-S"));
+ menuList->AppendSeparator();
+ menuList->Append(LIST_ADD, _T("&Append an item\tCtrl-P"));
+ menuList->Append(LIST_DELETE, _T("&Delete first item\tCtrl-X"));
+ menuList->Append(LIST_DELETE_ALL, _T("Delete &all items"));
+ menuList->AppendSeparator();
+ menuList->Append(LIST_TOGGLE_MULTI_SEL, _T("&Multiple selection\tCtrl-M"),
+ _T("Toggle multiple selection"), TRUE);
+
+ wxMenu *menuCol = new wxMenu;
+ menuCol->Append(LIST_SET_FG_COL, _T("&Foreground colour..."));
+ menuCol->Append(LIST_SET_BG_COL, _T("&Background colour..."));
+
+ wxMenuBar *menubar = new wxMenuBar;
+ menubar->Append(menuFile, _T("&File"));
+ menubar->Append(menuView, _T("&View"));
+ menubar->Append(menuList, _T("&List"));
+ menubar->Append(menuCol, _T("&Colour"));
+ SetMenuBar(menubar);
+
+ m_logWindow = new wxTextCtrl(this, -1, wxEmptyString,
+ wxDefaultPosition, wxDefaultSize,
+ wxTE_MULTILINE | wxSUNKEN_BORDER);
+
+ m_logOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_logWindow));
+
+ RecreateList(wxLC_REPORT | wxLC_SINGLE_SEL);
+
+ CreateStatusBar(3);
+}