Improve the menus.
Added accelerators; use radio items for mututally exclusive choices. No real changes otherwise. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: printing.cpp
|
||||
// Purpose: wxHtml sample: wxHtmlEasyPrinting test
|
||||
// Author: ?
|
||||
// Modified by:
|
||||
// Created: ?
|
||||
// Author: Vaclav Slavik
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Copyright: (c) 1998-2009 wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -181,23 +179,23 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
menuFile->Append(Minimal_Open, _("Open...\tCtrl-O"));
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->Append(Minimal_PageSetup, _("Page Setup"));
|
||||
menuFile->Append(Minimal_Print, _("Print..."));
|
||||
menuFile->Append(Minimal_Preview, _("Preview..."));
|
||||
menuFile->Append(Minimal_PageSetup, _("Page &Setup"));
|
||||
menuFile->Append(Minimal_Preview, _("Print pre&view..."));
|
||||
menuFile->Append(Minimal_Print, _("Print...\tCtrl-P"));
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->Append(wxID_ABOUT, _("&About"));
|
||||
menuFile->AppendSeparator();
|
||||
menuFile->Append(Minimal_Quit, _("&Exit"));
|
||||
|
||||
wxMenu *testFile = new wxMenu;
|
||||
testFile->Append(Minimal_PrintSmall, _("Small Printer Fonts"));
|
||||
testFile->Append(Minimal_PrintNormal, _("Normal Printer Fonts"));
|
||||
testFile->Append(Minimal_PrintHuge, _("Huge Printer Fonts"));
|
||||
wxMenu *menuFonts = new wxMenu;
|
||||
menuFonts->AppendRadioItem(Minimal_PrintSmall, _("&Small Printer Fonts"));
|
||||
menuFonts->AppendRadioItem(Minimal_PrintNormal, _("&Normal Printer Fonts"));
|
||||
menuFonts->AppendRadioItem(Minimal_PrintHuge, _("&Huge Printer Fonts"));
|
||||
|
||||
// now append the freshly created menu to the menu bar...
|
||||
wxMenuBar *menuBar = new wxMenuBar;
|
||||
menuBar->Append(menuFile, _("&File"));
|
||||
menuBar->Append(testFile, _("&Test"));
|
||||
menuBar->Append(menuFonts, _("F&onts"));
|
||||
|
||||
// ... and attach this menu bar to the frame
|
||||
SetMenuBar(menuBar);
|
||||
|
Reference in New Issue
Block a user