]>
git.saurik.com Git - wxWidgets.git/blob - src/stubs/print.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Print framework
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "print.h"
16 #include "wx/stubs/print.h"
17 #include "wx/stubs/printdlg.h"
19 IMPLEMENT_DYNAMIC_CLASS(wxPrinter
, wxPrinterBase
)
20 IMPLEMENT_CLASS(wxPrintPreview
, wxPrintPreviewBase
)
26 wxPrinter::wxPrinter(wxPrintData
*data
):
31 wxPrinter::~wxPrinter()
35 bool wxPrinter::Print(wxWindow
*parent
, wxPrintout
*printout
, bool prompt
)
37 // TODO. See wxPostScriptPrinter::Print for hints.
41 bool wxPrinter::PrintDialog(wxWindow
*parent
)
43 wxPrintDialog
dialog(parent
, & m_printData
);
44 return (dialog
.ShowModal() == wxID_OK
);
47 bool wxPrinter::Setup(wxWindow
*parent
)
49 wxPrintDialog
dialog(parent
, & m_printData
);
50 dialog
.GetPrintData().SetSetupDialog(TRUE
);
51 return (dialog
.ShowModal() == wxID_OK
);
58 wxPrintPreview::wxPrintPreview(wxPrintout
*printout
, wxPrintout
*printoutForPrinting
, wxPrintData
*data
):
59 wxPrintPreviewBase(printout
, printoutForPrinting
, data
)
64 wxPrintPreview::~wxPrintPreview()
68 bool wxPrintPreview::Print(bool interactive
)
72 wxPrinter
printer(&m_printData
);
73 return printer
.Print(m_previewFrame
, m_printPrintout
, interactive
);
76 void wxPrintPreview::DetermineScaling()