]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/print.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Print framework
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
23 #include "wx/os2/print.h"
25 #include "wx/generic/printdlg.h"
27 #if !USE_SHARED_LIBRARY
28 IMPLEMENT_DYNAMIC_CLASS(wxPrinter
, wxPrinterBase
)
29 IMPLEMENT_CLASS(wxPrintPreview
, wxPrintPreviewBase
)
36 wxPrinter::wxPrinter(wxPrintData
*data
):
41 wxPrinter::~wxPrinter()
45 bool wxPrinter::Print(wxWindow
*parent
, wxPrintout
*printout
, bool prompt
)
47 // TODO. See wxPostScriptPrinter::Print for hints.
51 bool wxPrinter::PrintDialog(wxWindow
*parent
)
53 wxPrintDialog
dialog(parent
, & m_printData
);
54 return (dialog
.ShowModal() == wxID_OK
);
57 bool wxPrinter::Setup(wxWindow
*parent
)
59 wxPrintDialog
dialog(parent
, & m_printData
);
60 dialog
.GetPrintData().SetSetupDialog(TRUE
);
61 return (dialog
.ShowModal() == wxID_OK
);
68 wxPrintPreview::wxPrintPreview(wxPrintout
*printout
, wxPrintout
*printoutForPrinting
, wxPrintData
*data
):
69 wxPrintPreviewBase(printout
, printoutForPrinting
, data
)
74 wxPrintPreview::~wxPrintPreview()
78 bool wxPrintPreview::Print(bool interactive
)
82 wxPrinter
printer(&m_printData
);
83 return printer
.Print(m_previewFrame
, m_printPrintout
, interactive
);
86 void wxPrintPreview::DetermineScaling()