rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvPrinterPreview Class Reference

This class lets you preview pages. More...

#include <ilviews/printing/preview.h>

Inheritance diagram for IlvPrinterPreview:
IlvPrinter

List of all members.

Public Member Functions

 IlvPrinterPreview (IlvPrinter &referencePrinter)
 Constructor.
virtual IlBoolean checkErrorStatus () const
 Checks the error status of the printer.
IlBoolean drawPage (IlvPort *port, IlvTransformer const &transformer, IlvRegion const &clip, IlInt page) const
 Draws a page on a port.
IlInt getPageNumber () const
 Gets the number of printed pages.
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.
IlvPrintergetReferencePrinter () const
 Returns the printer used as reference for the settings.
virtual IlvRect getUsableArea () const
 Returns the physical printable area.
virtual IlvPortmakePort () const
 Creates the port for the preview.

Protected Member Functions

virtual IlBoolean initializeSettings ()
 Initializes the settings of the printer.
virtual void internalInitClip (IlvRect const &newClip)
 Sets a new global clip to the printer.
virtual IlBoolean internalInitialize ()
 Does specific initialization 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.

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:
referencePrinter This 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:
port The port where the page will be drawn.
transformer The transformer to apply to the drawing.
clip The clipping region.
page The 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 (  )  [protected, virtual]

Initializes the settings of the printer.

Returns:
IlFalse if an error occurred, or IlTrue otherwise.

Implements IlvPrinter.

virtual void IlvPrinterPreview::internalInitClip ( IlvRect const &  newClip  )  [protected, virtual]

Sets a new global clip to the printer.

Parameters:
newClip The new global clip.
See also:
IlvPrinter::initClip.

Implements IlvPrinter.

virtual IlBoolean IlvPrinterPreview::internalInitialize (  )  [protected, virtual]

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  )  [protected, virtual]

Sets a new clip to the printer.

Parameters:
newClip The new clip.
See also:
IlvPrinter::setClip.

Implements IlvPrinter.

virtual void IlvPrinterPreview::internalSetMargins ( IlvDim  left,
IlvDim  right,
IlvDim  top,
IlvDim  bottom 
) [protected, virtual]

Implements the actual physical margins for the printer.

Parameters:
left The left margin.
right The right margin.
top The top margin.
bottom The bottom margin.

Implements IlvPrinter.

virtual void IlvPrinterPreview::internalSetOrientation ( Orientation  orient  )  [protected, virtual]

Implements the actual printing orientation change.

Parameters:
orient The new orientation.

Implements IlvPrinter.

virtual void IlvPrinterPreview::internalSetPaperFormat ( IlvPaperFormat const &  format  )  [protected, virtual]

Implements the actual paper format selection.

Parameters:
format The new paper dimensions.

Implements IlvPrinter.

virtual void IlvPrinterPreview::internalSetTransformer ( IlvTransformer const &  transformer  )  [protected, virtual]

Sets a new transformer to the printer.

Parameters:
transformer The 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 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.