Rogue Wave Views Foundation Package API Reference Guide |
Rogue Wave Views Documentation Home |
Class to actually display the printing preview. More...
#include <ilviews/printing/prevdisplayer.h>
Public Types |
Public Member Functions | |
IlvPrinterPreviewDisplayer (IlvPrinterPreview &printerPreview, IlvContainer *container) | |
Constructor. More... | |
virtual | ~IlvPrinterPreviewDisplayer () |
The destructor. | |
void | center () |
This function centers the preview in the page. | |
virtual void | clean ()=0 |
This function removes all the objects to be printed from the container. More... | |
virtual IlvRect | computeSize (IlInt index, IlBoolean redraw=IlTrue) const =0 |
This function computes the bounding box of the page referenced by an index. More... | |
IlvContainer * | getContainer () const |
This function returns the container where the preview is displayed. More... | |
virtual IlInt | getDisplayedPageNumber () const =0 |
This function returns the number of pages currently displayed. More... | |
IlInt | getFirstDisplayedPage () const |
Gets the first displayed page. More... | |
virtual Mode | getMode () const =0 |
This function gets the current mode. More... | |
IlvPrinterPreview & | getPrinterPreview () const |
This function returns the preview printer associated with this displayer. More... | |
IlvRect const & | getVisibleSize () const |
This function returns the size used to display the preview. More... | |
virtual IlBoolean | isDisplayed (IlInt page) const =0 |
This function returns whether a page is actually displayed. More... | |
virtual IlBoolean | isSameMode (Mode mode) const =0 |
This function checks whether the current mode is equal to the mode given as parameter. More... | |
virtual void | refresh () const =0 |
This function forces a redraw. More... | |
void | setFirstDisplayedPage (IlInt page) |
Sets the first page to be displayed. More... | |
void | setVisibleSize (IlvRect const &newVisibleSize) |
This function sets the size used to display the preview. More... | |
virtual void | updateSizes ()=0 |
This function updates the size of the page(s). More... | |
Static Public Member Functions | |
static IlvPrinterPreviewDisplayer * | Factory (Mode mode, IlvPrinterPreview &preview, IlvContainer *container) |
This static function builds an actual instance according to the mode given as parameter. More... | |
Protected Member Functions | |
IlInt | getPageNumber () const |
This function returns the number of pages to be displayed. More... | |
virtual void | updatePages ()=0 |
This function updates the pages to be displayed. More... | |
Class to actually display the printing preview.
Library: ilvprint
This is an abstract class.
Three inherited classes exist internally to manage one-page, two-page, or tiled displays respectively. These three classes are used by the built-in printing preview dialog defined by the the IlvPrinterPreviewDialog
.
IlvPrinterPreviewDisplayer::IlvPrinterPreviewDisplayer | ( | IlvPrinterPreview & | printerPreview, |
IlvContainer * | container | ||
) |
Constructor.
IlvPrinterPreview
must already be initialized. printerPreview | The preview printer associated with this displayer. |
container | The container where to draw. |
|
pure virtual |
This function removes all the objects to be printed from the container.
It is a pure virtual function and must be overloaded in inherited classes.
|
pure virtual |
This function computes the bounding box of the page referenced by an index.
It is a pure virtual function and must be overloaded in inherited classes.
index | The index of the page. |
redraw | A flag to force the redraw. |
|
static |
This static function builds an actual instance according to the mode given as parameter.
mode The mode of the building displayer. preview The preview printer associated with this displayer. container The container where to draw.
IlvContainer * IlvPrinterPreviewDisplayer::getContainer | ( | ) | const |
This function returns the container where the preview is displayed.
|
pure virtual |
This function returns the number of pages currently displayed.
It is a pure virtual function and must be overloaded in inherited classes.
IlInt IlvPrinterPreviewDisplayer::getFirstDisplayedPage | ( | ) | const |
Gets the first displayed page.
The pages are indexed from 0
.
|
pure virtual |
This function gets the current mode.
It is a pure virtual function and must be overloaded in inherited classes.
|
protected |
This function returns the number of pages to be displayed.
IlvPrinterPreview & IlvPrinterPreviewDisplayer::getPrinterPreview | ( | ) | const |
This function returns the preview printer associated with this displayer.
IlvRect const & IlvPrinterPreviewDisplayer::getVisibleSize | ( | ) | const |
This function returns the size used to display the preview.
This function returns whether a page is actually displayed.
It is a pure virtual function and must be overloaded in inherited classes. page The index of the page.
IlTrue
when the page is actually displayed, IlFalse
otherwise. This function checks whether the current mode is equal to the mode given as parameter.
It is a pure virtual function and must be overloaded in inherited classes.
mode | The mode to check with. |
IlTrue
when modes are equal, IlFalse
otherwise.
|
pure virtual |
This function forces a redraw.
It is a pure virtual function and must be overloaded in inherited classes.
void IlvPrinterPreviewDisplayer::setFirstDisplayedPage | ( | IlInt | page | ) |
Sets the first page to be displayed.
The pages are indexed from 0
. This function calls updatePages()
.
page | The first page to be displayed. |
updatePages()
. void IlvPrinterPreviewDisplayer::setVisibleSize | ( | IlvRect const & | newVisibleSize | ) |
This function sets the size used to display the preview.
newVisibleSize | The new size used to display the preview. |
|
protectedpure virtual |
This function updates the pages to be displayed.
This function is internally called by setFirstDisplayedPage()
.
setFirstDisplayedPage()
.
|
pure virtual |
This function updates the size of the page(s).
It is a pure virtual function and must be overloaded in inherited classes.
It currently calls computeSize()
.
© 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.