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