#ifndef WX_PRECOMP
#include "wx/wx.h"
-#include "wx/postscrp.h"
#endif
#if !wxUSE_PRINTING_ARCHITECTURE
void MyFrame::OnPrint(wxCommandEvent& WXUNUSED(event))
{
-#ifdef __WXMSW__
- wxGetApp().SetPrintMode(wxPRINT_WINDOWS);
-#else
- wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
-#endif
wxPrinter printer;
MyPrintout printout("My printout");
if (!printer.Print(this, &printout, TRUE))
void MyFrame::OnPrintPreview(wxCommandEvent& WXUNUSED(event))
{
-#ifdef __WXMSW__
- wxGetApp().SetPrintMode(wxPRINT_WINDOWS);
-#else
- wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
-#endif
wxPrintData printData;
printData.SetOrientation(orientation);
void MyFrame::OnPrintSetup(wxCommandEvent& WXUNUSED(event))
{
-#ifdef __WXMSW__
- wxGetApp().SetPrintMode(wxPRINT_WINDOWS);
-#else
- wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
-#endif
wxPrintData data;
data.SetOrientation(orientation);
-#ifdef __WXMSW__
wxPrintDialog printerDialog(this, & data);
-#else
- wxGenericPrintDialog printerDialog(this, & data);
-#endif
+
printerDialog.GetPrintData().SetSetupDialog(TRUE);
printerDialog.ShowModal();
void MyFrame::OnPageSetup(wxCommandEvent& WXUNUSED(event))
{
-#ifdef __WXMSW__
- wxGetApp().SetPrintMode(wxPRINT_WINDOWS);
-#else
- wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
-#endif
wxPageSetupData data;
data.SetOrientation(orientation);
-#ifdef __WXMSW__
wxPageSetupDialog pageSetupDialog(this, & data);
-#else
- wxGenericPageSetupDialog pageSetupDialog(this, & data);
-#endif
pageSetupDialog.ShowModal();
data = pageSetupDialog.GetPageSetupData();
#if defined(__WXMSW__) && wxTEST_POSTSCRIPT_IN_MSW
void MyFrame::OnPrintPS(wxCommandEvent& WXUNUSED(event))
{
- wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
-
wxPostScriptPrinter printer;
MyPrintout printout("My printout");
printer.Print(this, &printout, TRUE);
void MyFrame::OnPrintPreviewPS(wxCommandEvent& WXUNUSED(event))
{
- wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
-
wxPrintData printData;
printData.SetOrientation(orientation);
void MyFrame::OnPrintSetupPS(wxCommandEvent& WXUNUSED(event))
{
- wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
-
wxPrintData data;
data.SetOrientation(orientation);
void MyFrame::OnPageSetupPS(wxCommandEvent& WXUNUSED(event))
{
- wxGetApp().SetPrintMode(wxPRINT_POSTSCRIPT);
-
wxPageSetupData data;
data.SetOrientation(orientation);
dc.DrawLine(0, 0, 200, 200);
dc.DrawLine(200, 0, 0, 200);
- wxIcon my_icon( wxICON(mondrian) );
+ wxIcon my_icon = wxICON(mondrian) ;
dc.DrawIcon( my_icon, 100, 100);
}