]>
Commit | Line | Data |
---|---|---|
93cf77c0 JS |
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 | ||
34138703 JS |
16 | #include "wx/stubs/print.h" |
17 | #include "wx/stubs/printdlg.h" | |
93cf77c0 | 18 | |
93cf77c0 | 19 | IMPLEMENT_DYNAMIC_CLASS(wxPrinter, wxPrinterBase) |
34138703 | 20 | IMPLEMENT_CLASS(wxPrintPreview, wxPrintPreviewBase) |
93cf77c0 JS |
21 | |
22 | /* | |
23 | * Printer | |
24 | */ | |
25 | ||
26 | wxPrinter::wxPrinter(wxPrintData *data): | |
27 | wxPrinterBase(data) | |
28 | { | |
29 | } | |
30 | ||
31 | wxPrinter::~wxPrinter() | |
32 | { | |
33 | } | |
34 | ||
35 | bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) | |
36 | { | |
37 | // TODO. See wxPostScriptPrinter::Print for hints. | |
38 | return FALSE; | |
39 | } | |
40 | ||
41 | bool wxPrinter::PrintDialog(wxWindow *parent) | |
42 | { | |
7f555861 | 43 | wxPrintDialog dialog(parent, & m_printData); |
93cf77c0 JS |
44 | return (dialog.ShowModal() == wxID_OK); |
45 | } | |
46 | ||
47 | bool wxPrinter::Setup(wxWindow *parent) | |
48 | { | |
7f555861 | 49 | wxPrintDialog dialog(parent, & m_printData); |
93cf77c0 JS |
50 | dialog.GetPrintData().SetSetupDialog(TRUE); |
51 | return (dialog.ShowModal() == wxID_OK); | |
52 | } | |
53 | ||
54 | /* | |
55 | * Print preview | |
56 | */ | |
57 | ||
34138703 | 58 | wxPrintPreview::wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data): |
93cf77c0 JS |
59 | wxPrintPreviewBase(printout, printoutForPrinting, data) |
60 | { | |
61 | DetermineScaling(); | |
62 | } | |
63 | ||
34138703 | 64 | wxPrintPreview::~wxPrintPreview() |
93cf77c0 JS |
65 | { |
66 | } | |
67 | ||
34138703 | 68 | bool wxPrintPreview::Print(bool interactive) |
93cf77c0 | 69 | { |
7f555861 | 70 | if (!m_printPrintout) |
93cf77c0 | 71 | return FALSE; |
7f555861 JS |
72 | wxPrinter printer(&m_printData); |
73 | return printer.Print(m_previewFrame, m_printPrintout, interactive); | |
93cf77c0 JS |
74 | } |
75 | ||
34138703 | 76 | void wxPrintPreview::DetermineScaling() |
93cf77c0 JS |
77 | { |
78 | // TODO | |
79 | } | |
80 |