rwlogo

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvPrinterPreviewDialog Class Reference

This class is a dialog that encapsulates the printing preview. More...

#include <ilviews/printing/previewdlg.h>

Inheritance diagram for IlvPrinterPreviewDialog:
IlvDialog IlvGadgetContainer IlvContainer IlvDrawingView IlvView IlvAbstractView IlvSystemPort IlvPort

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...
 
IlvPrintergetReferencePrinter () 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...
 
void attach (IlvStyleSheet *styleSheet)
 Associates a style sheet to this container. More...
 
IlBoolean autoResize (IlBoolean a)
 Sets the auto resize mode of the gadget container. More...
 
void detach (IlvStyleSheet *styleSheet)
 Dissociates a style sheet from this container. More...
 
IlvButtongetDefaultButton () const
 Returns the default button of the gadget container. More...
 
virtual IlvGraphicgetFirstFocusGraphic () const
 Returns the first object that receives the focus in this container. More...
 
virtual IlvGraphicgetFocus () const
 Returns the object that has the keyboard focus in the gadget container. More...
 
virtual IlvGraphicgetGrab () const
 Returns the object that is currently grabbing events in the container. More...
 
virtual IlvGraphicgetLastFocusGraphic () const
 Returns the last object that receives the focus in this container. More...
 
IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look and feel handler associated with this container. More...
 
virtual IlvGraphicgetNextFocusGraphic (IlvGraphic *object) const
 Returns the next object that will receive the focus after the specified object. More...
 
IlvGraphicgetOverriddenFocus () const
 Returns the object that will receive the focus after calling setFocus. More...
 
virtual IlvGraphicgetPreviousFocusGraphic (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 *, 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...
 

Detailed Description

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.

See Also
IlvPrinterPreview

Constructor & Destructor Documentation

IlvPrinterPreviewDialog::IlvPrinterPreviewDialog ( IlvDisplay display,
IlvSystemView  transientFor = 0,
IlvPrinterPreviewDisplayer::Mode  mode = IlvPrinterPreviewDisplayer::OnePage 
)

Constructor.

Initializes a new instance of an IlvPrinterPreviewDialog class.

Parameters
displayConnection to the display.
transientForThe view for which the dialog is transient. For more information about transient windows, see the IlvView constructors.
modeThe mode used to display the pages.

Member Function Documentation

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.

Parameters
forceThe 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.

Parameters
grabA 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.
Warning
[note] Some operating systems, such as Windows NT and Windows 95, do not allow system modal dialogs. On these operating systems, dialogs are always application modal.
Parameters
referencePrinterThe IlvPrinter taken as reference.
documentThe document to preview.
firstA const reference to an Iterator that specifies where to start.
lastA const reference to an Iterator that specifies where to stop. This points to one past the last element to be printed.
copyNumberThe number of copies. The default value is 1.
useAbsolutePageIndexWhen 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.
cursorThe cursor used to make the selection.
Returns
The result.
See Also
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.

Parameters
grabA 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.
Warning
[note] Some operating systems, such as Windows NT and Windows 95, do not allow system modal dialogs. On these operating systems, dialogs are always application modal.
Parameters
referencePrinterThe IlvPrinter taken as reference.
documentThe document to preview.
firstThe index (counted from 0) of the first page to print. The default value is 0, that is, the first page of the document.
lastThe index (counted from 0) of the last page to print. The default value is -1, that is, the last page of the document.
copyNumberThe number of copies. The default value is 1.
useAbsolutePageIndexWhen 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.
cursorThe cursor used to make the selection.
Returns
The result.
See Also
getResult
IlvPrinterPreviewDisplayer::Mode IlvPrinterPreviewDialog::getMode ( ) const

Gets the current mode used to display the page(s).

Returns
The current mode.
See Also
IlvPrinterPreviewDisplayer::Mode.
setMode.
IlvPrinter& IlvPrinterPreviewDialog::getReferencePrinter ( ) const

Gets the printer used as a reference to preview the printing.

Returns
A reference to an 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.

Returns
0 when cancelled, 1 when printed with no error, and any other value when printed with errors.
See Also
IlvDialog::wasCanceled
IlvTransfoParam IlvPrinterPreviewDialog::getZoomFactor ( ) const

Gets the current zoom factor used to display the page(s).

Returns
The current zoom factor.
See Also
setZoomFactor.
IlBoolean IlvPrinterPreviewDialog::isBad ( ) const
virtual

Checks the validity of the IlvPreviewDialog.

Returns
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 IlvAbstractView.

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.

Returns
Whether the dialog must be displayed.
void IlvPrinterPreviewDialog::setMode ( IlvPrinterPreviewDisplayer::Mode  mode)

Sets the new mode used to display the page(s).

Parameters
modeThe new mode.
See Also
IlvPrinterPreviewDisplayer::Mode.
getMode.
void IlvPrinterPreviewDialog::setZoomFactor ( IlvTransfoParam  zoomFactor)

Sets the zoom factor used to display the page(s).

Parameters
zoomFactorThe new zoom factor.
See Also
getZoomFactor.

© Copyright 2014, 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.