rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

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

List of all members.

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=IlTrue, IlBoolean grab=IlFalse, 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=IlTrue, IlBoolean grab=IlFalse, IlvCursor *cursor=0)
 Displays the dialog as a modal dialog.
IlvPrinterPreviewDisplayer::Mode getMode () const
 Gets the current mode used to display the page(s).
IlvPrintergetReferencePrinter () 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).

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:
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.

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:
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 = IlTrue,
IlBoolean  grab = IlFalse,
IlvCursor cursor = 0 
)

Displays the dialog as a modal dialog.

Parameters:
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.
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:
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.
Returns:
The result.
See also:
getResult
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:
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.
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:
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.
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 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.

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

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

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

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

Parameters:
zoomFactor The new zoom factor.
See also:
getZoomFactor.
 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.