CAknEnumeratedTextSettingItem Class Reference

class CAknEnumeratedTextSettingItem : public CAknSettingItem

CAknEnumeratedTextSettingItem

Abstract Base class for deriving listbox setting page related setting items

The class provides standard array support for these setting items and their listboxes. Then approach is centred upon the CAknEnumeratedText type.

The texts are exposed to the user, and appear in two versions, if desired - the text shown in the setting list when not being edited, and the "popped-up" version of the texts.

Inherits from

Public Member Functions
CAknEnumeratedTextSettingItem(TInt)
~CAknEnumeratedTextSettingItem()
IMPORT_C CArrayPtr< CAknEnumeratedText > *EnumeratedTextArray()
IMPORT_C voidHandleTextArrayUpdateL()
IMPORT_C TIntIndexFromValue(TInt)
IMPORT_C TIntNumberOfItems()
IMPORT_C CArrayPtr< HBufC > *PoppedUpTextArray()
IMPORT_C voidSetEnumeratedTextArrays(CArrayPtr< CAknEnumeratedText > *, CArrayPtr< HBufC > *)
Protected Member Functions
IMPORT_C voidCompleteConstructionL()
IMPORT_C voidSetSettingPageTextL()
IMPORT_C CDesCArray *SettingPageTextArray()
Private Member Functions
IMPORT_C voidCAknSettingItem_Reserved()
voidDeleteAndZeroPrimaryArrays()
Inherited Functions
CAknSettingItem::AssociatedResourceId()const
CAknSettingItem::CAknSettingItem(TInt)
CAknSettingItem::ConstructL(const TBool,const TInt,const TDesC &,CArrayPtr< CGulIcon > *,const TInt,const TInt,const TInt,const TInt)
CAknSettingItem::CreateBitmapL()
CAknSettingItem::EditItemL(TBool)
CAknSettingItem::EditorControlType()const
CAknSettingItem::EmptyItemText()const
CAknSettingItem::HandleSettingPageEventL(CAknSettingPage *,TAknSettingPageEvent)
CAknSettingItem::HasIcon()const
CAknSettingItem::Identifier()const
CAknSettingItem::IsHidden()const
CAknSettingItem::IsNumberedStyle()const
CAknSettingItem::ListBoxText()
CAknSettingItem::LoadL()
CAknSettingItem::ProtectionState()
CAknSettingItem::SetCompulsoryIndTextL(const TDesC &)
CAknSettingItem::SetEmptyItemTextL(const TDesC &)
CAknSettingItem::SetHidden(TBool)
CAknSettingItem::SetIconMask(CFbsBitmap *)
CAknSettingItem::SetIconMaskAndReturnBitmap(CGulIcon *)
CAknSettingItem::SetParentListBox(const CEikFormattedCellListBox *)
CAknSettingItem::SetProtectionState(CAknSettingItem::TSettingItemProtection)
CAknSettingItem::SetSettingPage(CAknSettingPage *)
CAknSettingItem::SetSettingPageFlags(TInt)
CAknSettingItem::SetUpStandardSettingPageL()
CAknSettingItem::SettingEditorResourceId()const
CAknSettingItem::SettingName()
CAknSettingItem::SettingNumber()const
CAknSettingItem::SettingPage()const
CAknSettingItem::SettingPageFlags()const
CAknSettingItem::SettingPageResourceId()const
CAknSettingItem::SettingTextL()
CAknSettingItem::StoreL()
CAknSettingItem::UpdateListBoxTextL()
CAknSettingItem::VisibleIndex()
CAknSettingItem::~CAknSettingItem()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Inherited Enumerations
CAknSettingItem:TFlags
CAknSettingItem:TSettingItemProtection
Private Attributes
CArrayPtr< CAknEnumeratedText > *iEnumeratedTextArray
TInt iEnumeratedTextArrayResourceId
CArrayPtr< HBufC > *iPoppedUpTextArray
TInt iPoppedUpTextArrayResourceId
CDesCArrayFlat *iSettingPageText
HBufC *iSpare
TInt iTextPopupFlags

Constructor & Destructor Documentation

CAknEnumeratedTextSettingItem(TInt)

IMPORT_CCAknEnumeratedTextSettingItem(TIntaResourceId)

Constructor. Resource Id for the setting item

Parameters

TInt aResourceId

