#include <wx/cmndata.h>
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.
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 wxString & | GetPrinterName () 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. | |
wxPrintData & | operator= (const wxPrintData &data) |
Assigns print data to this object. | |
wxString | GetFilename () const |
void | SetFilename (const wxString &filename) |
wxPrintMode | GetPrintMode () const |
void | SetPrintMode (wxPrintMode printMode) |
Public Member Functions inherited from wxObject | |
wxObject () | |
Default ctor; initializes to NULL the internal reference data. | |
wxObject (const wxObject &other) | |
Copy ctor. | |
virtual | ~wxObject () |
Destructor. | |
virtual wxClassInfo * | GetClassInfo () const |
This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar). | |
wxObjectRefData * | GetRefData () const |
Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. | |
bool | IsKindOf (const wxClassInfo *info) const |
Determines whether this class is a subclass of (or the same class as) the given class. | |
bool | IsSameAs (const wxObject &obj) const |
Returns true if this object has the same data pointer as obj. | |
void | Ref (const wxObject &clone) |
Makes this object refer to the data in clone. | |
void | SetRefData (wxObjectRefData *data) |
Sets the wxObject::m_refData pointer. | |
void | UnRef () |
Decrements the reference count in the associated data, and if it is zero, deletes the data. | |
void | UnShare () |
This is the same of AllocExclusive() but this method is public. | |
void | operator delete (void *buf) |
The delete operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined. | |
void * | operator new (size_t size, const wxString &filename=NULL, int lineNum=0) |
The new operator is defined for debugging versions of the library only, when the identifier WXDEBUG is defined. | |
Additional Inherited Members | |
Protected Member Functions inherited from wxObject | |
void | AllocExclusive () |
Ensure that this object's data is not shared with any other object. | |
virtual wxObjectRefData * | CreateRefData () const |
Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it. | |
virtual wxObjectRefData * | CloneRefData (const wxObjectRefData *data) const |
Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data. | |
Protected Attributes inherited from wxObject | |
wxObjectRefData * | m_refData |
Pointer to an object which is the object's reference-counted data. | |
wxPrintData::wxPrintData | ( | ) |
Default constructor.
wxPrintData::wxPrintData | ( | const wxPrintData & | data | ) |
Copy constructor.
|
virtual |
Destructor.
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.
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:
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:
On input you should pass one of these identifiers, but on return you may get back a positive integer indicating the current resolution setting.