Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Protected Member Functions
IlvWindowsPrinter Class Reference

Class for printing on the Windows printer. More...

#include <ilviews/printing/wprinter.h>

Inheritance diagram for IlvWindowsPrinter:
IlvPrinter

Public Member Functions

 IlvWindowsPrinter (IlvDisplay *display)
 Constructor. More...
 
 ~IlvWindowsPrinter ()
 Destructor. More...
 
virtual IlBoolean checkErrorStatus () const
 Checks the error status of the printer. More...
 
virtual IlvDim getPaperHeight () const
 Returns the height of the paper. More...
 
virtual IlvRect getPaperSize () const
 Returns the size of the paper. More...
 
virtual IlvDim getPaperWidth () const
 Returns the width of the paper. More...
 
IlvWindowsPrinterDCFactorygetPrinterDCFactory () const
 Gets the Windows printer factory. More...
 
virtual IlvRect getUsableArea () const
 Returns the physical printable area. More...
 
virtual IlBoolean initializeSettings ()
 Initializes the settings of the printer. More...
 
IlvPortmakePort () const
 Creates the printer port used in this class. More...
 
void setPrinterDCFactory (IlvWindowsPrinterDCFactory *factory)
 Sets the Windows printer factory. More...
 
void setPrinterDescription (char const *printerDescription)
 Sets the Windows printer description. More...
 
- Public Member Functions inherited from IlvPrinter
 IlvPrinter (IlvDisplay *display)
 Constructor. More...
 
virtual ~IlvPrinter ()
 Destructor. More...
 
void end ()
 Closes the dump device. More...
 
void forceDialogDisplay (IlBoolean force)
 Sets whether the dialog must be displayed. More...
 
IlvRegion const * getClip () const
 Gets the current clip of the printer. More...
 
IlvDisplaygetDisplay () const
 Returns the display. More...
 
IlString getDocumentName () const
 Returns the document name. More...
 
IlvRect const * getInitClip () const
 Gets the global clip of the printer. More...
 
void getMargins (IlvDim &left, IlvDim &right, IlvDim &top, IlvDim &bottom) const
 Returns the printer's physical margins. More...
 
Orientation getOrientation () const
 Returns the printing orientation. More...
 
IlvPaperFormat const & getPaperFormat () const
 Returns the paper format. More...
 
IlvPortgetPort () const
 Returns the printer port. More...
 
IlvTransformer const & getTransformer () const
 Gets the current transformer of the printer. More...
 
void initClip (IlvRect const &newClip)
 Sets the global clip of the printer. More...
 
IlBoolean initialize ()
 Initializes the dump device. More...
 
IlBoolean isDialogDisplayForced () const
 Returns whether the dialog must be displayed. More...
 
IlBoolean isDumping () const
 Returns the dumping status. More...
 
void setClip (IlvRegion const *newClip)
 Sets a new clip to the printer. More...
 
void setClip (IlvRect const &newClip)
 Sets a new clip to the printer. More...
 
void setDocumentName (IlString const &name)
 Sets the document name. More...
 
void setMargins (IlvDim left, IlvDim right, IlvDim top, IlvDim bottom)
 Sets the physical margins for the printer. More...
 
void setOrientation (Orientation orientation)
 Sets the printing orientation. More...
 
void setPaperFormat (IlvPaperFormat const &format)
 Sets the paper format. More...
 
void setPort (IlvPort *port)
 Sets the port used when printing on a real printer. More...
 
void setTransformer (IlvTransformer const &newTransformer)
 Sets a new transformer to the printer. More...
 

Protected Member Functions

virtual void internalInitClip (IlvRect const &newClip)
 Sets a new clip to the printer. More...
 
virtual IlBoolean internalInitialize ()
 Does specific initializations for the dump device. More...
 
virtual void internalSetClip (IlvRegion const *newClip)
 Sets a new clip to the printer. More...
 
virtual void internalSetMargins (IlvDim left, IlvDim right, IlvDim top, IlvDim bottom)
 Implements the actual physical margins for the printer. More...
 
virtual void internalSetOrientation (Orientation orient)
 Implements the actual printing orientation change. More...
 
virtual void internalSetPaperFormat (IlvPaperFormat const &format)
 Implements the actual paper format selection. More...
 
