Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: WNGMODEL.H
Link against: wpeng.lib

Class CWordModel

class CWordModel : public CBase;

Description

Word processor engine interface.

This is essentially a thin layer over the rich text support (CRichText etc.) provided by the Application Framework's ETEXT component.

Derivation

Members

Defined in CWordModel:
CWordModel(), ConstructL(), ConstructMinimalL(), NewL(), NewL(), NormalStyleShortCut(), PageTable(), PrintSetup(), RestoreL(), RestoreMinimalL(), StoreL(), StyleList(), StyleShortCutList(), Text(), ~CWordModel()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

static IMPORT_C CWordModel *NewL(const MFieldFileNameInfo *aFileNameInfo, const MFieldNumPagesInfo *aFieldNumPagesInfo, const TDesC &aDriverPath);

Description

Allocates and creates a new word processor engine, and performs printer initalisation.

Parameters

const MFieldFileNameInfo *aFileNameInfo

Optional callback interface to get the current document's filename. This provides the file name for insertion into a field in the header or footer.

const MFieldNumPagesInfo *aFieldNumPagesInfo

Optional callback interface to return the number of pages in the current document. This provides the total number of pages for insertion into a field in the header or footer.

const TDesC &aDriverPath

Directory that contains printer driver files

Return value

CWordModel *

New word processor engine


NewL()

static IMPORT_C CWordModel *NewL(const MFieldFileNameInfo *aFileNameInfo, const MFieldNumPagesInfo *aFieldNumPagesInfo);

Description

Allocates and creates a new word processor engine.

Parameters

const MFieldFileNameInfo *aFileNameInfo

Optional callback interface to get the current document's filename. This provides the file name for insertion into a field in the header or footer.

const MFieldNumPagesInfo *aFieldNumPagesInfo

Optional callback interface to return the number of pages in the current document. This provides the total number of pages for insertion into a field in the header or footer.

Return value

CWordModel *

New word processor engine


~CWordModel()

IMPORT_C ~CWordModel();

Description

Destructor.


CWordModel()

protected: IMPORT_C CWordModel();

Description

Default constructor.


ConstructL()

protected: IMPORT_C void ConstructL(const MFieldFileNameInfo *aFileNameInfo, const MFieldNumPagesInfo *aNumPagesInfo);

Description

Second-phase constructor.

Parameters

const MFieldFileNameInfo *aFileNameInfo

Callback interface to get the current document's filename.

const MFieldNumPagesInfo *aNumPagesInfo

Callback interface to return the number of pages in the current document.

[Top]


Member functions


StoreL()

IMPORT_C void StoreL(CStreamStore &aStore, CStreamDictionary &aStreamDic, const TAny *aSecurity) const;

Description

Stores the engine.

This function writes the engine data to a stream store, and records the streams used in a stream dictionary.

Parameters

CStreamStore &aStore

Store to write to

CStreamDictionary &aStreamDic

Stream dictionary to write to

const TAny *aSecurity

Optional security object. If this is specified, the stored text stream is encrypted


RestoreL()

IMPORT_C void RestoreL(const CStreamStore &aStore, const CStreamDictionary &aStreamDic, const TAny *aSecurity, const MFieldFileNameInfo *aFileNameInfo=0,const MFieldNumPagesInfo *aNumPagesInfo=0, MPictureFactory *aPictureFactory=0);

Description

Restores the engine.

Parameters

const CStreamStore &aStore

Store to read from

const CStreamDictionary &aStreamDic

Stream dictionary to read from

const TAny *aSecurity

Optional security object. This is required to read text from an encrypted stream.

const MFieldFileNameInfo *aFileNameInfo

An optional object implementing the MFieldFileNameInfo interface. This provides the file name for insertion into a field in the header or footer.

const MFieldNumPagesInfo *aNumPagesInfo

An optional object implementing the MFieldNumPagesInfo interface. This provides the total number of pages for insertion into a field in the header or footer.

MPictureFactory *aPictureFactory

An optional object implementing the picture factory interface. This is required if the header or footer contains pictures which should be restored.


RestoreMinimalL()

IMPORT_C void RestoreMinimalL(const CStreamStore &aStore, const CStreamDictionary &aStreamDic, const TAny *aSecurity, const MFieldFileNameInfo *aFileNameInfo=0,const MFieldNumPagesInfo *aNumPagesInfo=0, MPictureFactory *aPictureFactory=0);

Description

Restores the engine, without restoring the print setup stream.

This allows restoring without loading a printer driver. Header and footer information will not be available.

Parameters

const CStreamStore &aStore

Store to read from

const CStreamDictionary &aStreamDic

Stream dictionary to read from

const TAny *aSecurity

Optional security object. This is required to read text from an encrypted stream.

const MFieldFileNameInfo *aFileNameInfo

Unused

const MFieldNumPagesInfo *aNumPagesInfo

Unused

MPictureFactory *aPictureFactory

Unused


Text()

inline CRichText *Text();

Description

Gets the engine's rich text object.

Return value

CRichText *

Engine's rich text object


StyleList()

inline CStyleList *StyleList();

Description

Gets the engine's style list object.

Return value

CStyleList *

Engine's style list object


PrintSetup()

inline CPrintSetup *PrintSetup();

Description

Gets the engine's print setup object.

Return value

CPrintSetup *

Engine's print setup object


PageTable()

inline CArrayFix< TInt > *PageTable();

Description

Gets the engine's page table array.

A page table is an array of integers; each integer represents the number of characters on a page. It is required for pagination.

Return value

CArrayFix< TInt > *

Page table array


StyleShortCutList()

inline CStyleShortCutList *StyleShortCutList();

Description

Gets the engine's style short cuts array.

This object stores a list of keyboard shortcuts to the styles (as returned by StyleList()). The array is in the same order as the style list array.

Return value

CStyleShortCutList *

Engine's style short cuts array


NormalStyleShortCut()

inline TChar &NormalStyleShortCut();

Description

Gets the keybord short cut for the normal style.

Return value

TChar &

Keybord short cut for the normal style


ConstructMinimalL()

protected: IMPORT_C void ConstructMinimalL(const MFieldFileNameInfo *aFileNameInfo, const MFieldNumPagesInfo *aFieldNumPagesInfo, const TDesC &aDriverPath);

Description

Second-phase constructor, with printer initialisation.

Parameters

const MFieldFileNameInfo *aFileNameInfo

Optional callback interface to get the current document's filename. This provides the file name for insertion into a field in the header or footer.

const MFieldNumPagesInfo *aFieldNumPagesInfo

Optional callback interface to return the number of pages in the current document. This provides the total number of pages for insertion into a field in the header or footer.

const TDesC &aDriverPath

Directory that contains printer driver files