rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvPrinter Class Reference

Base class for the printer classes. More...

#include <ilviews/printing/printer.h>

Inheritance diagram for IlvPrinter:
IlvPrinterPreview IlvPSPrinter IlvWindowsPrinter

List of all members.

Public Types

enum  Orientation { , Portrait, Landscape }
 

This enumeration defines the possible values for the printing orientation.

More...

Public Member Functions

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

Protected Member Functions

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

Detailed Description

Base class for the printer classes.

Library: ilvprint

This class is intended to be derived by implementing the member function makePort(). Its purpose is to encapsulate the printer information and handling.

See also:
IlvPaperFormat

Member Enumeration Documentation

This enumeration defines the possible values for the printing orientation.

mode of the IlvPrinter. This mode defines if the printer will print in portrait or landscape.

Enumerator:
Portrait 

The orientation is portrait.

Landscape 

The orientation is landscape.


Constructor & Destructor Documentation

IlvPrinter::IlvPrinter ( IlvDisplay display  ) 

Constructor.

This is the constructor. It initializes the object in a coherent state. The default paper size is A4. The default paper mode is IlvPrinter::Printing. The default paper orientation is IlvPrinter::Portrait.

virtual IlvPrinter::~IlvPrinter (  )  [virtual]

Destructor.

The destructor actually does nothing, but it is declared as virtual so that inherited classes may overload it.


Member Function Documentation

virtual IlBoolean IlvPrinter::checkErrorStatus (  )  const [pure virtual]

Checks the error status of the printer.

This pure virtual member function must be overloaded in inherited classes.

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

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

void IlvPrinter::end (  ) 

Closes the dump device.

Closes the dump device and does all the necessary cleaning.

void IlvPrinter::forceDialogDisplay ( IlBoolean  force  ) 

Sets whether the dialog must be displayed.

This is meaningful only if a setting dialog is attached to the printer.

Parameters:
force The new value of the flag to force the display of the dialog.
IlvRegion const * IlvPrinter::getClip (  )  const

Gets the current clip of the printer.

Returns:
The current clip.
IlvDisplay * IlvPrinter::getDisplay (  )  const

Returns the display.

Returns:
The display.
IlString IlvPrinter::getDocumentName (  )  const

Returns the document name.

Returns:
The document name.
IlvRect const * IlvPrinter::getInitClip (  )  const

Gets the global clip of the printer.

Returns:
The global clip.
void IlvPrinter::getMargins ( IlvDim left,
IlvDim right,
IlvDim top,
IlvDim bottom 
) const

Returns the printer's physical margins.

Note that a modification of the orientation exchanges the axes, the previous left margin is now the top one, and so on.

Parameters:
left The left margin.
right The right margin.
top The top margin.
bottom The bottom margin.
IlvPrinter::Orientation IlvPrinter::getOrientation (  )  const

Returns the printing orientation.

Returns:
The printing orientation.
IlvPaperFormat const & IlvPrinter::getPaperFormat (  )  const

Returns the paper format.

Returns:
The paper format.
virtual IlvDim IlvPrinter::getPaperHeight (  )  const [pure virtual]

Returns the height of the paper.

This pure virtual member function must be overloaded in inherited classes.

Returns:
The height of the paper.

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

virtual IlvRect IlvPrinter::getPaperSize (  )  const [pure virtual]

Returns the size of the paper.

This pure virtual member function must be overloaded in inherited classes.

Returns:
The size of the paper.

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

virtual IlvDim IlvPrinter::getPaperWidth (  )  const [pure virtual]

Returns the width of the paper.

This pure virtual member function must be overloaded in inherited classes.

Returns:
The width of the paper.

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

IlvPort * IlvPrinter::getPort (  )  const

Returns the printer port.

Returns:
The printer port.
IlvTransformer const & IlvPrinter::getTransformer (  )  const

Gets the current transformer of the printer.

Returns:
The current transformer.
virtual IlvRect IlvPrinter::getUsableArea (  )  const [pure virtual]

Returns the physical printable area.

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

This pure virtual member function must be overloaded in inherited classes.

