]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/printing/printing.cpp
various cleanups
[wxWidgets.git] / samples / printing / printing.cpp
index 8e5477c0af7e97d275c2920c269b54e961cad181..827ed78269d0fc2c764b569f7f751445f7c6f328 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        printing.cpp
-// Purpose:     Printing demo for wxWindows
+// Purpose:     Printing demo for wxWidgets
 // Author:      Julian Smart
 // Modified by:
 // Created:     1995
@@ -66,10 +66,6 @@ IMPLEMENT_APP(MyApp)
 // Writes a header on a page. Margin units are in millimetres.
 bool WritePageHeader(wxPrintout *printout, wxDC *dc, wxChar *text, float mmToLogical);
 
-MyApp::MyApp()
-{
-}
-
 // The `main program' equivalent, creating the windows and returning the
 // main frame
 bool MyApp::OnInit(void)
@@ -80,10 +76,12 @@ bool MyApp::OnInit(void)
     g_pageSetupData = new wxPageSetupDialogData;
 
     // Create the main frame window
-    frame = new MyFrame((wxFrame *) NULL, _T("wxWindows Printing Demo"), wxPoint(0, 0), wxSize(400, 400));
+    frame = new MyFrame((wxFrame *) NULL, _T("wxWidgets Printing Demo"), wxPoint(0, 0), wxSize(400, 400));
 
+#if wxUSE_STATUSBAR
     // Give it a status line
     frame->CreateStatusBar(2);
+#endif // wxUSE_STATUSBAR
 
     // Load icon and bitmap
     frame->SetIcon( wxICON( mondrian) );
@@ -135,7 +133,9 @@ bool MyApp::OnInit(void)
     frame->Centre(wxBOTH);
     frame->Show();
 
+#if wxUSE_STATUSBAR
     frame->SetStatusText(_T("Printing demo"));
+#endif // wxUSE_STATUSBAR
 
     SetTopWindow(frame);
 
@@ -282,8 +282,8 @@ void MyFrame::OnPageSetupPS(wxCommandEvent& WXUNUSED(event))
 
 void MyFrame::OnPrintAbout(wxCommandEvent& WXUNUSED(event))
 {
-    (void)wxMessageBox(_T("wxWindows printing demo\nAuthor: Julian Smart"),
-        _T("About wxWindows printing demo"), wxOK|wxCENTRE);
+    (void)wxMessageBox(_T("wxWidgets printing demo\nAuthor: Julian Smart"),
+        _T("About wxWidgets printing demo"), wxOK|wxCENTRE);
 }
 
 void MyFrame::Draw(wxDC& dc)
@@ -336,10 +336,6 @@ MyCanvas::MyCanvas(wxFrame *frame, const wxPoint& pos, const wxSize& size, long
     SetBackgroundColour(* wxWHITE);
 }
 
-MyCanvas::~MyCanvas(void)
-{
-}
-
 // Define the repainting behaviour
 void MyCanvas::OnDraw(wxDC& dc)
 {
@@ -547,6 +543,7 @@ dc->SetFont(headerFont);
     int pageWidthMM, pageHeightMM;
 
     printout->GetPageSizeMM(&pageWidthMM, &pageHeightMM);
+    wxUnusedVar(pageHeightMM);
 
     int leftMargin = 10;
     int topMargin = 10;