]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/stubs/print.cpp
Added missing include for non-precompiled headers.
[wxWidgets.git] / src / stubs / print.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: print.cpp
3// Purpose: Print framework
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifdef __GNUG__
13#pragma implementation "print.h"
14#endif
15
16#include "wx/stubs/print.h"
17#include "wx/stubs/printdlg.h"
18
19IMPLEMENT_DYNAMIC_CLASS(wxPrinter, wxPrinterBase)
20IMPLEMENT_CLASS(wxPrintPreview, wxPrintPreviewBase)
21
22/*
23 * Printer
24 */
25
26wxPrinter::wxPrinter(wxPrintData *data):
27 wxPrinterBase(data)
28{
29}
30
31wxPrinter::~wxPrinter()
32{
33}
34
35bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
36{
37 // TODO. See wxPostScriptPrinter::Print for hints.
38 return FALSE;
39}
40
41bool wxPrinter::PrintDialog(wxWindow *parent)
42{
43 wxPrintDialog dialog(parent, & m_printData);
44 return (dialog.ShowModal() == wxID_OK);
45}
46
47bool wxPrinter::Setup(wxWindow *parent)
48{
49 wxPrintDialog dialog(parent, & m_printData);
50 dialog.GetPrintData().SetSetupDialog(TRUE);
51 return (dialog.ShowModal() == wxID_OK);
52}
53
54/*
55 * Print preview
56 */
57
58wxPrintPreview::wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data):
59 wxPrintPreviewBase(printout, printoutForPrinting, data)
60{
61 DetermineScaling();
62}
63
64wxPrintPreview::~wxPrintPreview()
65{
66}
67
68bool wxPrintPreview::Print(bool interactive)
69{
70 if (!m_printPrintout)
71 return FALSE;
72 wxPrinter printer(&m_printData);
73 return printer.Print(m_previewFrame, m_printPrintout, interactive);
74}
75
76void wxPrintPreview::DetermineScaling()
77{
78 // TODO
79}
80