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
IlvPrintable Class Referenceabstract

This class encapsulates the object to be printed. More...

#include <ilviews/printing/printable.h>

Inheritance diagram for IlvPrintable:
IlvPrintableComposite IlvPrintableFrame IlvPrintableScalable IlvPrintableText IlvPrintableContainer IlvPrintableGraphic IlvPrintableFormattedText

Public Member Functions

 IlvPrintable ()
 The default constructor.
 
 IlvPrintable (IlvPrintable const &other)
 The copy constructor. More...
 
virtual ~IlvPrintable ()
 The destructor. More...
 
virtual IlvRect getBBox (IlvPrintableJob const &job) const =0
 Gets the bounding box of the area to print. More...
 
void lock ()
 Locks the current instance. More...
 
IlvPrintableoperator= (IlvPrintable const &other)
 The assignment operator. More...
 
IlBoolean print (IlvPrintableJob const &job) const
 Prints the contents of the object. More...
 
void unlock ()
 Unlocks the current instance. More...
 

Protected Member Functions

virtual IlBoolean internalPrint (IlvPrintableJob const &job) const =0
 This function actually prints the document. More...
 

Detailed Description

This class encapsulates the object to be printed.

Library: ilvprint

This is an abstract class that is intended to be inherited to encapsulate any object(s) that can be drawn on an IlvPort so that they may be printed.

Instances of this class should be contained in an IlvPrintableDocument object.

See also
IlvPrintableDocument::append

Constructor & Destructor Documentation

virtual IlvPrintable::~IlvPrintable ( )
virtual

The destructor.

This member function is likely to be overloaded in inherited classes.

IlvPrintable::IlvPrintable ( IlvPrintable const &  other)

The copy constructor.

Parameters
otherThe object to copy.

Member Function Documentation

virtual IlvRect IlvPrintable::getBBox ( IlvPrintableJob const &  job) const
pure virtual

Gets the bounding box of the area to print.

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

Parameters
jobThe settings of the current print job.
Returns
The bounding box.

Implemented in IlvPrintableComposite, IlvPrintableFrame, IlvPrintableFormattedText, IlvPrintableScalable, and IlvPrintableText.

virtual IlBoolean IlvPrintable::internalPrint ( IlvPrintableJob const &  job) const
protectedpure virtual

This function actually prints the document.

This pure virtual member function must be overloaded in inherited classes. It actually does the printing.

Parameters
jobThe settings of the current print job.
Returns
IlFalse if an error occurred during the printing, or IlTrue otherwise.

Implemented in IlvPrintableComposite, IlvPrintableFrame, IlvPrintableGraphic, IlvPrintableFormattedText, IlvPrintableText, and IlvPrintableContainer.

void IlvPrintable::lock ( )

Locks the current instance.

A reference counter is incremented internally.

IlvPrintable& IlvPrintable::operator= ( IlvPrintable const &  other)

The assignment operator.

Parameters
otherAnother instance of this class.
Returns
A reference to the current object.
IlBoolean IlvPrintable::print ( IlvPrintableJob const &  job) const

Prints the contents of the object.

This function uses the job given as the parameter to get the settings of the current print job.

It actually sets the clipping area and calls the virtual function internalPrint.

Parameters
jobThe settings of the current print job.
Returns
IlFalse if an error occurred during the printing, or IlTrue otherwise.
void IlvPrintable::unlock ( )

Unlocks the current instance.

A reference counter is decremented internally; when the reference counter reaches 0, the instance is deleted.


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