Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: cntfldst.h
Link against: cntmodel.lib

Class CContactTextField

CContactTextField

Support

Supported from 5.0

Description

Sets and gets the text stored in a contact item field. An object of this class can be retrieved using CContactItemField::TextStorage().

Derivation

CBaseBase class for all classes to be instantiated on the heap
CContactFieldStorageAbstract base class for the different types of contact field data storage
CContactTextFieldSets and gets the text stored in a contact item field

Defined in CContactTextField:
SetStandardTextArray(), SetStandardTextL(), SetText(), SetTextArray(), SetTextL(), StandardTextLC(), Text(), ~CContactTextField()

Inherited from CBase:
operator new()

Inherited from CContactFieldStorage:
ExternalizeL(), InternalizeL(), IsFull(), RestoreL(), StoreL()


Destructor


~CContactTextField()

~CContactTextField();

Description

Frees the text owned by the object, prior to its destruction.

[Top]


Set / get text


SetTextL()

void SetTextL(const TDesC& aText);

Description

Sets the text which is stored in the field. This function allocates a new HBufC descriptor, freeing any existing descriptor, and copies the new text into it.

Parameters

const TDesC& aText

The new field text.


SetText()

void SetText(HBufC *aHbuf);

Description

Sets the text which is stored in the field. The text field object takes ownership of the specified descriptor.

Parameters

HBufC* aHbuf

The new field text.


SetTextArray()

void SetTextArray(MDesCArray* anArray);

Description

Sets the text which is stored in the field from a descriptor array. Each descriptor in the array is appended to the text field storage. They are separated by paragraph delimiters (CEditableText::EParagraphDelimiter). Any existing text is replaced.

Parameters

MDesCArray* anArray

Pointer to array of descriptors to set as the field text.


Text()

TPtrC Text() const;

Description

Gets a copy of the text which is stored in the field.

Return value

TPtrC

Descriptor pointing to a copy of the field data.

[Top]


Set / get and convert text


StandardTextLC()

TPtrC StandardTextLC() const;

Support

Supported from 5.1

Description

Converts a copy of the text stored in the field from EPOC editable text format into plain text and returns it as a pointer descriptor.

Return value

TPtrC

Descriptor pointing to a copy of the field data as plain text.


SetStandardTextL()

void SetStandardTextL(const TDesC& aText);

Support

Supported from 5.1

Description

Converts a text string from plain text into EPOC editable text, and sets this as the text which is stored in the field.

Parameters

const TDesC& aText

The new field data.


SetStandardTextArray()

void SetStandardTextArray(MDesCArray* anArray);

Support

Supported from 5.1

Description

Converts an array of text strings from plain text into EPOC editable text, appends them to a single descriptor, separating them with a new line character, and sets this as the text which is stored in the field. Any existing field text is replaced.

Parameters

MDesCArray* anArray

Array of descriptors to set as the field data.