]> git.saurik.com Git - wxWidgets.git/blame - interface/dcps.h
make it callable from any path
[wxWidgets.git] / interface / dcps.h
CommitLineData
23324ae1
FM
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcps.h
3// Purpose: documentation for wxPostScriptDC class
4// Author: wxWidgets team
5// RCS-ID: $Id$
6// Licence: wxWindows license
7/////////////////////////////////////////////////////////////////////////////
8
9/**
10 @class wxPostScriptDC
11 @wxheader{dcps.h}
12
13 This defines the wxWidgets Encapsulated PostScript device context,
14 which can write PostScript files on any platform. See wxDC for
15 descriptions of the member functions.
16
17 @library{wxbase}
18 @category{dc}
19*/
20class wxPostScriptDC : public wxDC
21{
22public:
23 //@{
24 /**
25 Constructor. @e output is an optional file for printing to, and if
26 @e interactive is @true a dialog box will be displayed for adjusting
27 various parameters. @e parent is the parent of the printer dialog box.
28
29 Use the @e Ok member to test whether the constructor was successful
30 in creating a usable device context.
31
32 See @ref overview_printersettings "Printer settings" for functions to set and
33 get PostScript printing settings.
34
35 This constructor and the global printer settings are now deprecated;
36 use the wxPrintData constructor instead.
37 */
38 wxPostScriptDC(const wxPrintData& printData);
39 wxPostScriptDC(const wxString& output,
40 bool interactive = @true,
41 wxWindow * parent);
42 //@}
43
44 /**
45 Return resolution used in PostScript output. See
46 SetResolution().
47 */
48 static int GetResolution();
49
50 /**
51 Set resolution (in pixels per inch) that will be used in PostScript
52 output. Default is 720ppi.
53 */
54 static void SetResolution(int ppi);
55};
56
57
58// ============================================================================
59// Global functions/macros
60// ============================================================================
61
62/**
63 Gets the printer command used to print a file. The default is @c lpr.
64*/
65wxString wxGetPrinterCommand();
66
67/**
68 Sets the printer command used to print a file. The default is @c lpr.
69*/
70void wxSetPrinterCommand(const wxString& command);
71
72/**
73 Gets the orientation (PS_PORTRAIT or PS_LANDSCAPE). The default is PS_PORTRAIT.
74*/
75int wxGetPrinterOrientation();
76
77/**
78 Sets the additional options for the print command (e.g. specific printer). The
79 default is nothing.
80*/
81void wxSetPrinterOptions(const wxString& options);
82
83/**
84 Gets the translation (from the top left corner) for PostScript output. The
85 default is 0.0, 0.0.
86*/
87void wxGetPrinterTranslation(float * x, float * y);
88
89/**
90 Sets the scaling factor for PostScript output. The default is 1.0, 1.0.
91*/
92void wxSetPrinterScaling(float x, float y);
93
94/**
95 Sets the orientation (PS_PORTRAIT or PS_LANDSCAPE). The default is PS_PORTRAIT.
96*/
97void wxSetPrinterOrientation(int orientation);
98
99/**
100 Sets the printing mode controlling where output is sent (PS_PREVIEW, PS_FILE or
101 PS_PRINTER).
102 The default is PS_PREVIEW.
103*/
104void wxSetPrinterMode(int mode);
105
106/**
107 Sets the PostScript output filename.
108*/
109void wxSetPrinterFile(const wxString& filename);
110
111/**
112 Gets the PostScript output filename.
113*/
114wxString wxGetPrinterFile();
115
116/**
117 Gets the additional options for the print command (e.g. specific printer). The
118 default is nothing.
119*/
120wxString wxGetPrinterOptions();
121
122/**
123 Gets the command used to view a PostScript file. The default depends on the
124 platform.
125*/
126wxString wxGetPrinterPreviewCommand();
127
128/**
129 Gets the printing mode controlling where output is sent (PS_PREVIEW, PS_FILE or
130 PS_PRINTER).
131 The default is PS_PREVIEW.
132*/
133int wxGetPrinterMode();
134
135/**
136 Gets the scaling factor for PostScript output. The default is 1.0, 1.0.
137*/
138void wxGetPrinterScaling(float * x, float * y);
139
140/**
141 Sets the command used to view a PostScript file. The default depends on the
142 platform.
143*/
144void wxSetPrinterPreviewCommand(const wxString& command);
145