/////////////////////////////////////////////////////////////////////////////
// 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
/////////////////////////////////////////////////////////////////////////////
MyFrame *frame = new MyFrame(_("Printing test"),
wxDefaultPosition, wxSize(640, 480));
- // Show it and tell the application that it's our main window
- // @@@ what does it do exactly, in fact? is it necessary here?
+ // Show it
frame->Show(true);
- SetTopWindow(frame);
-
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned false here, the
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);
// frame destructor
MyFrame::~MyFrame()
{
- delete m_Prn;
- m_Prn = (wxHtmlEasyPrinting *) NULL;
+ wxDELETE(m_Prn);
}