]>
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"
23 #include "wx/os2/print.h"
24 #include "wx/generic/prntdlgg.h"
26 IMPLEMENT_DYNAMIC_CLASS(wxPrinter
, wxPrinterBase
)
27 IMPLEMENT_CLASS(wxPrintPreview
, wxPrintPreviewBase
)
33 wxPrinter::wxPrinter(wxPrintData
*data
):
34 wxPrinterBase((wxPrintDialogData
*)data
)
38 wxPrinter::~wxPrinter()
42 bool wxPrinter::Print(wxWindow
*parent
, wxPrintout
*printout
, bool prompt
)
44 // TODO. See wxPostScriptPrinter::Print for hints.
48 wxDC
* wxPrinter::PrintDialog(wxWindow
*parent
)
52 wxPrintDialog dialog(parent, & m_printData);
53 return (dialog.GetPrintDC());
58 bool wxPrinter::Setup(wxWindow
*parent
)
62 wxPrintDialog dialog(parent, & m_printData);
63 dialog.GetPrintData().SetSetupDialog(TRUE);
64 return (dialog.ShowModal() == wxID_OK);
73 wxPrintPreview::wxPrintPreview(wxPrintout
*printout
, wxPrintout
*printoutForPrinting
, wxPrintData
*data
):
74 wxPrintPreviewBase(printout
, printoutForPrinting
, data
)
79 wxPrintPreview::~wxPrintPreview()
83 bool wxPrintPreview::Print(bool interactive
)
87 // wxPrinter printer(&m_printData);
88 // return printer.Print(m_previewFrame, m_printPrintout, interactive);
92 void wxPrintPreview::DetermineScaling()