rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvPrintableDocument Class Reference

Class that manages the document to print. More...

#include <ilviews/printing/document.h>

List of all members.

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.
IlvPrintableLayoutgetDefaultLayout () 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.

Detailed Description

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.

Warning:
[note] The IlvPrintable and IlvPrintableLayout objects are reference counted.

Member Enumeration Documentation

The possible values for the printing mode.

This mode defines how several copies of the document will be printed.

Enumerator:
WholeDocument 

The whole document is printed for each copy.

Page 

Each page is printed according to the number of copies requested before other pages are printed.


Constructor & Destructor Documentation

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.

Parameters:
layout The default layout.
mode The printing mode. The default value is WholeDocument.
See also:
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.


Member Function Documentation

IlvPrintableDocument::Iterator IlvPrintableDocument::append ( IlvPrintable printable,
IlvPrintableLayout layout 
)

Appends an IlvPrintable.

Parameters:
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.
Returns:
An 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.

Parameters:
printable A const pointer to the IlvPrintable to be inserted at the end of this document.
Returns:
An Iterator that points to one past the last inserted IlvPrintable.
Iterator IlvPrintableDocument::begin (  )  const

Returns an iterator to the first IlvPrintable.

Returns:
An iterator to the first IlvPrintable.
Iterator IlvPrintableDocument::end (  )  const

Returns an iterator to one past the last IlvPrintable.

Returns:
An iterator to one past the last IlvPrintable.
IlvPrintableLayout * IlvPrintableDocument::getDefaultLayout (  )  const

Returns the IlvPrintableLayout used by default for this document.

Returns:
A pointer to the default IlvPrintableLayout of this document.
IlvPrintableDocument::PrintingMode IlvPrintableDocument::getPrintingMode (  )  const

Returns the printing mode used to print this document.

Returns:
The printing mode of this document.
See also:
PrintingMode.
IlvPrintableDocument::Iterator IlvPrintableDocument::insert ( IlvPrintable printable,
IlvPrintableLayout layout,
IlvPrintableDocument::Iterator const &  iter 
)

Inserts an IlvPrintable.

Parameters:
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.
Returns:
An 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.

Parameters:
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.
Returns:
An Iterator that points to one past the last inserted IlvPrintable.
See also:
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.

Parameters:
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.
Returns:
An 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.

Parameters:
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.
Returns:
An 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.

Parameters:
mode The printing mode.
See also:
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.

Parameters:
newThresholdHook The new threshold hook.
 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.