~CAknEnumeratedTextSettingItem()

IMPORT_C~CAknEnumeratedTextSettingItem()

Destructor

Member Functions Documentation

CAknSettingItem_Reserved()

IMPORT_C voidCAknSettingItem_Reserved()[private]

CompleteConstructionL()

IMPORT_C voidCompleteConstructionL()[protected, virtual]

Virtual method called by framework to complete the construction. In this class, the two arrays, pointers to which can be obtained by calling EnumeratedTextArray() and PoppedUpTextArray() are created.

DeleteAndZeroPrimaryArrays()

voidDeleteAndZeroPrimaryArrays()[private]

The primary text arrays (those set by SetEnumeratedTextArrays) are deleted and their references zeroed.

EnumeratedTextArray()

IMPORT_C CArrayPtr< CAknEnumeratedText > *EnumeratedTextArray()const

Access to the enumerated text array. Texts here are used in the setting item list display. No ownership of the array or its contents is transferred

HandleTextArrayUpdateL()

IMPORT_C voidHandleTextArrayUpdateL()[virtual]

Called to execute any code that might need to run when the text arrays are replaced. This class has a null implementation

IndexFromValue(TInt)

IMPORT_C TIntIndexFromValue(TIntaInputValue)const

Routine to find the index in the enumerated text list that corresponds to the value passed in.

Parameters

TInt aInputValuevalue to search for in the enumerated items

NumberOfItems()

IMPORT_C TIntNumberOfItems()const

Access to the number of items in the arrays

PoppedUpTextArray()

IMPORT_C CArrayPtr< HBufC > *PoppedUpTextArray()const

Access to the "popped up" array of texts. They may be defined differently from those in the enumerated text array so that the setting page items can be different from those displayed in the setting item editing list No ownership of the array or its contents is transferred

SetEnumeratedTextArrays(CArrayPtr< CAknEnumeratedText > *, CArrayPtr< HBufC > *)

IMPORT_C voidSetEnumeratedTextArrays(CArrayPtr< CAknEnumeratedText > *aEnumeratedTextArray,
CArrayPtr< HBufC > *PoppedUpTextArray
)

Set the enumerated arrays. Ownership of these arrays and their contents is wholly given over to the setting item object. The client must call HandleTextArrayUpdateL() after making this call.

After calling SetEnumeratedTextArrays(), it is the client code's responsibility to ensure that the current value of the external Tint value corresponds to one of the enumerated texts. This can be done, for instance, after calling SetEnumeratedTextArrays() by calling IndexFromValue() and ensuring a return value of a valid index (not -1 ). Otherwise, there will be a panic in HandleTextArrayUpdateL() when it is called.

This call transfers the ownership of the arrays, and the items pointed to by the arrays

Parameters

CArrayPtr< CAknEnumeratedText > * aEnumeratedTextArrayarray of Integer-Text pairs to be the new basis for display This is the master array, and its Count() determines the number of entries to display
CArrayPtr< HBufC > * PoppedUpTextArray

SetSettingPageTextL()

IMPORT_C voidSetSettingPageTextL()[protected]

Implementors of subclasses can call this non-virtual method to set up the list of texts to be used for the setting page. (Although it is not useful for CAknCheckBoxSettingPage) The list is constructed from the contents of the two text arrays, EnumeratedTextArray() and PoppedUpTextArray(). This is usually to be done "On the fly" immediately prior to the raising of a setting page.

SettingPageTextArray()

IMPORT_C CDesCArray *SettingPageTextArray()const [protected]

Accessor for the setting page text array

Member Data Documentation

CArrayPtr< CAknEnumeratedText > * iEnumeratedTextArray

CArrayPtr< CAknEnumeratedText > *iEnumeratedTextArray[private]

TInt iEnumeratedTextArrayResourceId

TInt iEnumeratedTextArrayResourceId[private]

CArrayPtr< HBufC > * iPoppedUpTextArray

CArrayPtr< HBufC > *iPoppedUpTextArray[private]

TInt iPoppedUpTextArrayResourceId

TInt iPoppedUpTextArrayResourceId[private]

CDesCArrayFlat * iSettingPageText

CDesCArrayFlat *iSettingPageText[private]

HBufC * iSpare

HBufC *iSpare[private]

TInt iTextPopupFlags

TInt iTextPopupFlags[private]