|
Symbian sdk帮助-类CWordModel
译文作者:小梁 |
| 译文版本:1.0 译文时间:2005-11-10 |
|
|
位于: WNGMODEL.H
Class CWordModel
class CWordModel : public CBase;
描述
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.
这根本上是由应用框架的ETEXT 组件提供的一薄层在富有的文本支持(CRichText 等)。
派生
- CBase - Base class for all classes to be instantiated on the heap
在堆中,基类对于所有类是被实例化的
- CWordModel - Word processor engine interface
字处理器引擎接口
成员
在 CwordModel中定义: CWordModel(), ConstructL(), ConstructMinimalL(), NewL(), NewL(), NormalStyleShortCut(), PageTable(), PrintSetup(), RestoreL(), RestoreMinimalL(), StoreL(), StyleList(), StyleShortCutList(), Text(), ~CWordModel()
从 CBase继承的: operator new()
构造和析构
NewL()
static IMPORT_C CWordModel *NewL(const MFieldFileNameInfo *aFileNameInfo, const MFieldNumPagesInfo *aFieldNumPagesInfo, const TDesC &aDriverPath);
描述
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
包含打印机驱动文件的目录 |
|
返回值
NewL()
static IMPORT_C CWordModel *NewL(const MFieldFileNameInfo *aFileNameInfo, const MFieldNumPagesInfo *aFieldNumPagesInfo);
描述
Allocates and creates a new word processor engine.
分配和创造一个新文字处理软件引擎
参数
|
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()
IMPORT_C ~CWordModel();
描述
Destructor.
析构器
返回值
CWordModel()
protected: IMPORT_C CWordModel();
描述
Default constructor.
默认的构造器
返回值
ConstructL()
protected: IMPORT_C void ConstructL(const MFieldFileNameInfo *aFileNameInfo, const MFieldNumPagesInfo *aNumPagesInfo);
描述
Second-phase constructor.
第二阶段构造器
参数
|
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.
回调接口返回当前文件的页数 |
|
返回值
成员函数
StoreL()
IMPORT_C void StoreL(CStreamStore &aStore, CStreamDictionary &aStreamDic, const CSecurityBase *aSecurity) const;
描述
Stores the engine.
存储引擎
This function writes the engine data to a stream store, and records the streams used in a stream dictionary.
这个函数对流存储写引擎数据,并且在流字典内记录使用的流
参数
|
CStreamStore &aStore |
Store to write to 写入存储 |
|
CStreamDictionary &aStreamDic |
Stream dictionary to write to 写入的流字典 |
|
const CSecurityBase *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 CSecurityBase *aSecurity, const MFieldFileNameInfo *aFileNameInfo=0,const MFieldNumPagesInfo *aNumPagesInfo=0, MPictureFactory *aPictureFactory=0);
描述
Restores the engine.
重新存储引擎
参数
|
const CStreamStore &aStore |
Store to read from 读入存储 |
|
const CStreamDictionary &aStreamDic |
Stream dictionary to read from 读入的流字典 |
|
const CSecurityBase *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.
一个实现MFieldFileNameInfo的可选的接口对象。这为在页眉或页脚插入一个域提供文件名。 |
|
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.
一个实现MFieldNumPagesInfo的可选的接口对象。这为在页眉或页脚插入一个域提供全部页数。 |
|
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 CSecurityBase *aSecurity, const MFieldFileNameInfo *aFileNameInfo=0,const MFieldNumPagesInfo *aNumPagesInfo=0, MPictureFactory *aPictureFactory=0);
描述
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.
这允许没有导入打印机驱动重新存储。页眉和页脚信息将不可用。
参数
返回值
Text()
inline CRichText *Text();
描述
Gets the engine's rich text object.
得到引擎的富文本对象。
返回值
|
CRichText * |
Engine's rich text object
引擎的富文本对象 |
|
StyleList()
inline CStyleList *StyleList();
描述
Gets the engine's style list object.
得到引擎的样式列表对象
返回值
PrintSetup()
inline CPrintSetup *PrintSetup();
描述
Gets the engine's print setup object.
得到引擎的打印安装对象
返回值
PageTable()
inline CArrayFix< TInt > *PageTable();
描述
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.
一个页表示一个整数数组,每一个整数代表一页中的字符数,这对分页有要求
返回值
StyleShortCutList()
inline CStyleShortCutList *StyleShortCutList();
描述
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.
这个对象存储一个键盘快捷方式的列表到样式(作为StyleList()返回)。这个]数组是在同样要求下和样式列表数组一样
返回值
NormalStyleShortCut()
inline TChar &NormalStyleShortCut();
描述
Gets the keybord short cut for the normal style.
得到对于普通样式的键盘快捷方式
返回值
|
TChar & |
Keybord short cut for the normal style
对于普通样式的键盘快捷方式 |
|
ConstructMinimalL()
protected: IMPORT_C void ConstructMinimalL(const MFieldFileNameInfo *aFileNameInfo, const MFieldNumPagesInfo *aFieldNumPagesInfo, const TDesC &aDriverPath);
描述
Second-phase constructor, with printer initialisation.
带有打印机初始化的第二阶段构造器
参数
|
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
包含打印机驱动文件的目录 |
|
返回值
|