]>
Commit | Line | Data |
---|---|---|
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 | ||
26 | class WXDLLEXPORT wxTextCtrl; | |
27 | class WXDLLEXPORT wxButton; | |
28 | class WXDLLEXPORT wxCheckBox; | |
29 | class WXDLLEXPORT wxChoice; | |
30 | class WXDLLEXPORT wxStaticText; | |
31 | class WXDLLEXPORT wxRadioBox; | |
32 | class WXDLLEXPORT wxPrintSetupData; | |
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 | ||
47 | class 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 | ||
78 | DECLARE_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 | ||
87 | class 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 | ||
98 | #if wxUSE_POSTSCRIPT | |
99 | wxPrintSetupData printData; | |
100 | inline wxPrintSetupData& GetPrintData(void) { return printData; } | |
101 | #endif | |
102 | ||
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); | |
110 | }; | |
111 | ||
112 | #define wxPRINTID_LEFTMARGIN 30 | |
113 | #define wxPRINTID_RIGHTMARGIN 31 | |
114 | #define wxPRINTID_TOPMARGIN 32 | |
115 | #define wxPRINTID_BOTTOMMARGIN 33 | |
116 | ||
117 | class 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 | ||
134 | wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = (wxPageSetupData*) NULL); | |
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 | ||
145 | DECLARE_EVENT_TABLE() | |
146 | }; | |
147 | ||
148 | #endif | |
149 | // __PRINTDLGH_G__ |