»
Symbian OS v9.2 »
Symbian OS reference »
C++ component reference »
App engines WPENG »
CWordModel
Location:
WNGMODEL.H
Link against: wpeng.lib
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
CBase - Base class for all classes to be instantiated on the heapCWordModel - Word processor engine interface
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
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
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
IMPORT_C ~CWordModel();
Description
Destructor.
protected: IMPORT_C CWordModel();
Description
Default constructor.
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. |
|
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 |
|
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. |
|
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
inline CRichText *Text();
Description
Gets the engine's rich text object.
Return value
inline CStyleList *StyleList();
Description
Gets the engine's style list object.
Return value
inline CPrintSetup *PrintSetup();
Description
Gets the engine's print setup object.
Return value
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
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
inline TChar &NormalStyleShortCut();
Description
Gets the keybord short cut for the normal style.
Return value
TChar & |
Keybord short cut for the normal style |
|
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 |
|