]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/prntdlgg.h
The last drops of WINE.
[wxWidgets.git] / include / wx / generic / prntdlgg.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: prntdlgg.h
3// Purpose: wxGenericPrintDialog, wxGenericPrintSetupDialog,
4// wxGenericPageSetupDialog
5// Author: Julian Smart
6// Modified by:
7// Created: 01/02/97
8// RCS-ID: $Id$
9// Copyright: (c)
d6b9496a 10// Licence: wxWindows licence
c801d85f
KB
11/////////////////////////////////////////////////////////////////////////////
12
13#ifndef __PRINTDLGH_G_
14#define __PRINTDLGH_G_
15
16#ifdef __GNUG__
d6b9496a 17 #pragma interface "prntdlgg.h"
c801d85f
KB
18#endif
19
20#include "wx/defs.h"
21#include "wx/dialog.h"
bf38cbff
JS
22#include "wx/dialog.h"
23
24#if wxUSE_POSTSCRIPT
d6b9496a 25 #include "wx/dcps.h"
bf38cbff 26#endif
c801d85f
KB
27
28class WXDLLEXPORT wxTextCtrl;
29class WXDLLEXPORT wxButton;
30class WXDLLEXPORT wxCheckBox;
31class WXDLLEXPORT wxChoice;
32class WXDLLEXPORT wxStaticText;
33class WXDLLEXPORT wxRadioBox;
5e9f4026 34class WXDLLEXPORT wxPrintSetupData;
c801d85f 35
d6b9496a
VZ
36// ----------------------------------------------------------------------------
37// constants
38// ----------------------------------------------------------------------------
c801d85f 39
d6b9496a 40// FIXME why all these enums start with 10 or 30?
c801d85f 41
d6b9496a
VZ
42enum
43{
44 wxPRINTID_STATIC = 10,
45 wxPRINTID_RANGE,
46 wxPRINTID_FROM,
47 wxPRINTID_TO,
48 wxPRINTID_COPIES,
49 wxPRINTID_PRINTTOFILE,
50 wxPRINTID_SETUP
51};
52
53enum
54{
55 wxPRINTID_LEFTMARGIN = 30,
56 wxPRINTID_RIGHTMARGIN,
57 wxPRINTID_TOPMARGIN,
58 wxPRINTID_BOTTOMMARGIN
59};
60
61enum
62{
63 wxPRINTID_PRINTCOLOUR = 10,
64 wxPRINTID_ORIENTATION,
65 wxPRINTID_COMMAND,
66 wxPRINTID_OPTIONS,
67 wxPRINTID_PAPERSIZE
68};
69
70// ----------------------------------------------------------------------------
71// Simulated Print and Print Setup dialogs for non-Windows platforms (and
72// Windows using PostScript print/preview)
73// ----------------------------------------------------------------------------
74
75class WXDLLEXPORT wxGenericPrintDialog : public wxDialog
c801d85f 76{
7bcb11d3 77 DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog)
d6b9496a 78
7bcb11d3 79public:
d6b9496a
VZ
80 wxGenericPrintDialog(wxWindow *parent,
81 wxPrintDialogData* data = (wxPrintDialogData*)NULL);
82 wxGenericPrintDialog(wxWindow *parent, wxPrintData* data);
83
84 virtual ~wxGenericPrintDialog();
7bcb11d3
JS
85
86 void OnSetup(wxCommandEvent& event);
87 void OnRange(wxCommandEvent& event);
88 void OnOK(wxCommandEvent& event);
d6b9496a 89
7bcb11d3
JS
90 virtual bool TransferDataFromWindow();
91 virtual bool TransferDataToWindow();
92
93 virtual int ShowModal();
94
d6b9496a
VZ
95#if wxUSE_POSTSCRIPT
96 wxPrintData& GetPrintData()
97 { return m_printDialogData.GetPrintData(); }
98#endif // wxUSE_POSTSCRIPT
99
100 wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
7bcb11d3
JS
101 wxDC *GetPrintDC();
102
103public:
58a33cb4 104// wxStaticText* m_printerMessage;
7bcb11d3 105 wxButton* m_setupButton;
58a33cb4 106// wxButton* m_helpButton;
7bcb11d3
JS
107 wxRadioBox* m_rangeRadioBox;
108 wxTextCtrl* m_fromText;
109 wxTextCtrl* m_toText;
110 wxTextCtrl* m_noCopiesText;
111 wxCheckBox* m_printToFileCheckBox;
58a33cb4 112// wxCheckBox* m_collateCopiesCheckBox;
d6b9496a 113
7bcb11d3 114 wxPrintDialogData m_printDialogData;
d6b9496a
VZ
115
116protected:
117 void Init(wxWindow *parent);
118
119private:
7bcb11d3 120 DECLARE_EVENT_TABLE()
c801d85f
KB
121};
122
d6b9496a 123class WXDLLEXPORT wxGenericPrintSetupDialog : public wxDialog
c801d85f 124{
7bcb11d3 125 DECLARE_CLASS(wxGenericPrintSetupDialog)
d6b9496a 126
7bcb11d3
JS
127public:
128 // There are no configuration options for the dialog, so we
129 // just pass the wxPrintData object (no wxPrintSetupDialogData class needed)
130 wxGenericPrintSetupDialog(wxWindow *parent, wxPrintData* data);
131 wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSetupData* data);
d6b9496a 132 virtual ~wxGenericPrintSetupDialog();
7bcb11d3
JS
133
134 void Init(wxPrintData* data);
135
136 virtual bool TransferDataFromWindow();
137 virtual bool TransferDataToWindow();
138
139 wxChoice *CreatePaperTypeChoice(int* x, int* y);
d6b9496a 140
7bcb11d3
JS
141public:
142 wxRadioBox* m_orientationRadioBox;
143 wxTextCtrl* m_printerCommandText;
144 wxTextCtrl* m_printerOptionsText;
145 wxCheckBox* m_colourCheckBox;
146 wxChoice* m_paperTypeChoice;
d6b9496a 147
5e9f4026 148#if wxUSE_POSTSCRIPT
7bcb11d3 149 wxPrintData m_printData;
d6b9496a
VZ
150 wxPrintData& GetPrintData() { return m_printData; }
151#endif // wxUSE_POSTSCRIPT
c801d85f
KB
152};
153
d6b9496a 154class WXDLLEXPORT wxGenericPageSetupDialog : public wxDialog
c801d85f 155{
7bcb11d3 156 DECLARE_CLASS(wxGenericPageSetupDialog)
d6b9496a 157
7bcb11d3
JS
158public:
159 wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = (wxPageSetupData*) NULL);
d6b9496a 160 virtual ~wxGenericPageSetupDialog();
7bcb11d3
JS
161
162 virtual bool TransferDataFromWindow();
163 virtual bool TransferDataToWindow();
164
165 void OnPrinter(wxCommandEvent& event);
d6b9496a 166
7bcb11d3 167 wxChoice *CreatePaperTypeChoice(int* x, int* y);
d6b9496a 168 wxPageSetupData& GetPageSetupData() { return m_pageData; }
7bcb11d3
JS
169
170public:
171 wxButton* m_printerButton;
172 wxRadioBox* m_orientationRadioBox;
173 wxTextCtrl* m_marginLeftText;
174 wxTextCtrl* m_marginTopText;
175 wxTextCtrl* m_marginRightText;
176 wxTextCtrl* m_marginBottomText;
177 wxChoice* m_paperTypeChoice;
d6b9496a 178
7bcb11d3 179 static bool m_pageSetupDialogCancelled;
d6b9496a 180
7bcb11d3 181 wxPageSetupData m_pageData;
d6b9496a
VZ
182
183private:
7bcb11d3 184 DECLARE_EVENT_TABLE()
c801d85f
KB
185};
186
187#endif
7bcb11d3 188// __PRINTDLGH_G__