Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: FLDBLTIN.H
Link against: field.lib

Class CPageNumField

class CPageNumField : public CPageFieldBase;

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

Members

Defined in CPageNumField:
SetPageNumInfo(), Type(), Value(), iPageNumInfo

Inherited from CBase:
Delete(), Extension_(), operator new()

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

Inherited from CTextField:
RestoreL(), StoreL()


Member functions


SetPageNumInfo()

inline 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().


Value()

virtual IMPORT_C TInt Value(TPtr &aValueText);

Description

Gets the current page number, by calling UpdateFieldPageNum() (implemented by the object passed to the field using SetPageNumInfo()).

Notes

SetPageNumInfo() 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

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.


Type()

virtual IMPORT_C TUid Type() const;

Description

Gets the field's type UID.

Return value

TUid

KPageNumberFieldUid.

[Top]


Member data


iPageNumInfo

protected: MFieldPageNumInfo * iPageNumInfo;

Description