Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Class for printing on the Windows printer. More...
#include <ilviews/printing/wprinter.h>
Public Member Functions | |
IlvWindowsPrinter (IlvDisplay *display) | |
Constructor. | |
~IlvWindowsPrinter () | |
Destructor. | |
virtual IlBoolean | checkErrorStatus () const |
Checks the error status of the printer. | |
virtual IlvDim | getPaperHeight () const |
Returns the height of the paper. | |
virtual IlvRect | getPaperSize () const |
Returns the size of the paper. | |
virtual IlvDim | getPaperWidth () const |
Returns the width of the paper. | |
IlvWindowsPrinterDCFactory * | getPrinterDCFactory () const |
Gets the Windows printer factory. | |
virtual IlvRect | getUsableArea () const |
Returns the physical printable area. | |
virtual IlBoolean | initializeSettings () |
Initializes the settings of the printer. | |
IlvPort * | makePort () const |
Creates the printer port used in this class. | |
void | setPrinterDCFactory (IlvWindowsPrinterDCFactory *factory) |
Sets the Windows printer factory. | |
void | setPrinterDescription (char const *printerDescription) |
Sets the Windows printer description. | |
Protected Member Functions | |
virtual void | internalInitClip (IlvRect const &newClip) |
Sets a new clip to the printer. | |
virtual IlBoolean | internalInitialize () |
Does specific initializations for the dump device. | |
virtual void | internalSetClip (IlvRegion const *newClip) |
Sets a new clip to the printer. | |
virtual void | internalSetMargins (IlvDim left, IlvDim right, IlvDim top, IlvDim bottom) |
Implements the actual physical margins for the printer. | |
virtual void | internalSetOrientation (Orientation orient) |
Implements the actual printing orientation change. | |
virtual void | internalSetPaperFormat (IlvPaperFormat const &format) |
Implements the actual paper format selection. | |
virtual void | internalSetTransformer (IlvTransformer const &transformer) |
Sets a new transformer to the printer. |
Class for printing on the Windows printer.
Library: ilvprint
There are two different ways to set the windows printer that you want to target: either by calling the setPrinterDescription
or by setting an IlvWindowsPrinterDCFactory
instance to this IlvWindowsPrinter
object.
Examples using this class are provided in the samples/foundation/printing directory.
IlvWindowsPrinter::IlvWindowsPrinter | ( | IlvDisplay * | display | ) |
Constructor.
Initializes a new instance of IlvWindowsPrinter
.
IlvWindowsPrinter::~IlvWindowsPrinter | ( | ) |
Destructor.
The destructor releases all the memory used by the instance.
virtual IlBoolean IlvWindowsPrinter::checkErrorStatus | ( | ) | const [virtual] |
Checks the error status of the printer.
IlTrue
when the status is no error, IlFalse
otherwise. Implements IlvPrinter.
virtual IlvDim IlvWindowsPrinter::getPaperHeight | ( | ) | const [virtual] |
Returns the height of the paper.
Before using this method,the internal attributes of the IlvWindowsPrinter
instance must be initialized through a call to IlvPrinter::initializeSettings()
.
IlvPrinter::initializeSettings()
.Implements IlvPrinter.
virtual IlvRect IlvWindowsPrinter::getPaperSize | ( | ) | const [virtual] |
Returns the size of the paper.
Before using this method,the internal attributes of the IlvWindowsPrinter
instance must be initialized through a call to IlvPrinter::initializeSettings()
.
IlvPrinter::initializeSettings()
.Implements IlvPrinter.
virtual IlvDim IlvWindowsPrinter::getPaperWidth | ( | ) | const [virtual] |
Returns the width of the paper.
Before using this method,the internal attributes of the IlvWindowsPrinter
instance must be initialized through a call to IlvPrinter::initializeSettings()
.
IlvPrinter::initializeSettings()
.Implements IlvPrinter.
IlvWindowsPrinterDCFactory * IlvWindowsPrinter::getPrinterDCFactory | ( | ) | const |
Gets the Windows printer factory.
virtual IlvRect IlvWindowsPrinter::getUsableArea | ( | ) | const [virtual] |
Returns the physical printable area.
This is the real size of a sheet of paper minus the printer's borders.
Before using this method,the internal attributes of the IlvWindowsPrinter
instance must be initialized through a call to IlvPrinter::initializeSettings()
.
IlvPrinter::initializeSettings()
.Implements IlvPrinter.
virtual IlBoolean IlvWindowsPrinter::initializeSettings | ( | ) | [virtual] |
Initializes the settings of the printer.
If a printer has been chosen using the setPrinterDescription
method and an IlvWindowsPrinterDCFactory
instance has also been set on this IlvWindowsPrinter
object, then most of the settings set in the factory will be ignored. Only the printing orientation set in the factory will be taken into account.
IlFalse
if an error occurred, IlTrue
otherwise. Implements IlvPrinter.
virtual void IlvWindowsPrinter::internalInitClip | ( | IlvRect const & | newClip | ) | [protected, virtual] |
Sets a new clip to the printer.
This function is called by IlvPrinter::setClip
.
newClip | The new clip. |
IlvPrinter::setClip
. Implements IlvPrinter.
virtual IlBoolean IlvWindowsPrinter::internalInitialize | ( | ) | [protected, virtual] |
Does specific initializations for the dump device.
IlFalse
if an error occurred, IlTrue
otherwise. initialize()
. Implements IlvPrinter.
virtual void IlvWindowsPrinter::internalSetClip | ( | IlvRegion const * | newClip | ) | [protected, virtual] |
Sets a new clip to the printer.
This function is called by IlvPrinter::setClip
.
newClip | The new clip. |
IlvPrinter::setClip
. Implements IlvPrinter.
virtual void IlvWindowsPrinter::internalSetMargins | ( | IlvDim | left, | |
IlvDim | right, | |||
IlvDim | top, | |||
IlvDim | bottom | |||
) | [protected, virtual] |
Implements the actual physical margins for the printer.
left | The left margin. | |
right | The right margin. | |
top | The top margin. | |
bottom | The bottom margin. |
Implements IlvPrinter.
virtual void IlvWindowsPrinter::internalSetOrientation | ( | Orientation | orient | ) | [protected, virtual] |
Implements the actual printing orientation change.
orient | The new orientation. |
Implements IlvPrinter.
virtual void IlvWindowsPrinter::internalSetPaperFormat | ( | IlvPaperFormat const & | format | ) | [protected, virtual] |
Implements the actual paper format selection.
format | The new paper format. |
Implements IlvPrinter.
virtual void IlvWindowsPrinter::internalSetTransformer | ( | IlvTransformer const & | transformer | ) | [protected, virtual] |
Sets a new transformer to the printer.
This function is called by IlvPrinter::setTransformer
.
transformer | The new transformer. |
IlvPrinter::setTransformer
. Implements IlvPrinter.
IlvPort* IlvWindowsPrinter::makePort | ( | ) | const [virtual] |
void IlvWindowsPrinter::setPrinterDCFactory | ( | IlvWindowsPrinterDCFactory * | factory | ) |
Sets the Windows printer factory.
If a printer has been chosen using the setPrinterDescription
method, then only the printing orientation set in the factory will be taken into account. All the other settings set in the factory will be ignored.
factory | The new factory used to create the printer DC if no printer description is given. This object is not responsible for the destruction of the factory. |
void IlvWindowsPrinter::setPrinterDescription | ( | char const * | printerDescription | ) |
Sets the Windows printer description.
printerDescription | The Windows description of the printer. It typically comes from IlvGetWindowsPrinter . |
IlvGetWindowsPrinter
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.