Version: 2.9.4
Public Member Functions
wxPrintData Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/cmndata.h>

Inheritance diagram for wxPrintData:

Detailed Description

This 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.

注意:

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

    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) ;

Library:  wxCore
Category:  Printing Framework, Data Structures
参照:
Printing Framework Overview, wxPrintDialog, wxPageSetupDialog, wxPrintDialogData, wxPageSetupDialogData, wxPrintDialog Overview, wxPrinterDC, wxPostScriptDC

Public Member Functions

 wxPrintData ()
 Default constructor.
 wxPrintData (const wxPrintData &data)
 Copy constructor.
virtual ~wxPrintData ()
 Destructor.
wxPrintBin GetBin () const
 Returns the current bin (papersource).
bool GetCollate () const
 Returns true if collation is on.
bool GetColour () const
 Returns true if colour printing is on.
wxDuplexMode GetDuplex () const
 Returns the duplex mode.
int GetNoCopies () const
 Returns the number of copies requested by the user.
wxPrintOrientation GetOrientation () const
 Gets the orientation.
wxPaperSize GetPaperId () const
 Returns the paper size id.
const wxStringGetPrinterName () const
 Returns the printer name.
wxPrintQuality GetQuality () const
 Returns the current print quality.
bool IsOk () const
 Returns true if the print data is valid for using in print dialogs.
void SetBin (wxPrintBin flag)
 Sets the current bin.
void SetCollate (bool flag)
 Sets collation to on or off.
void SetColour (bool flag)
 Sets colour printing on or off.
void SetDuplex (wxDuplexMode mode)
 Returns the duplex mode.
void SetNoCopies (int n)
 Sets the default number of copies to be printed out.
void SetOrientation (wxPrintOrientation orientation)
 Sets the orientation.
void SetPaperId (wxPaperSize paperId)
 Sets the paper id.
void SetPrinterName (const wxString &printerName)
 Sets the printer name.
void SetQuality (wxPrintQuality quality)
 Sets the desired print quality.
wxPrintDataoperator= (const wxPrintData &data)
 Assigns print data to this object.
wxString GetFilename () const
void SetFilename (const wxString &filename)
wxPrintMode GetPrintMode () const
void SetPrintMode (wxPrintMode printMode)

List of all members.


Constructor & Destructor Documentation

wxPrintData::wxPrintData ( )

Default constructor.

wxPrintData::wxPrintData ( const wxPrintData data)

Copy constructor.

virtual wxPrintData::~wxPrintData ( ) [virtual]

Destructor.


Member Function Documentation

wxPrintBin wxPrintData::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.

bool wxPrintData::GetCollate ( ) const

Returns true if collation is on.

bool wxPrintData::GetColour ( ) const

Returns true if colour printing is on.

wxDuplexMode wxPrintData::GetDuplex ( ) const

Returns the duplex mode.

One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL.

wxString wxPrintData::GetFilename ( ) const
int wxPrintData::GetNoCopies ( ) const

Returns the number of copies requested by the user.

wxPrintOrientation wxPrintData::GetOrientation ( ) const

Gets the orientation.

This can be wxLANDSCAPE or wxPORTRAIT.

wxPaperSize wxPrintData::GetPaperId ( ) const

Returns the paper size id.

参照:
SetPaperId()
const wxString& wxPrintData::GetPrinterName ( ) const

Returns the printer name.

If the printer name is the empty string, it indicates that the default printer should be used.

wxPrintMode wxPrintData::GetPrintMode ( ) const
wxPrintQuality wxPrintData::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_DRAFT

On input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting.

bool wxPrintData::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& wxPrintData::operator= ( const wxPrintData data)

Assigns print data to this object.

void wxPrintData::SetBin ( wxPrintBin  flag)

Sets the current bin.

void wxPrintData::SetCollate ( bool  flag)

Sets collation to on or off.

void wxPrintData::SetColour ( bool  flag)

Sets colour printing on or off.

void wxPrintData::SetDuplex ( wxDuplexMode  mode)

Returns the duplex mode.

One of wxDUPLEX_SIMPLEX, wxDUPLEX_HORIZONTAL, wxDUPLEX_VERTICAL.

void wxPrintData::SetFilename ( const wxString filename)
void wxPrintData::SetNoCopies ( int  n)

Sets the default number of copies to be printed out.

void wxPrintData::SetOrientation ( wxPrintOrientation  orientation)

Sets the orientation.

This can be wxLANDSCAPE or wxPORTRAIT.

void wxPrintData::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).

void wxPrintData::SetPrinterName ( const wxString printerName)

Sets the printer name.

This can be the empty string to indicate that the default printer should be used.

void wxPrintData::SetPrintMode ( wxPrintMode  printMode)
void wxPrintData::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_DRAFT

On input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines