rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
List of all members | Public Member Functions | Protected Member Functions
IlvPrinterPreview Class Reference

This class lets you preview pages. More...

#include <ilviews/printing/preview.h>

Inheritance diagram for IlvPrinterPreview:
IlvPrinter

Public Member Functions

 IlvPrinterPreview (IlvPrinter &referencePrinter)
 Constructor. More...
 
virtual IlBoolean checkErrorStatus () const
 Checks the error status of the printer. More...
 
IlBoolean drawPage (IlvPort *port, IlvTransformer const &transformer, IlvRegion const &clip, IlInt page) const
 Draws a page on a port. More...
 
IlInt getPageNumber () const
 Gets the number of printed pages. 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...
 
IlvPrintergetReferencePrinter () const
 Returns the printer used as reference for the settings. More...
 
virtual IlvRect getUsableArea () const
 Returns the physical printable area. More...
 
virtual IlvPortmakePort () const
 Creates the port for the preview. 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 IlBoolean initializeSettings ()
 Initializes the settings of the printer. More...
 
virtual void internalInitClip (IlvRect const &newClip)
 Sets a new global clip to the printer. More...
 
virtual IlBoolean internalInitialize ()
 Does specific initialization 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
enum  Orientation { , Portrait, Landscape }
 This enumeration defines the possible values for the printing orientation. More...
 

Detailed Description

This class lets you preview pages.

Library: ilvprint

It is used by an IlvPrinterPreviewDisplayer instance.

As IlvPrinterPreviewDisplayer is an abstract class, the most common usage of the IlvPrinterPreview class is performed internally by the IlvPrinterPreviewDialog class.

Constructor & Destructor Documentation

IlvPrinterPreview::IlvPrinterPreview ( IlvPrinter referencePrinter)

Constructor.

The constructor initializes the object in a coherent state.

Parameters
referencePrinterThis printer object is used to get the property of the actual printer.

Member Function Documentation

virtual IlBoolean IlvPrinterPreview::checkErrorStatus ( ) const
virtual

Checks the error status of the printer.

Returns
IlTrue when the status is 'no error', IlFalse otherwise.

Implements IlvPrinter.

IlBoolean IlvPrinterPreview::drawPage ( IlvPort port,
IlvTransformer const &  transformer,
IlvRegion const &  clip,
IlInt  page 
) const

Draws a page on a port.

Parameters
portThe port where the page will be drawn.
transformerThe transformer to apply to the drawing.
clipThe clipping region.
pageThe page to draw.
Returns
IlFalse when an error occurred, or IlTrue otherwise.
IlInt IlvPrinterPreview::getPageNumber ( ) const

Gets the number of printed pages.

The value is meaningful only after a print job occurred.

Returns
The number of printed pages.
virtual IlvDim IlvPrinterPreview::getPaperHeight ( ) const
virtual

Returns the height of the paper.

Returns
The height of the paper.

Implements IlvPrinter.

virtual IlvRect IlvPrinterPreview::getPaperSize ( ) const
virtual

Returns the size of the paper.

Returns
The size of the paper.

Implements IlvPrinter.

virtual IlvDim IlvPrinterPreview::getPaperWidth ( ) const
virtual

Returns the width of the paper.

Returns
The width of the paper.

Implements IlvPrinter.

IlvPrinter & IlvPrinterPreview::getReferencePrinter ( ) const

Returns the printer used as reference for the settings.

Returns
A reference to the printer.
virtual IlvRect IlvPrinterPreview::getUsableArea ( ) const
virtual

Returns the physical printable area.

This is the real size of a sheet of paper minus the printer's borders.

Returns
The usable physical printable area.

Implements IlvPrinter.

virtual IlBoolean IlvPrinterPreview::initializeSettings ( )
protectedvirtual

Initializes the settings of the printer.

Returns
IlFalse if an error occurred, or IlTrue otherwise.

Implements IlvPrinter.

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

Sets a new global clip to the printer.

Parameters
newClipThe new global clip.
See Also
IlvPrinter::initClip.

Implements IlvPrinter.

virtual IlBoolean IlvPrinterPreview::internalInitialize ( )
protectedvirtual

Does specific initialization for the dump device.

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

Implements IlvPrinter.

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

Sets a new clip to the printer.

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

Implements IlvPrinter.

virtual void IlvPrinterPreview::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 IlvPrinterPreview::internalSetOrientation ( Orientation  orient)
protectedvirtual

Implements the actual printing orientation change.

Parameters
orientThe new orientation.

Implements IlvPrinter.

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

Implements the actual paper format selection.

Parameters
formatThe new paper dimensions.

Implements IlvPrinter.

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

Sets a new transformer to the printer.

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

Implements IlvPrinter.

virtual IlvPort* IlvPrinterPreview::makePort ( ) const
virtual

Creates the port for the preview.

Returns
The printer port.

Implements IlvPrinter.


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