#include <fldbltin.h>
Link against: field.lib
class CNumPagesField : public CPageFieldBase, public CPageFieldBase |
Protected Attributes | |
---|---|
MFieldNumPagesInfo * | iNumPagesInfo |
Public Member Functions | |
---|---|
void | SetNumPagesInfo(MFieldNumPagesInfo *) |
virtual IMPORT_C TUid | Type() |
virtual IMPORT_C TInt | Value(TPtr &) |
Inherited Attributes | |
---|---|
CPageFieldBase::iStyle |
Inherited Enumerations | |
---|---|
CPageFieldBase:TNumberStyle |
A field which evaluates to the number of pages in the document.
Before the number of pages field can be evaluated, it must be passed a pointer to an object which implements the UpdateFieldNumPages() function.
MFieldNumPagesInfo * | iNumPagesInfo | [protected] |
void | SetNumPagesInfo | ( | MFieldNumPagesInfo * | aInfo | ) | [inline] |
Sets the object which implements UpdateFieldNumPages(), to get the number of pages in the document. SetNumPagesInfo() must be called before the number of pages field can be evaluated.
Parameters | |
---|---|
aInfo | Pointer to an object which implements UpdateFieldNumPages(). |
IMPORT_C TUid | Type | ( | ) | const [virtual] |
Reimplemented from CTextField::Type()const
Gets the field's type UID.
Reimplemented from CTextField::Value(TPtr &)
Gets the total number of pages in the document, by calling UpdateFieldNumPages() (implemented by the object passed to the field using SetNumPagesInfo()).
Notes
SetNumPagesInfo() must have been called beforehand, or a panic occurs.
The text object should support pagination and pagination should have occurred before evaluating the field.
Parameters | |
---|---|
aValueText | Descriptor which on return contains the number of pages in the document, converted into the appropriate style, as set by CPageFieldBase::SetNumberStyle(). |