Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: fldbltin.h
Link against: field.lib

Class CPageNumField

CPageNumField

Support

Supported from 5.0

Description

A field which evaluates to the current page number in the document. Before the page number field can be evaluated, it must be passed a pointer to an object which implements the UpdateFieldPageNum() function.

Derivation

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

Defined in CPageNumField:
SetPageNumInfo(), 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 current page number, by calling UpdateFieldPageNum() (implemented by the object passed to the field using SetPageNumInfo()).

Notes

Parameters

TPtr& aValueText

Descriptor which on return contains the current page number, 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.


SetPageNumInfo()

void SetPageNumInfo(MFieldPageNumInfo* aInfo);

Description

Sets the object which implements UpdateFieldPageNum(), to get the current page number. SetPageNumInfo() must be called before the page number field can be evaluated.

Parameters

MFieldPageNumInfo* aInfo

Pointer to an object which implements UpdateFieldPageNum().

[Top]


Field type


Type()

TUid Type()const;

Description

Gets the field's type UID.

Return value

TUid

KPageNumberFieldUid.