]>
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 #if !USE_SHARED_LIBRARY
27 IMPLEMENT_DYNAMIC_CLASS(wxPrinter
, wxPrinterBase
)
28 IMPLEMENT_CLASS(wxPrintPreview
, wxPrintPreviewBase
)
35 wxPrinter::wxPrinter(wxPrintData
*data
):
36 wxPrinterBase((wxPrintDialogData
*)data
)
40 wxPrinter::~wxPrinter()
44 bool wxPrinter::Print(wxWindow
*parent
, wxPrintout
*printout
, bool prompt
)
46 // TODO. See wxPostScriptPrinter::Print for hints.
50 wxDC
* wxPrinter::PrintDialog(wxWindow
*parent
)
54 wxPrintDialog dialog(parent, & m_printData);
55 return (dialog.GetPrintDC());
60 bool wxPrinter::Setup(wxWindow
*parent
)
64 wxPrintDialog dialog(parent, & m_printData);
65 dialog.GetPrintData().SetSetupDialog(TRUE);
66 return (dialog.ShowModal() == wxID_OK);
75 wxPrintPreview::wxPrintPreview(wxPrintout
*printout
, wxPrintout
*printoutForPrinting
, wxPrintData
*data
):
76 wxPrintPreviewBase(printout
, printoutForPrinting
, data
)
81 wxPrintPreview::~wxPrintPreview()
85 bool wxPrintPreview::Print(bool interactive
)
89 // wxPrinter printer(&m_printData);
90 // return printer.Print(m_previewFrame, m_printPrintout, interactive);
94 void wxPrintPreview::DetermineScaling()