virtual void internalSetTransformer (IlvTransformer const &transformer)
 Sets a new transformer to the printer. More...
 
- Protected Member Functions inherited from IlvPrinter
void setDumpingStatus (IlBoolean status)
 Sets the dumping status. More...
 

Additional Inherited Members

- Public Types inherited from IlvPrinter

Detailed Description

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.

See also
IlvPrinter, setPrinterDescription, setPrinterDCFactory

Constructor & Destructor Documentation

IlvWindowsPrinter::IlvWindowsPrinter ( IlvDisplay display)

Constructor.

Initializes a new instance of IlvWindowsPrinter.

IlvWindowsPrinter::~IlvWindowsPrinter ( )

Destructor.

The destructor releases all the memory used by the instance.

Member Function Documentation

virtual IlBoolean IlvWindowsPrinter::checkErrorStatus ( ) const
virtual

Checks the error status of the printer.

Returns
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().

See also
IlvPrinter::initializeSettings().
Returns
The height of the paper.

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().

See also
IlvPrinter::initializeSettings().
Returns
The size of the paper.

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().

See also
IlvPrinter::initializeSettings().
Returns
The width of the paper.

Implements IlvPrinter.

IlvWindowsPrinterDCFactory * IlvWindowsPrinter::getPrinterDCFactory ( ) const

Gets the Windows printer factory.

Returns
The factory used to create the printer DC if no printer description is given.
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().

See also
IlvPrinter::initializeSettings().
Returns
The usable physical printable area.

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.

Returns
IlFalse if an error occurred, IlTrue otherwise.
See also
setPrinterDescription, setPrinterDCFactory

Implements IlvPrinter.

virtual void IlvWindowsPrinter::internalInitClip ( IlvRect const &  newClip)
protectedvirtual

Sets a new clip to the printer.

This function is called by IlvPrinter::setClip.

Parameters
newClipThe new clip.
See also
IlvPrinter::setClip.

Implements IlvPrinter.

virtual IlBoolean IlvWindowsPrinter::internalInitialize ( )
protectedvirtual

Does specific initializations for the dump device.

Returns
IlFalse if an error occurred, IlTrue otherwise.
See also
initialize().

Implements IlvPrinter.

virtual void IlvWindowsPrinter::internalSetClip ( IlvRegion const *  newClip)
protectedvirtual

Sets a new clip to the printer.

This function is called by IlvPrinter::setClip.

Parameters
newClipThe new clip.
See also
IlvPrinter::setClip.

Implements IlvPrinter.

virtual void IlvWindowsPrinter::internalSetMargins ( IlvDim  left,
IlvDim  right,
IlvDim  top,
IlvDim  bottom 
)
protectedvirtual

Implements the actual physical margins for the printer.

Parameters
leftThe left margin.
rightThe right margin.
topThe top margin.
bottomThe bottom margin.

Implements IlvPrinter.

virtual void IlvWindowsPrinter::internalSetOrientation ( Orientation  orient)
protectedvirtual

Implements the actual printing orientation change.

Parameters
orientThe new orientation.

Implements IlvPrinter.

virtual void IlvWindowsPrinter::internalSetPaperFormat ( IlvPaperFormat const &  format)
protectedvirtual

Implements the actual paper format selection.

Parameters
formatThe new paper format.

Implements IlvPrinter.

virtual void IlvWindowsPrinter::internalSetTransformer ( IlvTransformer const &  transformer)
protectedvirtual

Sets a new transformer to the printer.

This function is called by IlvPrinter::setTransformer.

Parameters
transformerThe new transformer.
See also
IlvPrinter::setTransformer.

Implements IlvPrinter.

IlvPort* IlvWindowsPrinter::makePort ( ) const
virtual

Creates the printer port used in this class.

Returns
The printer port.

Implements IlvPrinter.

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.

Parameters
factoryThe 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.
See also
IlvWindowsPrinterDCDialogFactory, setPrinterDescription
void IlvWindowsPrinter::setPrinterDescription ( char const *  printerDescription)

Sets the Windows printer description.

Parameters
printerDescriptionThe Windows description of the printer. It typically comes from IlvGetWindowsPrinter.
See also
IlvGetWindowsPrinter

© Copyright 2016, 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.