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