1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGenericPrintDialog, wxGenericPrintSetupDialog,
4 // wxGenericPageSetupDialog
5 // Author: Julian Smart
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
13 #ifndef __PRINTDLGH_G_
14 #define __PRINTDLGH_G_
17 #pragma interface "prntdlgg.h"
21 #include "wx/dialog.h"
23 #include "wx/cmndata.h"
24 #include "wx/dialog.h"
30 class WXDLLEXPORT wxTextCtrl
;
31 class WXDLLEXPORT wxButton
;
32 class WXDLLEXPORT wxCheckBox
;
33 class WXDLLEXPORT wxChoice
;
34 class WXDLLEXPORT wxStaticText
;
35 class WXDLLEXPORT wxRadioBox
;
36 class WXDLLEXPORT wxPrintSetupData
;
39 * Simulated Print and Print Setup dialogs
40 * for non-Windows platforms (and Windows using PostScript print/preview)
43 #define wxPRINTID_STATIC 10
44 #define wxPRINTID_RANGE 11
45 #define wxPRINTID_FROM 12
46 #define wxPRINTID_TO 13
47 #define wxPRINTID_COPIES 14
48 #define wxPRINTID_PRINTTOFILE 15
49 #define wxPRINTID_SETUP 16
51 class WXDLLEXPORT wxGenericPrintDialog
: public wxDialog
53 DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog
)
56 wxStaticText
*printerMessage
;
57 wxButton
*setupButton
;
59 wxRadioBox
*rangeRadioBox
;
62 wxTextCtrl
*noCopiesText
;
63 wxCheckBox
*printToFileCheckBox
;
64 wxCheckBox
*collateCopiesCheckBox
;
66 wxPrintData printData
;
67 wxGenericPrintDialog(wxWindow
*parent
, wxPrintData
* data
);
68 ~wxGenericPrintDialog(void);
70 void OnSetup(wxCommandEvent
& event
);
71 void OnRange(wxCommandEvent
& event
);
72 void OnOK(wxCommandEvent
& event
);
74 virtual bool TransferDataFromWindow(void);
75 virtual bool TransferDataToWindow(void);
77 virtual int ShowModal(void);
79 inline wxPrintData
& GetPrintData(void) { return printData
; }
80 wxDC
*GetPrintDC(void);
85 #define wxPRINTID_PRINTCOLOUR 10
86 #define wxPRINTID_ORIENTATION 11
87 #define wxPRINTID_COMMAND 12
88 #define wxPRINTID_OPTIONS 13
89 #define wxPRINTID_PAPERSIZE 14
91 class WXDLLEXPORT wxGenericPrintSetupDialog
: public wxDialog
93 DECLARE_CLASS(wxGenericPrintSetupDialog
)
96 wxRadioBox
*orientationRadioBox
;
97 wxTextCtrl
*printerCommandText
;
98 wxTextCtrl
*printerOptionsText
;
99 wxCheckBox
*colourCheckBox
;
100 wxChoice
*paperTypeChoice
;
103 wxPrintSetupData printData
;
104 inline wxPrintSetupData
& GetPrintData(void) { return printData
; }
107 wxGenericPrintSetupDialog(wxWindow
*parent
, wxPrintSetupData
* data
);
108 ~wxGenericPrintSetupDialog(void);
110 virtual bool TransferDataFromWindow(void);
111 virtual bool TransferDataToWindow(void);
113 wxChoice
*CreatePaperTypeChoice(int* x
, int* y
);
116 #define wxPRINTID_LEFTMARGIN 30
117 #define wxPRINTID_RIGHTMARGIN 31
118 #define wxPRINTID_TOPMARGIN 32
119 #define wxPRINTID_BOTTOMMARGIN 33
121 class WXDLLEXPORT wxGenericPageSetupDialog
: public wxDialog
123 DECLARE_CLASS(wxGenericPageSetupDialog
)
126 wxButton
*printerButton
;
127 wxRadioBox
*orientationRadioBox
;
128 wxTextCtrl
*marginLeftText
;
129 wxTextCtrl
*marginTopText
;
130 wxTextCtrl
*marginRightText
;
131 wxTextCtrl
*marginBottomText
;
132 wxChoice
*paperTypeChoice
;
134 static bool pageSetupDialogCancelled
;
136 wxPageSetupData pageData
;
138 wxGenericPageSetupDialog(wxWindow
*parent
, wxPageSetupData
* data
= (wxPageSetupData
*) NULL
);
139 ~wxGenericPageSetupDialog(void);
141 virtual bool TransferDataFromWindow(void);
142 virtual bool TransferDataToWindow(void);
144 void OnPrinter(wxCommandEvent
& event
);
146 wxChoice
*CreatePaperTypeChoice(int* x
, int* y
);
147 inline wxPageSetupData
& GetPageSetupData(void) { return pageData
; }
149 DECLARE_EVENT_TABLE()