+ wxMenu *menuPageOperations = new wxMenu;
+ menuPageOperations->Append(ID_ADD_PAGE, wxT("&Add page\tAlt-A"));
+ menuPageOperations->Append(ID_ADD_PAGE_NO_SELECT, wxT("&Add page (don't select)\tAlt-B"));
+ menuPageOperations->Append(ID_INSERT_PAGE, wxT("&Insert page\tAlt-I"));
+ menuPageOperations->Append(ID_DELETE_CUR_PAGE, wxT("&Delete current page\tAlt-D"));
+ menuPageOperations->Append(ID_DELETE_LAST_PAGE, wxT("D&elete last page\tAlt-L"));
+ menuPageOperations->Append(ID_NEXT_PAGE, wxT("&Next page\tAlt-N"));
+#if wxUSE_TREEBOOK
+ menuPageOperations->AppendSeparator();
+ menuPageOperations->Append(ID_ADD_PAGE_BEFORE, wxT("Insert page &before\tAlt-B"));
+ menuPageOperations->Append(ID_ADD_SUB_PAGE, wxT("Add s&ub page\tAlt-U"));
+#endif
+ menuPageOperations->AppendSeparator();
+ menuPageOperations->Append(ID_CHANGE_SELECTION, wxT("&Change selection to 0\tCtrl-0"));
+ menuPageOperations->Append(ID_SET_SELECTION, wxT("&Set selection to 0\tShift-Ctrl-0"));
+
+ wxMenu *menuOperations = new wxMenu;
+#if wxUSE_HELP
+ menuOperations->Append(ID_CONTEXT_HELP, wxT("&Context help\tCtrl-F1"));
+#endif // wxUSE_HELP
+ menuOperations->Append(ID_HITTEST, wxT("&Hit test\tCtrl-H"));
+
+ wxMenu *menuFile = new wxMenu;
+ menuFile->Append(wxID_ANY, wxT("&Type"), menuType, wxT("Type of control"));
+ menuFile->Append(wxID_ANY, wxT("&Orientation"), menuOrient, wxT("Orientation of control"));
+ menuFile->AppendCheckItem(ID_SHOW_IMAGES, wxT("&Show images\tAlt-S"));
+ menuFile->Append(wxID_ANY, wxT("&Style"), menuStyle, wxT("Style of control"));
+ menuFile->AppendSeparator();
+ menuFile->Append(wxID_EXIT, wxT("E&xit"), wxT("Quits the application"));
+ menuFile->Check(ID_SHOW_IMAGES, m_chkShowImages);
+
+ wxMenuBar *menuBar = new wxMenuBar;
+ menuBar->Append(menuFile, wxT("&File"));
+ menuBar->Append(menuPageOperations, wxT("&Pages"));
+ menuBar->Append(menuOperations, wxT("&Operations"));
+ SetMenuBar(menuBar);
+
+ // books creation
+ m_panel = NULL;
+ m_bookCtrl = NULL;
+
+ // create a dummy image list with a few icons
+ const wxSize imageSize(32, 32);
+
+ m_imageList = new wxImageList(imageSize.GetWidth(), imageSize.GetHeight());
+ m_imageList->
+ Add(wxArtProvider::GetIcon(wxART_INFORMATION, wxART_OTHER, imageSize));
+ m_imageList->
+ Add(wxArtProvider::GetIcon(wxART_QUESTION, wxART_OTHER, imageSize));
+ m_imageList->
+ Add(wxArtProvider::GetIcon(wxART_WARNING, wxART_OTHER, imageSize));
+ m_imageList->
+ Add(wxArtProvider::GetIcon(wxART_ERROR, wxART_OTHER, imageSize));
+
+ m_panel = new wxPanel(this);
+
+#if USE_LOG
+ m_text = new wxTextCtrl(m_panel, wxID_ANY, wxEmptyString,
+ wxDefaultPosition, wxDefaultSize,
+ wxTE_MULTILINE | wxTE_READONLY);