]>
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/printos2.h"
25 #include "wx/generic/prntdlgg.h"
27 IMPLEMENT_DYNAMIC_CLASS(wxOS2Printer
, wxPrinterBase
)
28 IMPLEMENT_CLASS(wxOS2PrintPreview
, wxPrintPreviewBase
)
34 wxOS2Printer::wxOS2Printer(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
, wxPrintDialogData
*data
):
75 wxPrintPreviewBase(printout
, printoutForPrinting
, data
)
80 wxOS2PrintPreview::wxOS2PrintPreview(wxPrintout
*printout
, wxPrintout
*printoutForPrinting
, wxPrintData
*data
):
81 wxPrintPreviewBase(printout
, printoutForPrinting
, data
)
86 wxOS2PrintPreview::~wxOS2PrintPreview()
90 bool wxOS2PrintPreview::Print(bool interactive
)
94 // wxOS2Printer printer(&m_printData);
95 // return printer.Print(m_previewFrame, m_printPrintout, interactive);
99 void wxOS2PrintPreview::DetermineScaling()
104 #endif //wxUSE_PRINTING_ARCHITECTURE