+ // File menu
+ wxMenu *menuFile = new wxMenu;
+ menuFile->Append (wxID_OPEN, _("&Open ..\tCtrl+O"));
+ menuFile->Append (wxID_SAVE, _("&Save\tCtrl+S"));
+ menuFile->Append (wxID_SAVEAS, _("Save &as ..\tCtrl+Shift+S"));
+ menuFile->Append (wxID_CLOSE, _("&Close\tCtrl+W"));
+ menuFile->AppendSeparator();
+ menuFile->Append (myID_PROPERTIES, _("Proper&ties ..\tCtrl+I"));
+ menuFile->AppendSeparator();
+ menuFile->Append (wxID_PRINT_SETUP, _("Print Set&up .."));
+ menuFile->Append (wxID_PREVIEW, _("Print Pre&view\tCtrl+Shift+P"));
+ menuFile->Append (wxID_PRINT, _("&Print ..\tCtrl+P"));
+ menuFile->AppendSeparator();
+ menuFile->Append (wxID_EXIT, _("&Quit\tCtrl+Q"));
+
+ // Edit menu
+ wxMenu *menuEdit = new wxMenu;
+ menuEdit->Append (wxID_UNDO, _("&Undo\tCtrl+Z"));
+ menuEdit->Append (wxID_REDO, _("&Redo\tCtrl+Shift+Z"));
+ menuEdit->AppendSeparator();
+ menuEdit->Append (wxID_CUT, _("Cu&t\tCtrl+X"));
+ menuEdit->Append (wxID_COPY, _("&Copy\tCtrl+C"));
+ menuEdit->Append (wxID_PASTE, _("&Paste\tCtrl+V"));
+ menuEdit->Append (wxID_CLEAR, _("&Delete\tDel"));
+ menuEdit->AppendSeparator();
+ menuEdit->Append (wxID_FIND, _("&Find\tCtrl+F"));
+ menuEdit->Enable (wxID_FIND, false);
+ menuEdit->Append (myID_FINDNEXT, _("Find &next\tF3"));
+ menuEdit->Enable (myID_FINDNEXT, false);
+ menuEdit->Append (myID_REPLACE, _("&Replace\tCtrl+H"));
+ menuEdit->Enable (myID_REPLACE, false);
+ menuEdit->Append (myID_REPLACENEXT, _("Replace &again\tShift+F4"));
+ menuEdit->Enable (myID_REPLACENEXT, false);
+ menuEdit->AppendSeparator();
+ menuEdit->Append (myID_BRACEMATCH, _("&Match brace\tCtrl+M"));
+ menuEdit->Append (myID_GOTO, _("&Goto\tCtrl+G"));
+ menuEdit->Enable (myID_GOTO, false);
+ menuEdit->AppendSeparator();
+ menuEdit->Append (myID_INDENTINC, _("&Indent increase\tTab"));
+ menuEdit->Append (myID_INDENTRED, _("I&ndent reduce\tShift+Tab"));
+ menuEdit->AppendSeparator();
+ menuEdit->Append (wxID_SELECTALL, _("&Select all\tCtrl+A"));
+ menuEdit->Append (myID_SELECTLINE, _("Select &line\tCtrl+L"));
+
+ // hilight submenu
+ wxMenu *menuHilight = new wxMenu;
+ int Nr;
+ for (Nr = 0; Nr < g_LanguagePrefsSize; Nr++) {
+ menuHilight->Append (myID_HILIGHTFIRST + Nr,
+ g_LanguagePrefs [Nr].name);
+ }
+
+ // charset submenu
+ wxMenu *menuCharset = new wxMenu;
+ menuCharset->Append (myID_CHARSETANSI, _("&ANSI (Windows)"));
+ menuCharset->Append (myID_CHARSETMAC, _("&MAC (Macintosh)"));
+
+ // View menu
+ wxMenu *menuView = new wxMenu;
+ menuView->Append (myID_HILIGHTLANG, _("&Hilight language .."), menuHilight);
+ menuView->AppendSeparator();
+ menuView->AppendCheckItem (myID_FOLDTOGGLE, _("&Toggle current fold\tCtrl+T"));
+ menuView->AppendCheckItem (myID_OVERTYPE, _("&Overwrite mode\tIns"));
+ menuView->AppendCheckItem (myID_WRAPMODEON, _("&Wrap mode\tCtrl+U"));
+ menuView->AppendSeparator();
+ menuView->AppendCheckItem (myID_DISPLAYEOL, _("Show line &endings"));
+ menuView->AppendCheckItem (myID_INDENTGUIDE, _("Show &indent guides"));
+ menuView->AppendCheckItem (myID_LINENUMBER, _("Show line &numbers"));
+ menuView->AppendCheckItem (myID_LONGLINEON, _("Show &long line marker"));
+ menuView->AppendCheckItem (myID_WHITESPACE, _("Show white&space"));
+ menuView->AppendSeparator();
+ menuView->Append (myID_USECHARSET, _("Use &code page of .."), menuCharset);
+
+ // Annotations menu
+ wxMenu* menuAnnotations = new wxMenu;
+ menuAnnotations->Append(myID_ANNOTATION_ADD, _("&Add or edit an annotation..."),
+ _("Add an annotation for the current line"));
+ menuAnnotations->Append(myID_ANNOTATION_REMOVE, _("&Remove annotation"),
+ _("Remove the annotation for the current line"));
+ menuAnnotations->Append(myID_ANNOTATION_CLEAR, _("&Clear all annotations"));
+
+ wxMenu* menuAnnotationsStyle = new wxMenu;
+ menuAnnotationsStyle->AppendRadioItem(myID_ANNOTATION_STYLE_HIDDEN, _("&Hidden"));
+ menuAnnotationsStyle->AppendRadioItem(myID_ANNOTATION_STYLE_STANDARD, _("&Standard"));
+ menuAnnotationsStyle->AppendRadioItem(myID_ANNOTATION_STYLE_BOXED, _("&Boxed"));
+ menuAnnotations->AppendSubMenu(menuAnnotationsStyle, "&Style");
+
+ // change case submenu
+ wxMenu *menuChangeCase = new wxMenu;
+ menuChangeCase->Append (myID_CHANGEUPPER, _("&Upper case"));
+ menuChangeCase->Append (myID_CHANGELOWER, _("&Lower case"));
+
+ // convert EOL submenu
+ wxMenu *menuConvertEOL = new wxMenu;
+ menuConvertEOL->Append (myID_CONVERTCR, _("CR (&Linux)"));
+ menuConvertEOL->Append (myID_CONVERTCRLF, _("CR+LF (&Windows)"));
+ menuConvertEOL->Append (myID_CONVERTLF, _("LF (&Macintosh)"));
+
+ // Extra menu
+ wxMenu *menuExtra = new wxMenu;
+ menuExtra->AppendCheckItem (myID_READONLY, _("&Readonly mode"));
+ menuExtra->AppendSeparator();
+ menuExtra->Append (myID_CHANGECASE, _("Change &case to .."), menuChangeCase);
+ menuExtra->AppendSeparator();
+ menuExtra->Append (myID_CONVERTEOL, _("Convert line &endings to .."), menuConvertEOL);
+
+ // Window menu
+ wxMenu *menuWindow = new wxMenu;
+ menuWindow->Append (myID_PAGEPREV, _("&Previous\tCtrl+Shift+Tab"));
+ menuWindow->Append (myID_PAGENEXT, _("&Next\tCtrl+Tab"));
+ menuWindow->Append(myID_WINDOW_MINIMAL, _("&Minimal editor"));
+
+ // Help menu
+ wxMenu *menuHelp = new wxMenu;
+ menuHelp->Append (wxID_ABOUT, _("&About ..\tCtrl+D"));
+
+ // construct menu
+ m_menuBar->Append (menuFile, _("&File"));
+ m_menuBar->Append (menuEdit, _("&Edit"));
+ m_menuBar->Append (menuView, _("&View"));
+ m_menuBar->Append (menuAnnotations, _("&Annotations"));
+ m_menuBar->Append (menuExtra, _("E&xtra"));
+ m_menuBar->Append (menuWindow, _("&Window"));
+ m_menuBar->Append (menuHelp, _("&Help"));
+ SetMenuBar (m_menuBar);
+
+ m_menuBar->Check(myID_ANNOTATION_STYLE_BOXED, true);