]> git.saurik.com Git - wxWidgets.git/blob - src/os2/print.cpp
Busy cursor don't need wxYield(), SendIdleEvents()
[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 #if wxUSE_PRINTING_ARCHITECTURE
23
24 #include "wx/os2/print.h"
25 #include "wx/generic/prntdlgg.h"
26
27 IMPLEMENT_DYNAMIC_CLASS(wxPrinter, wxPrinterBase)
28 IMPLEMENT_CLASS(wxPrintPreview, wxPrintPreviewBase)
29
30 /*
31 * Printer
32 */
33
34 wxPrinter::wxPrinter(wxPrintData *data):
35 wxPrinterBase((wxPrintDialogData*)data)
36 {
37 }
38
39 wxPrinter::~wxPrinter()
40 {
41 }
42
43 bool wxPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
44 {
45 // TODO. See wxPostScriptPrinter::Print for hints.
46 return FALSE;
47 }
48
49 wxDC* wxPrinter::PrintDialog(wxWindow *parent)
50 {
51 // TODO:
52 /*
53 wxPrintDialog dialog(parent, & m_printData);
54 return (dialog.GetPrintDC());
55 */
56 return NULL;
57 }
58
59 bool wxPrinter::Setup(wxWindow *parent)
60 {
61 // TODO:
62 /*
63 wxPrintDialog dialog(parent, & m_printData);
64 dialog.GetPrintData().SetSetupDialog(TRUE);
65 return (dialog.ShowModal() == wxID_OK);
66 */
67 return FALSE;
68 }
69
70 /*
71 * Print preview
72 */
73
74 wxPrintPreview::wxPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting, wxPrintData *data):
75 wxPrintPreviewBase(printout, printoutForPrinting, data)
76 {
77 DetermineScaling();
78 }
79
80 wxPrintPreview::~wxPrintPreview()
81 {
82 }
83
84 bool wxPrintPreview::Print(bool interactive)
85 {
86 if (!m_printPrintout)
87 return FALSE;
88 // wxPrinter printer(&m_printData);
89 // return printer.Print(m_previewFrame, m_printPrintout, interactive);
90 return FALSE;
91 }
92
93 void wxPrintPreview::DetermineScaling()
94 {
95 // TODO
96 }
97
98 #endif //wxUSE_PRINTING_ARCHITECTURE