]> git.saurik.com Git - wxWidgets.git/blob - src/os2/print.cpp
New frame class
[wxWidgets.git] / src / os2 / print.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: print.cpp
3 // Purpose: Print framework
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/14/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "wx/wxprec.h"
13
14 #ifndef WX_PRECOMP
15 #include <stdio.h>
16 #include "wx/setup.h"
17 #include "wx/list.h"
18 #include "wx/utils.h"
19 #include "wx/app.h"
20 #endif
21
22
23 #include "wx/os2/print.h"
24 #include "wx/generic/prntdlgg.h"
25
26 IMPLEMENT_DYNAMIC_CLASS(wxPrinter, wxPrinterBase)
27 IMPLEMENT_CLASS(wxPrintPreview, wxPrintPreviewBase)
28
29 /*
30 * Printer
31 */
32
33 wxPrinter::wxPrinter(wxPrintData *data):
34 wxPrinterBase((wxPrintDialogData*)data)
35 {
36 }
37
38 wxPrinter::~wxPrinter()
39 {
40 }
41
42 bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
43 {
44 // TODO. See wxPostScriptPrinter::Print for hints.
45 return FALSE;
46 }
47
48 wxDC* wxPrinter::PrintDialog(wxWindow *parent)
49 {
50 // TODO:
51 /*
52 wxPrintDialog dialog(parent, & m_printData);
53 return (dialog.GetPrintDC());
54 */
55 return NULL;
56 }
57
58 bool wxPrinter::Setup(wxWindow *parent)
59 {
60 // TODO:
61 /*
62 wxPrintDialog dialog(parent, & m_printData);
63 dialog.GetPrintData().SetSetupDialog(TRUE);
64 return (dialog.ShowModal() == wxID_OK);
65 */
66 return FALSE;
67 }
68
69 /*
70 * Print preview
71 */
72
73 wxPrintPreview::wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data):
74 wxPrintPreviewBase(printout, printoutForPrinting, data)
75 {
76 DetermineScaling();
77 }
78
79 wxPrintPreview::~wxPrintPreview()
80 {
81 }
82
83 bool wxPrintPreview::Print(bool interactive)
84 {
85 if (!m_printPrintout)
86 return FALSE;
87 // wxPrinter printer(&m_printData);
88 // return printer.Print(m_previewFrame, m_printPrintout, interactive);
89 return FALSE;
90 }
91
92 void wxPrintPreview::DetermineScaling()
93 {
94 // TODO
95 }
96