Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: fldbltin.h
Link against: field.lib

Class CNumPagesField

CNumPagesField

Support

Supported from 5.0

Description

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.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CNumPagesFieldA field which evaluates to the number of pages in the document
CPageFieldBaseStores a style for displaying the value of numeric fields
CTextFieldThe abstract base class for all fields

Defined in CNumPagesField:
SetNumPagesInfo(), Type(), Value()

Inherited from CBase:
operator new()

Inherited from CPageFieldBase:
EAlphabeticLower, EAlphabeticUpper, EArabic, ERomanLower, ERomanUpper, ExternalizeL(), InternalizeL(), NumberStyle(), SetNumberStyle(), TNumberStyle

Inherited from CTextField:
RestoreL(), StoreL()


Evaluate field


Value()

TInt Value(TPtr& aValueText);

Description

Gets the total number of pages in the document, by calling UpdateFieldNumPages() (implemented by the object passed to the field using SetNumPagesInfo()).

Notes

Parameters

TPtr& aValueText

Descriptor which on return contains the number of pages in the document, converted into the appropriate style, as set by CPageFieldBase::SetNumberStyle().

Return value

TInt

Zero if aValueText is long enough to hold the string. Otherwise, the length of the buffer which is required to hold the string.


SetNumPagesInfo()

void SetNumPagesInfo(MFieldNumPagesInfo* aInfo);

Description

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

MFieldNumPagesInfo* aInfo

Pointer to an object which implements UpdateFieldNumPages().

[Top]


Field type


Type()

TUid Type()const;

Description

Gets the field's type UID.

Return value

TUid

KNumPagesFieldUid.