Location: prnprev.h
Link against: prev.lib
CPrintPreviewImage
Supported from 5.0
Print preview image.
This class provides a standard print preview image. An object of this type should be owned by a control, which is in turn owned by the print preview dialog. The control's window provides the region into which this object draws the preview image.
The class provides a callback to the application code that draws the preview pages.
|
Defined in CPrintPreviewImage
:
DrawL()
, EHideMargins
, EShowMargins
, FormatL()
, NewL()
, SetMargins()
, SetNumBands()
, SetObserver()
, TMarginState
, ~CPrintPreviewImage()
Inherited from CBase
:
operator new()
Inherited from MPageRegionPrinter
:
PrintBandL()
Inherited from MPrintProcessObserver
:
NotifyBandPrinted()
,
NotifyPrintEnded()
,
NotifyPrintStarted()
static CPrintPreviewImage* NewL(CPrintSetup& aPrintSetup,MPageRegionPrinter& aBodyPrinter, RWsSession& aWsSession,RWindow& aWindow,const TSize& aMaxWindowSize, const TPrintPreviewFormat& aStaticFormat);
Static constructor for a CPrintPreviewImage
object.
|
|
virtual ~CPrintPreviewImage();
Destructor.
This ends printing, and frees all resources owned by the CPrintPreviewImage
object, prior to its destruction.
void DrawL(const TPoint& aOrigin,const TRect& aInvalidRegion);
Draws the preview.
This function should be called every time the window needs to be refreshed.
Note that typically this function is called in the owning control's Draw()
function. Since DrawL()
can leave it must be called within a trap harness — the normal behaviour is to clear the image rectangle if a leave occurs.
|
|
|
void FormatL(TInt aNumPagesInDoc,TInt aFirstPageToDisplay,TInt aNumPagesToView);
Sets preview formatting information.
This function can be called prior to previewing, or dynamically during previewing. It is used to alter the display parameters, e.g. turn margin indicator lines on or off, show/hide labels, change the number of panels viewed, or scroll the preview to show different pages.
Note:
The panels are fitted to the maximum window area available. This means that the print preview dialog will always be the same size irrespective of the number of panels displayed.
|
|
void SetMargins(TMarginState aState);
Sets whether or not margins are displayed.
|
void SetNumBands(TInt aNum);
Sets the number of print bands to be drawn in the preview.
This object is created with the default number of bands equal to 1.
|
void SetObserver(MPrintProcessObserver& aObserver);
Sets the process observer.
The observer is informed of events occurring during print previewing. It allows error dialogs to be displayed by the GUI print preview dialogs if there are problems during previewing.
|
TMarginState
Margin display state flags.
|