]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/prntdlgg.h
More progress on wxMotif, incl. wxTreeCtrl/wxListCtrl beginning to work
[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)
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/dc.h"
23#include "wx/cmndata.h"
24#include "wx/postscrp.h"
25
26class WXDLLEXPORT wxTextCtrl;
27class WXDLLEXPORT wxButton;
28class WXDLLEXPORT wxCheckBox;
29class WXDLLEXPORT wxChoice;
30class WXDLLEXPORT wxStaticText;
31class WXDLLEXPORT wxRadioBox;
5e9f4026 32class WXDLLEXPORT wxPrintSetupData;
c801d85f
KB
33
34/*
35 * Simulated Print and Print Setup dialogs
36 * for non-Windows platforms (and Windows using PostScript print/preview)
37 */
38
39#define wxPRINTID_STATIC 10
40#define wxPRINTID_RANGE 11
41#define wxPRINTID_FROM 12
42#define wxPRINTID_TO 13
43#define wxPRINTID_COPIES 14
44#define wxPRINTID_PRINTTOFILE 15
45#define wxPRINTID_SETUP 16
46
47class WXDLLEXPORT wxGenericPrintDialog: public wxDialog
48{
49 DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog)
50
51 public:
52 wxStaticText *printerMessage;
53 wxButton *setupButton;
54 wxButton *helpButton;
55 wxRadioBox *rangeRadioBox;
56 wxTextCtrl *fromText;
57 wxTextCtrl *toText;
58 wxTextCtrl *noCopiesText;
59 wxCheckBox *printToFileCheckBox;
60 wxCheckBox *collateCopiesCheckBox;
61
62 wxPrintData printData;
63 wxGenericPrintDialog(wxWindow *parent, wxPrintData* data);
64 ~wxGenericPrintDialog(void);
65
66 void OnSetup(wxCommandEvent& event);
67 void OnRange(wxCommandEvent& event);
68 void OnOK(wxCommandEvent& event);
69
70 virtual bool TransferDataFromWindow(void);
71 virtual bool TransferDataToWindow(void);
72
73 virtual int ShowModal(void);
74
75 inline wxPrintData& GetPrintData(void) { return printData; }
76 wxDC *GetPrintDC(void);
77
78DECLARE_EVENT_TABLE()
79};
80
81#define wxPRINTID_PRINTCOLOUR 10
82#define wxPRINTID_ORIENTATION 11
83#define wxPRINTID_COMMAND 12
84#define wxPRINTID_OPTIONS 13
85#define wxPRINTID_PAPERSIZE 14
86
87class WXDLLEXPORT wxGenericPrintSetupDialog: public wxDialog
88{
89 DECLARE_CLASS(wxGenericPrintSetupDialog)
90
91 public:
92 wxRadioBox *orientationRadioBox;
93 wxTextCtrl *printerCommandText;
94 wxTextCtrl *printerOptionsText;
95 wxCheckBox *colourCheckBox;
96 wxChoice *paperTypeChoice;
97
5e9f4026 98#if wxUSE_POSTSCRIPT
c801d85f 99 wxPrintSetupData printData;
5e9f4026
VZ
100 inline wxPrintSetupData& GetPrintData(void) { return printData; }
101#endif
102
c801d85f
KB
103 wxGenericPrintSetupDialog(wxWindow *parent, wxPrintSetupData* data);
104 ~wxGenericPrintSetupDialog(void);
105
106 virtual bool TransferDataFromWindow(void);
107 virtual bool TransferDataToWindow(void);
108
109 wxChoice *CreatePaperTypeChoice(int* x, int* y);
c801d85f
KB
110};
111
112#define wxPRINTID_LEFTMARGIN 30
113#define wxPRINTID_RIGHTMARGIN 31
114#define wxPRINTID_TOPMARGIN 32
115#define wxPRINTID_BOTTOMMARGIN 33
116
117class WXDLLEXPORT wxGenericPageSetupDialog: public wxDialog
118{
119 DECLARE_CLASS(wxGenericPageSetupDialog)
120
121 public:
122 wxButton *printerButton;
123 wxRadioBox *orientationRadioBox;
124 wxTextCtrl *marginLeftText;
125 wxTextCtrl *marginTopText;
126 wxTextCtrl *marginRightText;
127 wxTextCtrl *marginBottomText;
128 wxChoice *paperTypeChoice;
129
130 static bool pageSetupDialogCancelled;
131
132 wxPageSetupData pageData;
133
c67daf87 134 wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = (wxPageSetupData*) NULL);
c801d85f
KB
135 ~wxGenericPageSetupDialog(void);
136
137 virtual bool TransferDataFromWindow(void);
138 virtual bool TransferDataToWindow(void);
139
140 void OnPrinter(wxCommandEvent& event);
141
142 wxChoice *CreatePaperTypeChoice(int* x, int* y);
143 inline wxPageSetupData& GetPageSetupData(void) { return pageData; }
144
145DECLARE_EVENT_TABLE()
146};
147
148#endif
149 // __PRINTDLGH_G__