Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Class that manages the document to print. More...
#include <ilviews/printing/document.h>
Classes | |
class | Iterator |
Iterator class to walk through the objects stored in an IlvPrintableDocument . More... | |
class | ThresholdHook |
Hook class to decide what to do when there are too many pages to print. More... | |
Public Types | |
enum | PrintingMode { WholeDocument, Page } |
The possible values for the printing mode. More... | |
Public Member Functions | |
IlvPrintableDocument (IlvPrintableLayout *layout, PrintingMode mode=WholeDocument) | |
Constructor. | |
~IlvPrintableDocument () | |
Destructor. | |
Iterator | append (IlvPrintable *printable, IlvPrintableLayout *layout) |
Appends an IlvPrintable . | |
Iterator | append (IlvPrintable *printable) |
Appends an IlvPrintable . | |
Iterator | begin () const |
Returns an iterator to the first IlvPrintable . | |
Iterator | end () const |
Returns an iterator to one past the last IlvPrintable . | |
IlvPrintableLayout * | getDefaultLayout () const |
Returns the IlvPrintableLayout used by default for this document. | |
PrintingMode | getPrintingMode () const |
Returns the printing mode used to print this document. | |
Iterator | insert (IlvPrintable *printable, IlvPrintableLayout *layout, Iterator const &iter) |
Inserts an IlvPrintable . | |
Iterator | insert (IlvPrintable *printable, Iterator const &iter) |
Inserts an IlvPrintable . | |
IlBoolean | print (IlvPrinter &printer, int first=0, int last=-1, int copyNumber=1, IlBoolean useAbsolutePageIndex=((IlBoolean) 1)) const |
Prints the document. | |
IlBoolean | print (IlvPrinter &printer, Iterator const &first, Iterator const &last, int copyNumber=1, IlBoolean useAbsolutePageIndex=((IlBoolean) 1)) const |
Prints the document. | |
void | setPrintingMode (PrintingMode mode) |
Sets the printing mode used to print this document. | |
void | setThresholdHook (ThresholdHook *newThresholdHook) |
Sets the threshold hook. |
Class that manages the document to print.
Library: ilvprint
This class contains a list of IlvPrintable
objects Each IlvPrintable
object is associated with an IlvPrintableLayout
object. These objects will be printed in the order of the list.
IlvPrintable
and IlvPrintableLayout
objects are reference counted. IlvPrintableDocument::IlvPrintableDocument | ( | IlvPrintableLayout * | layout, | |
PrintingMode | mode = WholeDocument | |||
) |
Constructor.
Initializes the object with an IlvPrintableLayout
that will be the default layout. It is also possible to define the printing mode.
layout | The default layout. | |
mode | The printing mode. The default value is WholeDocument . |
PrintingMode
IlvPrintableDocument::~IlvPrintableDocument | ( | ) |
Destructor.
Frees the resources used by the object: it decrements the reference counters of the IlvPrintable
and IlvPrintableLayout
instances that this object uses.
IlvPrintableDocument::Iterator IlvPrintableDocument::append | ( | IlvPrintable * | printable, | |
IlvPrintableLayout * | layout | |||
) |
Appends an IlvPrintable
.
printable | A const pointer to the IlvPrintable to be inserted at the end of this document. | |
layout | A const pointer to an IlvPrintableLayout to associate with the printable. |
Iterator
that points to one past the last inserted IlvPrintable
. IlvPrintableDocument::Iterator IlvPrintableDocument::append | ( | IlvPrintable * | printable | ) |
Appends an IlvPrintable
.
This function associates the default IlvPrintableLayout
instance to the IlvPrintable
object passed as as argument.
printable | A const pointer to the IlvPrintable to be inserted at the end of this document. |
Iterator
that points to one past the last inserted IlvPrintable
. Iterator IlvPrintableDocument::begin | ( | ) | const |
Returns an iterator to the first IlvPrintable
.
IlvPrintable
. Iterator IlvPrintableDocument::end | ( | ) | const |
Returns an iterator to one past the last IlvPrintable
.
IlvPrintable
. IlvPrintableLayout * IlvPrintableDocument::getDefaultLayout | ( | ) | const |
Returns the IlvPrintableLayout
used by default for this document.
IlvPrintableLayout
of this document. IlvPrintableDocument::PrintingMode IlvPrintableDocument::getPrintingMode | ( | ) | const |
Returns the printing mode used to print this document.
PrintingMode
. IlvPrintableDocument::Iterator IlvPrintableDocument::insert | ( | IlvPrintable * | printable, | |
IlvPrintableLayout * | layout, | |||
IlvPrintableDocument::Iterator const & | iter | |||
) |
Inserts an IlvPrintable
.
printable | A const pointer to the IlvPrintable to be inserted in this document. | |
layout | A const pointer to an IlvPrintableLayout to associate with the printable. | |
iter | A reference to an iterator to the location where the IlvPrintable must be inserted. |
Iterator
that points to one past the last inserted IlvPrintable
. IlvPrintableDocument::Iterator IlvPrintableDocument::insert | ( | IlvPrintable * | printable, | |
IlvPrintableDocument::Iterator const & | iter | |||
) |
Inserts an IlvPrintable
.
This function associates the default IlvPrintableLayout
instance to the IlvPrintable
object passed as an argument.
printable | A const pointer to the IlvPrintable to be inserted in this document. | |
iter | A reference to an iterator to the location where the IlvPrintable must be inserted. |
Iterator
that points to one past the last inserted IlvPrintable
. getPrintingMode
IlBoolean IlvPrintableDocument::print | ( | IlvPrinter & | printer, | |
int | first = 0 , |
|||
int | last = -1 , |
|||
int | copyNumber = 1 , |
|||
IlBoolean | useAbsolutePageIndex = ((IlBoolean) 1) | |||
) | const |
Prints the document.
This function prints the part of the document specified by the indices of the pages given as parameters. The printing is done on the device associated with the IlvPrinter
object given as argument. The layout is specified by the IlvPrintableLayout
objects associated with each printable.
printer | The IlvPrinter where printing is to occur. | |
first | The index (counted from 0) of the first page to print. The default value is 0 , that is, the first page of the document. | |
last | The index (counted from 0) of the last page to print. The default value is -1 , that is, the last page of the document. | |
copyNumber | The number of copies. The default value is 1 . | |
useAbsolutePageIndex | When it is IlFalse , the page numbers start from 1. Otherwise, they start from the page number that would have been if the printing had started from the first page. |
IlBoolean
. The value IlTrue
means that the printing was successful, IlFalse
that an error occurred. IlBoolean IlvPrintableDocument::print | ( | IlvPrinter & | printer, | |
Iterator const & | first, | |||
Iterator const & | last, | |||
int | copyNumber = 1 , |
|||
IlBoolean | useAbsolutePageIndex = ((IlBoolean) 1) | |||
) | const |
Prints the document.
This function prints the part of the document specified by the iterators given as parameters, that is, all the IlvPrintable
objects stored between these two iterators. The printing is done on the device associated with the IlvPrinter
object given as an argument. The layout is specified by the IlvPrintableLayout
objects associated with each printable.
printer | The IlvPrinter where printing is to occur. | |
first | A const reference to an Iterator that specifies where to start. | |
last | A const reference to an Iterator that specifies where to stop. This points to one past the last element to be printed. | |
copyNumber | The number of copies. The default value is 1 . | |
useAbsolutePageIndex | When it is IlFalse , the page numbers start from 1 . Otherwise, they start from the page number that would have been if the printing had started from the first printable. |
IlBoolean
. The value IlTrue
means that the printing was successful, IlFalse
that an error occurred. void IlvPrintableDocument::setPrintingMode | ( | IlvPrintableDocument::PrintingMode | mode | ) |
Sets the printing mode used to print this document.
mode | The printing mode. |
PrintingMode
, setPrintingMode
. void IlvPrintableDocument::setThresholdHook | ( | ThresholdHook * | newThresholdHook | ) |
Sets the threshold hook.
The pointer must be valid during the lifetime of this object or until the next call to this function. The pointed object is not deleted by this object.
newThresholdHook | The new threshold hook. |
© 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.