]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/generic/prntdlgg.h
removed a few objects whose sources have been moved
[wxWidgets.git] / include / wx / generic / prntdlgg.h
... / ...
CommitLineData
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)
10// Licence: wxWindows licence
11/////////////////////////////////////////////////////////////////////////////
12
13#ifndef __PRINTDLGH_G_
14#define __PRINTDLGH_G_
15
16#ifdef __GNUG__
17 #pragma interface "prntdlgg.h"
18#endif
19
20#include "wx/defs.h"
21#include "wx/dialog.h"
22#include "wx/dialog.h"
23
24#if wxUSE_POSTSCRIPT
25 #include "wx/dcps.h"
26#endif
27
28class WXDLLEXPORT wxTextCtrl;
29class WXDLLEXPORT wxButton;
30class WXDLLEXPORT wxCheckBox;
31class WXDLLEXPORT wxChoice;
32class WXDLLEXPORT wxStaticText;
33class WXDLLEXPORT wxRadioBox;
34class WXDLLEXPORT wxPrintSetupData;
35
36// ----------------------------------------------------------------------------
37// constants
38// ----------------------------------------------------------------------------
39
40// FIXME why all these enums start with 10 or 30?
41
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
76{
77 DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog)
78
79public:
80 wxGenericPrintDialog(wxWindow *parent,
81 wxPrintDialogData* data = (wxPrintDialogData*)NULL);
82 wxGenericPrintDialog(wxWindow *parent, wxPrintData* data);
83
84 virtual ~wxGenericPrintDialog();
85
86 void OnSetup(wxCommandEvent& event);
87 void OnRange(wxCommandEvent& event);
88 void OnOK(wxCommandEvent& event);
89
90 virtual bool TransferDataFromWindow();
91 virtual bool TransferDataToWindow();
92
93 virtual int ShowModal();
94
95#if wxUSE_POSTSCRIPT
96 wxPrintData& GetPrintData()
97 { return m_printDialogData.GetPrintData(); }
98#endif // wxUSE_POSTSCRIPT
99
100 wxPrintDialogData& GetPrintDialogData() { return m_printDialogData; }
101 wxDC *GetPrintDC();
102
103public:
104 wxStaticText* m_printerMessage;
105 wxButton* m_setupButton;
106 wxButton* m_helpButton;
107 wxRadioBox* m_rangeRadioBox;
108 wxTextCtrl* m_fromText;
109 wxTextCtrl* m_toText;
110 wxTextCtrl* m_noCopiesText;
111 wxCheckBox* m_printToFileCheckBox;
112 wxCheckBox* m_collateCopiesCheckBox;
113
114 wxPrintDialogData m_printDialogData;
115
116protected:
117 void Init(wxWindow *parent);
118
119private:
120 DECLARE_EVENT_TABLE()
121};
122
123class WXDLLEXPORT wxGenericPrintSetupDialog : public wxDialog
124{
125 DECLARE_CLASS(wxGenericPrintSetupDialog)
126
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);
132 virtual ~wxGenericPrintSetupDialog();
133
134 void Init(wxPrintData* data);
135
136 virtual bool TransferDataFromWindow();
137 virtual bool TransferDataToWindow();
138
139 wxChoice *CreatePaperTypeChoice(int* x, int* y);
140
141public:
142 wxRadioBox* m_orientationRadioBox;
143 wxTextCtrl* m_printerCommandText;
144 wxTextCtrl* m_printerOptionsText;
145 wxCheckBox* m_colourCheckBox;
146 wxChoice* m_paperTypeChoice;
147
148#if wxUSE_POSTSCRIPT
149 wxPrintData m_printData;
150 wxPrintData& GetPrintData() { return m_printData; }
151#endif // wxUSE_POSTSCRIPT
152};
153
154class WXDLLEXPORT wxGenericPageSetupDialog : public wxDialog
155{
156 DECLARE_CLASS(wxGenericPageSetupDialog)
157
158public:
159 wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = (wxPageSetupData*) NULL);
160 virtual ~wxGenericPageSetupDialog();
161
162 virtual bool TransferDataFromWindow();
163 virtual bool TransferDataToWindow();
164
165 void OnPrinter(wxCommandEvent& event);
166
167 wxChoice *CreatePaperTypeChoice(int* x, int* y);
168 wxPageSetupData& GetPageSetupData() { return m_pageData; }
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;
178
179 static bool m_pageSetupDialogCancelled;
180
181 wxPageSetupData m_pageData;
182
183private:
184 DECLARE_EVENT_TABLE()
185};
186
187#endif
188// __PRINTDLGH_G__