]>
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(wxPrinter
, wxPrinterBase
)
28 IMPLEMENT_CLASS(wxPrintPreview
, wxPrintPreviewBase
)
34 wxPrinter::wxPrinter(wxPrintData
*data
):
35 wxPrinterBase((wxPrintDialogData
*)data
)
39 wxPrinter::~wxPrinter()
43 bool wxPrinter::Print(wxWindow
*parent
, wxPrintout
*printout
, bool prompt
)
45 // TODO. See wxPostScriptPrinter::Print for hints.
49 wxDC
* wxPrinter::PrintDialog(wxWindow
*parent
)
53 wxPrintDialog dialog(parent, & m_printData);
54 return (dialog.GetPrintDC());
59 bool wxPrinter::Setup(wxWindow
*parent
)
63 wxPrintDialog dialog(parent, & m_printData);
64 dialog.GetPrintData().SetSetupDialog(TRUE);
65 return (dialog.ShowModal() == wxID_OK);
74 wxPrintPreview::wxPrintPreview(wxPrintout
*printout
, wxPrintout
*printoutForPrinting
, wxPrintData
*data
):
75 wxPrintPreviewBase(printout
, printoutForPrinting
, data
)
80 wxPrintPreview::~wxPrintPreview()
84 bool wxPrintPreview::Print(bool interactive
)
88 // wxPrinter printer(&m_printData);
89 // return printer.Print(m_previewFrame, m_printPrintout, interactive);
93 void wxPrintPreview::DetermineScaling()
98 #endif //wxUSE_PRINTING_ARCHITECTURE