]>
git.saurik.com Git - wxWidgets.git/blob - src/stubs/print.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Print framework
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "print.h"
16 #include "wx/stubs/print.h"
17 #include "wx/stubs/printdlg.h"
19 #if !USE_SHARED_LIBRARY
20 IMPLEMENT_DYNAMIC_CLASS(wxPrinter
, wxPrinterBase
)
21 IMPLEMENT_CLASS(wxPrintPreview
, wxPrintPreviewBase
)
28 wxPrinter::wxPrinter(wxPrintData
*data
):
33 wxPrinter::~wxPrinter()
37 bool wxPrinter::Print(wxWindow
*parent
, wxPrintout
*printout
, bool prompt
)
39 // TODO. See wxPostScriptPrinter::Print for hints.
43 bool wxPrinter::PrintDialog(wxWindow
*parent
)
45 wxPrintDialog
dialog(parent
, & m_printData
);
46 return (dialog
.ShowModal() == wxID_OK
);
49 bool wxPrinter::Setup(wxWindow
*parent
)
51 wxPrintDialog
dialog(parent
, & m_printData
);
52 dialog
.GetPrintData().SetSetupDialog(TRUE
);
53 return (dialog
.ShowModal() == wxID_OK
);
60 wxPrintPreview::wxPrintPreview(wxPrintout
*printout
, wxPrintout
*printoutForPrinting
, wxPrintData
*data
):
61 wxPrintPreviewBase(printout
, printoutForPrinting
, data
)
66 wxPrintPreview::~wxPrintPreview()
70 bool wxPrintPreview::Print(bool interactive
)
74 wxPrinter
printer(&m_printData
);
75 return printer
.Print(m_previewFrame
, m_printPrintout
, interactive
);
78 void wxPrintPreview::DetermineScaling()