Rogue Wave Views Gadgets Package API Reference Guide |
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. More... | |
void | forceDialogDisplay (IlBoolean force) |
Sets whether the dialog must be displayed. More... | |
IlInt | get (IlvPrinter &referencePrinter, IlvPrintableDocument const &document, IlvPrintableDocument::Iterator const &first, IlvPrintableDocument::Iterator const &last, int copyNumber=1, IlBoolean useAbsolutePageIndex=IlTrue, IlBoolean grab=IlFalse, IlvCursor *cursor=0) |
Displays the dialog as a modal dialog. More... | |
IlInt | get (IlvPrinter &referencePrinter, IlvPrintableDocument const &document, int first=0, int last=-1, int copyNumber=1, IlBoolean useAbsolutePageIndex=IlTrue, IlBoolean grab=IlFalse, IlvCursor *cursor=0) |
Displays the dialog as a modal dialog. More... | |
IlvPrinterPreviewDisplayer::Mode | getMode () const |
Gets the current mode used to display the page(s). More... | |
IlvPrinter & | getReferencePrinter () const |
Gets the printer used as a reference to preview the printing. More... | |
IlInt | getResult () const |
Returns an integer value indicating if either the user clicked Apply or Cancel in the dialog, or an error occurred. More... | |
IlvTransfoParam | getZoomFactor () const |
Gets the current zoom factor used to display the page(s). More... | |
IlBoolean | isBad () const |
Checks the validity of the IlvPreviewDialog . More... | |
IlBoolean | isDialogDisplayForced () const |
Returns an indication of whether the dialog must be displayed. More... | |
void | setMode (IlvPrinterPreviewDisplayer::Mode mode) |
Sets the new mode used to display the page(s). More... | |
void | setZoomFactor (IlvTransfoParam zoomFactor) |
Sets the zoom factor used to display the page(s). More... | |
Public Member Functions inherited from IlvDialog | |
IlvDialog (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlUInt properties=0, IlvSystemView transientFor=0) | |
Constructor. More... | |
IlvDialog (IlvDisplay *display, const char *name, const char *title, const char *filename, const IlvRect *rect=0) | |
Constructor. More... | |
IlvDialog (IlvDisplay *display, const char *name, const char *title, const char *filename, IlUInt properties, const IlvRect *rect=0, IlvSystemView transientFor=0) | |
Constructor. More... | |
virtual void | apply () |
Is called when the callback associated with the apply symbol is triggered. More... | |
virtual void | cancel () |
Is called when the callback associated with the cancel symbol is triggered. More... | |
virtual void | wait (IlBoolean grab=IlFalse, IlvCursor *cursor=0) |
Displays a modal dialog. More... | |
IlBoolean | wasCanceled () const |
Returns the status of the dialog after closing it. More... | |
Public Member Functions inherited from IlvGadgetContainer | |
IlvGadgetContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue) | |
Constructor. More... | |
IlvGadgetContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlUInt properties, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue, IlvSystemView transientFor=0) | |
Constructor. More... | |
IlvGadgetContainer (IlvAbstractView *parent, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue) | |
Constructor. More... | |
IlvGadgetContainer (IlvDisplay *display, IlvSystemView parent, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue) | |
Constructor. More... | |
IlvGadgetContainer (IlvDisplay *display, IlvSystemView window, IlBoolean useacc=IlFalse) | |
Constructor. More... | |
virtual IlBoolean | allowFocus (IlBoolean value) |
Specifies whether the container manages the focus. More... | |
virtual void | applyResize (IlFloat sx, IlFloat sy, IlBoolean redraw=IlTrue) |
Is called to carry out the resize events applying to the gadget container. More... | |
IlBoolean | autoResize (IlBoolean a) |
Sets the auto resize mode of the gadget container. More... | |
IlvButton * | getDefaultButton () const |
Returns the default button of the gadget container. More... | |
virtual IlvGraphic * | getFirstFocusGraphic () const |
Returns the first object that receives the focus in this container. More... | |
virtual IlvGraphic * | getFocus () const |
Returns the object that has the keyboard focus in the gadget container. More... | |
virtual IlvGraphic * | getGrab () const |
Returns the object that is currently grabbing events in the container. More... | |
virtual IlvGraphic * | getLastFocusGraphic () const |
Returns the last object that receives the focus in this container. More... | |
IlvLookFeelHandler * | getLookFeelHandler () const |
Returns the look and feel handler associated with this container. More... | |
virtual IlvGraphic * | getNextFocusGraphic (IlvGraphic *object) const |
Returns the next object that will receive the focus after the specified object. More... | |
IlvGraphic * | getOverriddenFocus () const |
Returns the object that will receive the focus after calling setFocus() . More... | |
virtual IlvGraphic * | getPreviousFocusGraphic (IlvGraphic *object) const |
Returns the previous object that received the focus before the specified object. More... | |
IlBoolean | isAutoResizing () const |
Indicates whether the gadget container gets resized when loading a file. More... | |
virtual IlBoolean | isFocusAllowed () const |
Indicates whether the focus is allowed in the container. More... | |
virtual void | moveFocusAfter (IlBoolean redraw=IlTrue) |
Is called to find the next focusable object. More... | |
virtual void | moveFocusBefore (IlBoolean redraw=IlTrue) |
Is called to find the previous focusable object. More... | |
void | overrideFocus (IlvGraphic *obj) |
Sets the object that will receive the focus after calling setFocus() . More... | |
virtual void | removeGrab () |
Cancels the grabbing settings defined with setGrab() . More... | |
void | setDefaultButton (IlvButton *button, IlBoolean redraw=IlTrue) |
Sets the default button of the gadget container. More... | |
virtual void | setFocus (IlvGraphic *graphic=0, IlBoolean redraw=IlTrue) |
Sets the focus to the specified object of the gadget container. More... | |
virtual void | setGrab (IlvGraphic *object) |
Sets the specified object as the grabbing object. More... | |
void | setLookFeelHandler (IlvLookFeelHandler *lfh) |
Sets the look and feel handler of this container. More... | |
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.
IlvPrinterPreview
. 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, | ||
IlvPrintableDocument::Iterator const & | first, | ||
IlvPrintableDocument::Iterator const & | last, | ||
int | copyNumber = 1 , |
||
IlBoolean | useAbsolutePageIndex = IlTrue , |
||
IlBoolean | grab = IlFalse , |
||
IlvCursor * | cursor = 0 |
||
) |
Displays the dialog as a modal dialog.
grab | Specifies 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 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. |
getResult()
. IlInt IlvPrinterPreviewDialog::get | ( | IlvPrinter & | referencePrinter, |
IlvPrintableDocument const & | document, | ||
int | first = 0 , |
||
int | last = -1 , |
||
int | copyNumber = 1 , |
||
IlBoolean | useAbsolutePageIndex = IlTrue , |
||
IlBoolean | grab = IlFalse , |
||
IlvCursor * | cursor = 0 |
||
) |
Displays the dialog as a modal dialog.
grab | Specifies 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. |
getResult()
. 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).
|
virtual |
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. Reimplemented from IlvSystemPort.
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 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.