wxPrintDataThis class holds a variety of information related to printers and printer device contexts. This class is used to create a wxPrinterDC and a wxPostScriptDC. It is also used as a data member of wxPrintDialogData and wxPageSetupDialogData, as part of the mechanism for transferring data between the print dialogs and the application. Derived from Include files <wx/cmndata.h> See also Printing framework overview, wxPrintDialog, wxPageSetupDialog, wxPrintDialogData, wxPageSetupDialogData, wxPrintDialog Overview, wxPrinterDC, wxPostScriptDC Remarks The following functions are specific to PostScript printing and have not yet been documented:
const wxString& GetPrinterCommand() const ; const wxString& GetPrinterOptions() const ; const wxString& GetPreviewCommand() const ; const wxString& GetFilename() const ; const wxString& GetFontMetricPath() const ; double GetPrinterScaleX() const ; double GetPrinterScaleY() const ; long GetPrinterTranslateX() const ; long GetPrinterTranslateY() const ; // wxPRINT_MODE_PREVIEW, wxPRINT_MODE_FILE, wxPRINT_MODE_PRINTER wxPrintMode GetPrintMode() const ; void SetPrinterCommand(const wxString& command) ; void SetPrinterOptions(const wxString& options) ; void SetPreviewCommand(const wxString& command) ; void SetFilename(const wxString& filename) ; void SetFontMetricPath(const wxString& path) ; void SetPrinterScaleX(double x) ; void SetPrinterScaleY(double y) ; void SetPrinterScaling(double x, double y) ; void SetPrinterTranslateX(long x) ; void SetPrinterTranslateY(long y) ; void SetPrinterTranslation(long x, long y) ; void SetPrintMode(wxPrintMode printMode) ;Members
wxPrintData::wxPrintData
wxPrintData::wxPrintDatawxPrintData() Default constructor. wxPrintData(const wxPrintData& data) Copy constructor.
wxPrintData::~wxPrintData~wxPrintData() Destructor.
wxPrintData::GetCollatebool GetCollate() const Returns true if collation is on.
wxPrintData::GetBinwxPrintBin GetBin() const Returns the current bin (papersource). By default, the system is left to select the bin (wxPRINTBIN_DEFAULT is returned). See SetBin() for the full list of bin values.
wxPrintData::GetColourbool GetColour() const Returns true if colour printing is on.
wxPrintData::GetDuplexwxDuplexMode GetDuplex() const Returns the duplex mode. One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL.
wxPrintData::GetNoCopiesint GetNoCopies() const Returns the number of copies requested by the user.
wxPrintData::GetOrientationint GetOrientation() const Gets the orientation. This can be wxLANDSCAPE or wxPORTRAIT.
wxPrintData::GetPaperIdwxPaperSize GetPaperId() const Returns the paper size id. For more information, see wxPrintData::SetPaperId.
wxPrintData::GetPrinterNameconst wxString& GetPrinterName() const Returns the printer name. If the printer name is the empty string, it indicates that the default printer should be used.
wxPrintData::GetQualitywxPrintQuality GetQuality() const Returns the current print quality. This can be a positive integer, denoting the number of dots per inch, or one of the following identifiers:
wxPRINT_QUALITY_HIGH wxPRINT_QUALITY_MEDIUM wxPRINT_QUALITY_LOW wxPRINT_QUALITY_DRAFTOn input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting.
wxPrintData::IsOkbool IsOk() const Returns true if the print data is valid for using in print dialogs. This can return false on Windows if the current printer is not set, for example. On all other platforms, it returns true.
wxPrintData::SetBinvoid SetBin(wxPrintBin flag) Sets the current bin. Possible values are:
wxPrintData::SetCollatevoid SetCollate(bool flag) Sets collation to on or off.
wxPrintData::SetColourvoid SetColour(bool flag) Sets colour printing on or off.
wxPrintData::SetDuplexvoid SetDuplex(wxDuplexMode mode) Returns the duplex mode. One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL.
wxPrintData::SetNoCopiesvoid SetNoCopies(int n) Sets the default number of copies to be printed out.
wxPrintData::SetOrientationvoid SetOrientation(int orientation) Sets the orientation. This can be wxLANDSCAPE or wxPORTRAIT.
wxPrintData::SetPaperIdvoid SetPaperId(wxPaperSize paperId) Sets the paper id. This indicates the type of paper to be used. For a mapping between paper id, paper size and string name, see wxPrintPaperDatabase in paper.h (not yet documented). paperId can be one of:
wxPrintData::SetPrinterNamevoid SetPrinterName(const wxString& printerName) Sets the printer name. This can be the empty string to indicate that the default printer should be used.
wxPrintData::SetQualityvoid SetQuality(wxPrintQuality quality) Sets the desired print quality. This can be a positive integer, denoting the number of dots per inch, or one of the following identifiers:
wxPRINT_QUALITY_HIGH wxPRINT_QUALITY_MEDIUM wxPRINT_QUALITY_LOW wxPRINT_QUALITY_DRAFTOn input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting.
wxPrintData::operator =void operator =(const wxPrintData& data) Assigns print data to this object. void operator =(const wxPrintSetupData& data) Assigns print setup data to this object. wxPrintSetupData is deprecated, but retained for backward compatibility.
|