Views
Foundation Package API Reference Guide
Product Documentation:
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

◆ ~IlvPrintable()

virtual IlvPrintable::~IlvPrintable ( )
virtual

The destructor.

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

◆ IlvPrintable()

IlvPrintable::IlvPrintable ( IlvPrintable const &  other)

The copy constructor.

Parameters
otherThe object to copy.

Member Function Documentation

◆ getBBox()

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 IlvPrintableFrame, IlvPrintableFormattedText, IlvPrintableText, IlvPrintableScalable, and IlvPrintableComposite.

◆ internalPrint()

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 IlvPrintableFrame, IlvPrintableGraphic, IlvPrintableFormattedText, IlvPrintableText, IlvPrintableContainer, and IlvPrintableComposite.

◆ lock()

void IlvPrintable::lock ( )

Locks the current instance.

A reference counter is incremented internally.

◆ operator=()

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

The assignment operator.

Parameters
otherAnother instance of this class.
Returns
A reference to the current object.

◆ print()

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.

◆ unlock()

void IlvPrintable::unlock ( )

Unlocks the current instance.

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