]>
git.saurik.com Git - wxWidgets.git/blob - interface/dcps.h
0d83ba5b45a7a49194e8fffdb161d7a92d23af29
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxPostScriptDC class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
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.
20 class wxPostScriptDC
: public wxDC
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.
29 Use the @e Ok member to test whether the constructor was successful
30 in creating a usable device context.
32 See @ref overview_printersettings "Printer settings" for functions to set and
33 get PostScript printing settings.
35 This constructor and the global printer settings are now deprecated;
36 use the wxPrintData constructor instead.
38 wxPostScriptDC(const wxPrintData
& printData
);
39 wxPostScriptDC(const wxString
& output
,
40 bool interactive
= @
true,
45 Return resolution used in PostScript output. See
48 static int GetResolution();
51 Set resolution (in pixels per inch) that will be used in PostScript
52 output. Default is 720ppi.
54 static void SetResolution(int ppi
);
58 // ============================================================================
59 // Global functions/macros
60 // ============================================================================
63 Gets the printer command used to print a file. The default is @c lpr.
65 wxString
wxGetPrinterCommand();
68 Sets the printer command used to print a file. The default is @c lpr.
70 void wxSetPrinterCommand(const wxString
& command
);
73 Gets the orientation (PS_PORTRAIT or PS_LANDSCAPE). The default is PS_PORTRAIT.
75 int wxGetPrinterOrientation();
78 Sets the additional options for the print command (e.g. specific printer). The
81 void wxSetPrinterOptions(const wxString
& options
);
84 Gets the translation (from the top left corner) for PostScript output. The
87 void wxGetPrinterTranslation(float * x
, float * y
);
90 Sets the scaling factor for PostScript output. The default is 1.0, 1.0.
92 void wxSetPrinterScaling(float x
, float y
);
95 Sets the orientation (PS_PORTRAIT or PS_LANDSCAPE). The default is PS_PORTRAIT.
97 void wxSetPrinterOrientation(int orientation
);
100 Sets the printing mode controlling where output is sent (PS_PREVIEW, PS_FILE or
102 The default is PS_PREVIEW.
104 void wxSetPrinterMode(int mode
);
107 Sets the PostScript output filename.
109 void wxSetPrinterFile(const wxString
& filename
);
112 Gets the PostScript output filename.
114 wxString
wxGetPrinterFile();
117 Gets the additional options for the print command (e.g. specific printer). The
120 wxString
wxGetPrinterOptions();
123 Gets the command used to view a PostScript file. The default depends on the
126 wxString
wxGetPrinterPreviewCommand();
129 Gets the printing mode controlling where output is sent (PS_PREVIEW, PS_FILE or
131 The default is PS_PREVIEW.
133 int wxGetPrinterMode();
136 Gets the scaling factor for PostScript output. The default is 1.0, 1.0.
138 void wxGetPrinterScaling(float * x
, float * y
);
141 Sets the command used to view a PostScript file. The default depends on the
144 void wxSetPrinterPreviewCommand(const wxString
& command
);