Returns:
The usable physical printable area.

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

void IlvPrinter::initClip ( IlvRect const &  newClip  ) 

Sets the global clip of the printer.

Parameters:
newClip The new global clip.
IlBoolean IlvPrinter::initialize (  ) 

Initializes the dump device.

This member function calls the pure virtual member function internalInitialize.

If this function returns false, it is not necessary to call end().

Returns:
IlFalse if an error or a cancellation occurred, IlTrue otherwise.
See also:
internalInitialize().
end().
virtual IlBoolean IlvPrinter::initializeSettings (  )  [pure virtual]

Initializes the settings of the printer.

This pure virtual member function must be overloaded in inherited classes.

This function is internally called by IlvPrintableDocument::print() and IlvPrinterPreviewDialog::get().

Returns:
IlFalse if an error occurred, IlTrue otherwise.

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

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

Sets a new global clip to the printer.

This pure virtual member function must be overloaded in inherited classes. This function is called by IlvPrinter::initClip.

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

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

virtual IlBoolean IlvPrinter::internalInitialize (  )  [protected, pure virtual]

Does specific initialization for the dump device.

This pure virtual member function must be overloaded in inherited classes.

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

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

virtual void IlvPrinter::internalSetClip ( IlvRegion const *  newClip  )  [protected, pure virtual]

Sets a new clip to the printer.

This pure virtual member function must be overloaded in inherited classes. This function is called by IlvPrinter::setClip.

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

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

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

Sets the actual physical margins for the printer.

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

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

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

Implements the actual printing orientation change.

Parameters:
orient The new orientation.

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

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

Implements the actual paper format selection.

This pure virtual member function must be overloaded in inherited classes.

Parameters:
format The new paper format.

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

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

Sets a new transformer to the printer.

This pure virtual member function must be overloaded in inherited classes. This function is called by IlvPrinter::setTransformer.

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

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

IlBoolean IlvPrinter::isDialogDisplayForced (  )  const

Returns whether the dialog must be displayed.

This is meaningful only if a setting dialog is attached to the printer.

Returns:
Whether the dialog must be displayed.
IlBoolean IlvPrinter::isDumping (  )  const

Returns the dumping status.

Returns:
IlTrue if it is dumping, IlFalse otherwise.
virtual IlvPort* IlvPrinter::makePort (  )  const [pure virtual]

Creates the port for printing on a real printer.

This pure virtual member function must be overloaded in inherited classes.

Returns:
The printer port.

Implemented in IlvPrinterPreview, IlvPSPrinter, and IlvWindowsPrinter.

void IlvPrinter::setClip ( IlvRect const &  newClip  ) 

Sets a new clip to the printer.

Parameters:
newClip The new clip.
void IlvPrinter::setClip ( IlvRegion const *  newClip  ) 

Sets a new clip to the printer.

Calls internalSetClip.

Parameters:
newClip The new clip.
See also:
internalSetClip.
void IlvPrinter::setDocumentName ( IlString const &  name  ) 

Sets the document name.

Parameters:
name The new document name.
void IlvPrinter::setDumpingStatus ( IlBoolean  status  )  [protected]

Sets the dumping status.

Parameters:
status IlTrue if it is dumping, IlFalse otherwise.
void IlvPrinter::setMargins ( IlvDim  left,
IlvDim  right,
IlvDim  top,
IlvDim  bottom 
)

Sets the physical margins for the printer.

Parameters:
left The left margin.
right The right margin.
top The top margin.
bottom The bottom margin.
void IlvPrinter::setOrientation ( Orientation  orientation  ) 

Sets the printing orientation.

Parameters:
orientation The new orientation.
void IlvPrinter::setPaperFormat ( IlvPaperFormat const &  format  ) 

Sets the paper format.

Parameters:
format The new paper format.
void IlvPrinter::setPort ( IlvPort port  ) 

Sets the port used when printing on a real printer.

Parameters:
port The new printing port.
void IlvPrinter::setTransformer ( IlvTransformer const &  newTransformer  ) 

Sets a new transformer to the printer.

Parameters:
newTransformer The new transformer.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© 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.