- CreateStatusBar(2);
-
- // Make a menubar
- wxMenu *fileMenu = new wxMenu;
- fileMenu->Append(SPLIT_VERTICAL, "Split &Vertically\tCtrl-V", "Split vertically");
- fileMenu->Append(SPLIT_HORIZONTAL, "Split &Horizontally\tCtrl-H", "Split horizontally");
- fileMenu->Append(SPLIT_UNSPLIT, "&Unsplit\tCtrl-U", "Unsplit");
- fileMenu->AppendSeparator();
- fileMenu->Append(SPLIT_SETMINSIZE, "Set &min size", "Set minimum pane size");
- fileMenu->AppendSeparator();
- fileMenu->Append(SPLIT_QUIT, "E&xit\tAlt-X", "Exit");
-
- wxMenuBar *menuBar = new wxMenuBar;
- menuBar->Append(fileMenu, "&File");
-
- SetMenuBar(menuBar);
-
- m_splitter = new MySplitterWindow(this, SPLITTER_WINDOW);
+#if wxUSE_STATUSBAR
+ CreateStatusBar(2);
+#endif // wxUSE_STATUSBAR
+
+ // Make a menubar
+ wxMenu *splitMenu = new wxMenu;
+ splitMenu->Append(SPLIT_VERTICAL,
+ _T("Split &Vertically\tCtrl-V"),
+ _T("Split vertically"));
+ splitMenu->Append(SPLIT_HORIZONTAL,
+ _T("Split &Horizontally\tCtrl-H"),
+ _T("Split horizontally"));
+ splitMenu->Append(SPLIT_UNSPLIT,
+ _T("&Unsplit\tCtrl-U"),
+ _T("Unsplit"));
+ splitMenu->AppendSeparator();
+
+ splitMenu->AppendCheckItem(SPLIT_LIVE,
+ _T("&Live update\tCtrl-L"),
+ _T("Toggle live update mode"));
+ splitMenu->Append(SPLIT_SETPOSITION,
+ _T("Set splitter &position\tCtrl-P"),
+ _T("Set the splitter position"));
+ splitMenu->Append(SPLIT_SETMINSIZE,
+ _T("Set &min size\tCtrl-M"),
+ _T("Set minimum pane size"));
+ splitMenu->Append(SPLIT_SETGRAVITY,
+ _T("Set &gravity\tCtrl-G"),
+ _T("Set gravity of sash"));
+ splitMenu->AppendSeparator();
+
+ splitMenu->Append(SPLIT_REPLACE,
+ _T("&Replace right window"),
+ _T("Replace right window"));
+ splitMenu->AppendSeparator();
+
+ splitMenu->Append(SPLIT_QUIT, _T("E&xit\tAlt-X"), _T("Exit"));
+
+ wxMenuBar *menuBar = new wxMenuBar;
+ menuBar->Append(splitMenu, _T("&Splitter"));
+
+ SetMenuBar(menuBar);
+
+ menuBar->Check(SPLIT_LIVE, true);
+ m_splitter = new MySplitterWindow(this);
+
+ m_splitter->SetSashGravity(1.0);