]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/print.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Print framework
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
22 #if wxUSE_PRINTING_ARCHITECTURE
24 #include "wx/os2/print.h"
25 #include "wx/generic/prntdlgg.h"
27 IMPLEMENT_DYNAMIC_CLASS(wxOS2Printer
, wxPrinterBase
)
28 IMPLEMENT_CLASS(wxOS2PrintPreview
, wxPrintPreviewBase
)
34 wxOS2Printer::wxOS2Printer(wxPrintData
*data
):
35 wxPrinterBase((wxPrintDialogData
*)data
)
39 wxOS2Printer::~wxOS2Printer()
43 bool wxOS2Printer::Print(wxWindow
*parent
, wxPrintout
*printout
, bool prompt
)
45 // TODO. See wxPostScriptPrinter::Print for hints.
49 wxDC
* wxOS2Printer::PrintDialog(wxWindow
*parent
)
53 wxPrintDialog dialog(parent, & m_printData);
54 return (dialog.GetPrintDC());
59 bool wxOS2Printer::Setup(wxWindow
*parent
)
63 wxPrintDialog dialog(parent, & m_printData);
64 dialog.GetPrintData().SetSetupDialog(TRUE);
65 return (dialog.ShowModal() == wxID_OK);
74 wxOS2PrintPreview::wxOS2PrintPreview(wxPrintout
*printout
, wxPrintout
*printoutForPrinting
, wxPrintData
*data
):
75 wxPrintPreviewBase(printout
, printoutForPrinting
, data
)
80 wxOS2PrintPreview::~wxOS2PrintPreview()
84 bool wxOS2PrintPreview::Print(bool interactive
)
88 // wxPrinter printer(&m_printData);
89 // return printer.Print(m_previewFrame, m_printPrintout, interactive);
93 void wxOS2PrintPreview::DetermineScaling()
98 #endif //wxUSE_PRINTING_ARCHITECTURE