CPreviewProcess Class Reference

class CPreviewProcess : public CActive

Inherits from

Public Member Functions
~CPreviewProcess ()
TInt CurrentPageNum ()
CPreviewProcess * NewL ( TInt )
void SetHeaderFooter ( CHeaderFooterPrinter *, CHeaderFooterPrinter *)
void SetObserver ( MPrintProcessObserver *)
void StartPreview (const TPrintParameters &, CGraphicsDevice &, MPageRegionPrinter &, const TPageSpec &, TInt , void **)
void TerminatePrint ( TInt )
Protected Member Functions
CPreviewProcess ( TInt )
void DoCancel ()
void EndProcess ( TInt )
TBool IncrementPrintState ()
void InformObserver ()
void Init (const TPrintParameters &, MPageRegionPrinter &, void **)
void PrintBandL ( CGraphicsDevice *)
void RunL ()
void SetRequestStatus ()
Private Member Functions
void SetBandRect ()
const CPreviewProcess & operator= (const CPreviewProcess &)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Inherited Enumerations
CActive:TPriority
Protected Attributes
TBandAttributes iBandAttribs
MPageRegionPrinter * iBodyPrinter
TInt iCurrentBandNum
TInt iCurrentPageNum
CHeaderFooterPrinter * iFooterPrinter
CHeaderFooterPrinter * iHeaderPrinter
MPrintProcessObserver * iObserver
void ** iOwnerReferencePtr
TPrintParameters iPrintParams
Private Attributes
__DECLARE_TEST
TInt iFlags
TInt iNumBands
TPageSpec iPageSpec
CGraphicsDevice * iPreviewDev
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CPreviewProcess(TInt)

CPreviewProcess ( TInt aPriority ) [protected]

Parameters

TInt aPriority

~CPreviewProcess()

~CPreviewProcess ( ) [virtual]

Member Functions Documentation

CurrentPageNum()

TInt CurrentPageNum ( ) const

DoCancel()

void DoCancel ( ) [protected, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel() .

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel() .

CActive::Cancel

EndProcess(TInt)

void EndProcess ( TInt aErrNum =  KErrNone ) [protected, virtual]

Parameters

TInt aErrNum =  KErrNone

IncrementPrintState()

TBool IncrementPrintState ( ) [protected, virtual]

InformObserver()

void InformObserver ( ) [protected, virtual]

Init(const TPrintParameters &, MPageRegionPrinter &, void **)

void Init ( const TPrintParameters & aPrintParams,
MPageRegionPrinter & aBodyPrinter,
void ** aRef
) [protected]

Parameters

const TPrintParameters & aPrintParams
MPageRegionPrinter & aBodyPrinter
void ** aRef

NewL(TInt)

CPreviewProcess * NewL ( TInt aPriority = EPriority ) [static]

Parameters

TInt aPriority = EPriority

PrintBandL(CGraphicsDevice *)

void PrintBandL ( CGraphicsDevice * aDev ) [protected, virtual]

Parameters

CGraphicsDevice * aDev

RunL()

void RunL ( ) [protected, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD

SetBandRect()

void SetBandRect ( ) [private]

SetHeaderFooter(CHeaderFooterPrinter *, CHeaderFooterPrinter *)

void SetHeaderFooter ( CHeaderFooterPrinter * aHeaderPrinter,
CHeaderFooterPrinter * aFooterPrinter
)

Parameters

CHeaderFooterPrinter * aHeaderPrinter
CHeaderFooterPrinter * aFooterPrinter

SetObserver(MPrintProcessObserver *)

void SetObserver ( MPrintProcessObserver * anObserver )

Parameters

MPrintProcessObserver * anObserver

SetRequestStatus()

void SetRequestStatus ( ) [protected]

StartPreview(const TPrintParameters &, CGraphicsDevice &, MPageRegionPrinter &, const TPageSpec &, TInt, void **)

void StartPreview ( const TPrintParameters & aPrintParams,
CGraphicsDevice & aPrinterDev,
MPageRegionPrinter & aBodyPrinter,
const TPageSpec & aPageSpec,
TInt aNumBands,
void ** aRef
)

Parameters

const TPrintParameters & aPrintParams
CGraphicsDevice & aPrinterDev
MPageRegionPrinter & aBodyPrinter
const TPageSpec & aPageSpec
TInt aNumBands
void ** aRef

TerminatePrint(TInt)

void TerminatePrint ( TInt aErrNum )

Parameters

TInt aErrNum

operator=(const CPreviewProcess &)

const CPreviewProcess & operator= ( const CPreviewProcess & aProcess ) [private]

Parameters

const CPreviewProcess & aProcess

Member Data Documentation

__DECLARE_TEST

__DECLARE_TEST [private]

TBandAttributes iBandAttribs

TBandAttributes iBandAttribs [protected]

MPageRegionPrinter * iBodyPrinter

MPageRegionPrinter * iBodyPrinter [protected]

TInt iCurrentBandNum

TInt iCurrentBandNum [protected]

TInt iCurrentPageNum

TInt iCurrentPageNum [protected]

TInt iFlags

TInt iFlags [private]

CHeaderFooterPrinter * iFooterPrinter

CHeaderFooterPrinter * iFooterPrinter [protected]

CHeaderFooterPrinter * iHeaderPrinter

CHeaderFooterPrinter * iHeaderPrinter [protected]

TInt iNumBands

TInt iNumBands [private]

MPrintProcessObserver * iObserver

MPrintProcessObserver * iObserver [protected]

void ** iOwnerReferencePtr

void ** iOwnerReferencePtr [protected]

TPageSpec iPageSpec

TPageSpec iPageSpec [private]

CGraphicsDevice * iPreviewDev

CGraphicsDevice * iPreviewDev [private]

TPrintParameters iPrintParams

TPrintParameters iPrintParams [protected]