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