+ // menu of the sample
+ wxMenu *menuType = new wxMenu;
+#if wxUSE_NOTEBOOK
+ menuType->AppendRadioItem(ID_BOOK_NOTEBOOK, wxT("&Notebook\tCtrl-1"));
+#endif
+#if wxUSE_LISTBOOK
+ menuType->AppendRadioItem(ID_BOOK_LISTBOOK, wxT("&Listbook\tCtrl-2"));
+#endif
+#if wxUSE_CHOICEBOOK
+ menuType->AppendRadioItem(ID_BOOK_CHOICEBOOK, wxT("&Choicebook\tCtrl-3"));
+#endif
+#if wxUSE_TREEBOOK
+ menuType->AppendRadioItem(ID_BOOK_TREEBOOK, wxT("&Treebook\tCtrl-4"));
+#endif
+#if wxUSE_TOOLBOOK
+ menuType->AppendRadioItem(ID_BOOK_TOOLBOOK, wxT("T&oolbook\tCtrl-5"));
+#endif
+
+ menuType->Check(ID_BOOK_NOTEBOOK + m_type, true);
+
+ wxMenu *menuOrient = new wxMenu;
+ menuOrient->AppendRadioItem(ID_ORIENT_DEFAULT, wxT("&Default\tAlt-0"));
+ menuOrient->AppendRadioItem(ID_ORIENT_TOP, wxT("&Top\tAlt-1"));
+ menuOrient->AppendRadioItem(ID_ORIENT_BOTTOM, wxT("&Bottom\tAlt-2"));
+ menuOrient->AppendRadioItem(ID_ORIENT_LEFT, wxT("&Left\tAlt-3"));
+ menuOrient->AppendRadioItem(ID_ORIENT_RIGHT, wxT("&Right\tAlt-4"));
+
+ 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_GO_HOME, wxT("Go to the first page\tCtrl-F"));
+
+ 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->AppendCheckItem(ID_MULTI, wxT("&Multiple lines\tAlt-M"));
+ menuFile->AppendSeparator();
+ menuFile->Append(wxID_EXIT, wxT("E&xit"), wxT("Quits the application"));
+ menuFile->Check(ID_SHOW_IMAGES, m_chkShowImages);
+ menuFile->Check(ID_MULTI, m_multi);
+
+ 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;