Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
This class is a dialog that encapsulates the printing preview. More...
#include <ilviews/printing/previewdlg.h>
Public Member Functions | |
IlvPrinterPreviewDialog (IlvDisplay *display, IlvSystemView transientFor=0, IlvPrinterPreviewDisplayer::Mode mode=IlvPrinterPreviewDisplayer::OnePage) | |
Constructor. | |
void | forceDialogDisplay (IlBoolean force) |
Sets whether the dialog must be displayed. | |
IlInt | get (IlvPrinter &referencePrinter, IlvPrintableDocument const &document, int first=0, int last=-1, int copyNumber=1, IlBoolean useAbsolutePageIndex=((IlBoolean) 1), IlBoolean grab=((IlBoolean) 0), IlvCursor *cursor=0) |
Displays the dialog as a modal dialog. | |
IlInt | get (IlvPrinter &referencePrinter, IlvPrintableDocument const &document, IlvPrintableDocument::Iterator const &first, IlvPrintableDocument::Iterator const &last, int copyNumber=1, IlBoolean useAbsolutePageIndex=((IlBoolean) 1), IlBoolean grab=((IlBoolean) 0), IlvCursor *cursor=0) |
Displays the dialog as a modal dialog. | |
IlvPrinterPreviewDisplayer::Mode | getMode () const |
Gets the current mode used to display the page(s). | |
IlvPrinter & | getReferencePrinter () const |
Gets the printer used as a reference to preview the printing. | |
IlInt | getResult () const |
Returns an integer value indicating if either the user clicked Apply or Cancel in the dialog, or an error occurred. | |
IlvTransfoParam | getZoomFactor () const |
Gets the current zoom factor used to display the page(s). | |
IlBoolean | isBad () const |
Checks the validity of the IlvPreviewDialog . | |
IlBoolean | isDialogDisplayForced () const |
Returns an indication of whether the dialog must be displayed. | |
void | setMode (IlvPrinterPreviewDisplayer::Mode mode) |
Sets the new mode used to display the page(s). | |
void | setZoomFactor (IlvTransfoParam zoomFactor) |
Sets the zoom factor used to display the page(s). |
This class is a dialog that encapsulates the printing preview.
Library: ilvprtdlg
The page(s) may be previewed in three modes (one by one page, or two by two pages, or twenty by twenty pages once). It may also be displayed with a zoom factor.
An example using this class is provided in the samples/foundation/printing directory.
IlvPrinterPreviewDialog::IlvPrinterPreviewDialog | ( | IlvDisplay * | display, | |
IlvSystemView | transientFor = 0 , |
|||
IlvPrinterPreviewDisplayer::Mode | mode = IlvPrinterPreviewDisplayer::OnePage | |||
) |
Constructor.
Initializes a new instance of an IlvPrinterPreviewDialog
class.
display | Connection to the display. | |
transientFor | The view for which the dialog is transient. For more information about transient windows, see the IlvView constructors. | |
mode | The mode used to display the pages. |
void IlvPrinterPreviewDialog::forceDialogDisplay | ( | IlBoolean | force | ) |
Sets whether the dialog must be displayed.
This is meaningful only if a settable dialog is attached to the printer.
force | The new value of the flag to force the display of the dialog. |
IlInt IlvPrinterPreviewDialog::get | ( | IlvPrinter & | referencePrinter, | |
IlvPrintableDocument const & | document, | |||
int | first = 0 , |
|||
int | last = -1 , |
|||
int | copyNumber = 1 , |
|||
IlBoolean | useAbsolutePageIndex = ((IlBoolean) 1) , |
|||
IlBoolean | grab = ((IlBoolean) 0) , |
|||
IlvCursor * | cursor = 0 | |||
) |
Displays the dialog as a modal dialog.
grab | A Boolean value specifying whether the dialog should be system modal. A system modal dialog grabs input events occurring on the entire system so that other applications are not able to catch any keyboard or mouse event until the member function returns. In this case, you can specify the cursor to be used with the cursor parameter. If grab is set to IlFalse (the default), the dialog is application modal, which means that the application does not receive input events in other windows. |
referencePrinter | The IlvPrinter taken as reference. | |
document | The document to preview. | |
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 number that would be used if the printing had started from the first page. | |
cursor | The cursor used to make the selection. |
IlInt IlvPrinterPreviewDialog::get | ( | IlvPrinter & | referencePrinter, | |
IlvPrintableDocument const & | document, | |||
IlvPrintableDocument::Iterator const & | first, | |||
IlvPrintableDocument::Iterator const & | last, | |||
int | copyNumber = 1 , |
|||
IlBoolean | useAbsolutePageIndex = ((IlBoolean) 1) , |
|||
IlBoolean | grab = ((IlBoolean) 0) , |
|||
IlvCursor * | cursor = 0 | |||
) |
Displays the dialog as a modal dialog.
grab | A Boolean value specifying whether the dialog should be system modal. A system modal dialog grabs input events occurring on the entire system so that other applications are not able to catch any keyboard or mouse event until the member function returns. In this case, you can specify the cursor to be used with the cursor parameter. If grab is set to IlFalse (the default), the dialog is application modal, which means that the application does not receive input events in other windows. |
referencePrinter | The IlvPrinter taken as reference. | |
document | The document to preview. | |
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 number that would be used if the printing had started from the first printable page. | |
cursor | The cursor used to make the selection. |
IlvPrinterPreviewDisplayer::Mode IlvPrinterPreviewDialog::getMode | ( | ) | const |
Gets the current mode used to display the page(s).
IlvPrinter& IlvPrinterPreviewDialog::getReferencePrinter | ( | ) | const |
Gets the printer used as a reference to preview the printing.
IlvPrinter
used as a reference to preview the printing. IlInt IlvPrinterPreviewDialog::getResult | ( | ) | const |
Returns an integer value indicating if either the user clicked Apply or Cancel in the dialog, or an error occurred.
0
when cancelled, 1
when printed with no error, and any other value when printed with errors. IlvDialog::wasCanceled
IlvTransfoParam IlvPrinterPreviewDialog::getZoomFactor | ( | ) | const |
Gets the current zoom factor used to display the page(s).
IlBoolean IlvPrinterPreviewDialog::isBad | ( | ) | const |
Checks the validity of the IlvPreviewDialog
.
IlFalse
if this object is valid, and IlTrue
if it is not. If it is not valid, simply delete this object without using it any further. IlBoolean IlvPrinterPreviewDialog::isDialogDisplayForced | ( | ) | const |
Returns an indication of whether the dialog must be displayed.
This is meaningful only if a settable dialog is attached to the printer.
void IlvPrinterPreviewDialog::setMode | ( | IlvPrinterPreviewDisplayer::Mode | mode | ) |
Sets the new mode used to display the page(s).
mode | The new mode. |
void IlvPrinterPreviewDialog::setZoomFactor | ( | IlvTransfoParam | zoomFactor | ) |
Sets the zoom factor used to display the page(s).
zoomFactor | The new zoom factor. |
© 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.