CAknPopupField Class Reference

#include <mw/AknPopupField.h>

Link against: clockalarmeditor.lib

class CAknPopupField : public CEikBorderedControl

Inherits from

Nested Classes and Structures

Protected Attributes
CAsyncCallBack *iAttemptExitAsync
CAknPopupFieldBitmapButton *iButton
CEikButtonGroupContainer *iCba
TAknDesCArrayDecorator iDecorator
TInt iEmptyNoteResourceId
CAknNoteDialog::TTimeout iEmptyNoteTimeout
CAknNoteDialog::TTone iEmptyNoteTone
HBufC *iEmptyText
TInt iFlags
EAknFormMode iFormMode
HBufC *iInvalidText
CEikLabel *iLabel
CAknListBoxLayoutDecorator *iLayoutDecorator
TInt iMaxNoLines
MAknPopupFieldObserver *iObserver
HBufC *iOtherText
CAknFormGraphicStyleListBox *iSelectionList
EAknPopupFieldSelectionMode iSelectionMode
MAknQueryValue *iValue
TInt iWidth
Public Member Enumerations
enumEAknFormMode { EAknFormModeView, EAknFormModeEdit, EAknFormModeViewWideWithGraphic, EAknFormModeViewWideWithoutGraphic, ..., EAknFormModeEditWideWithoutGraphic }
enumEAknPopupFieldSelectionMode { EAknPopupFieldLabelMode, EAknPopupFieldSelectionListMode }
Public Member Functions
CAknPopupField()
~CAknPopupField()
IMPORT_C voidActivateSelectionListL()
IMPORT_C voidCloseSelectionListL()
virtual IMPORT_C voidConstructFromResourceL(TResourceReader &)
IMPORT_C voidConstructL()
EAknFormMode FormMode()
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
virtual IMPORT_C voidHandleResourceChange(TInt)
virtual IMPORT_C TSizeMinimumSize()
IMPORT_C TIntNumLines()
virtual IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &, TEventCode)
EAknPopupFieldSelectionMode SelectionMode()
IMPORT_C voidSetAllowsUserDefinedEntry(TBool)
IMPORT_C voidSetEmptyListNoteL(TInt, CAknNoteDialog::TTimeout, CAknNoteDialog::TTone)
IMPORT_C voidSetEmptyTextL(const TDesC &)
IMPORT_C voidSetFont(const CFont *)
IMPORT_C voidSetFormFieldRect(TRect)
IMPORT_C voidSetInvalidTextL(const TDesC &)
IMPORT_C voidSetMaxNumberOfLinesPermitted(TInt)
IMPORT_C voidSetOtherTextL(const TDesC &)
IMPORT_C voidSetPopupFieldObserver(MAknPopupFieldObserver *)
IMPORT_C voidSetQueryValueL(MAknQueryValue *)
IMPORT_C voidSetShowIndicatorsL(TBool)
Protected Member Functions
voidCommonConstructL()
virtual IMPORT_C CCoeControl *ComponentControl(TInt)
virtual IMPORT_C TIntCountComponentControls()
virtual IMPORT_C voidDraw(const TRect &)
virtual IMPORT_C voidFocusChanged(TDrawNow)
IMPORT_C voidHandleControlEventL(CCoeControl *, TCoeEvent)
IMPORT_C voidHandleListBoxEventL(CEikListBox *, TListBoxEvent)
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
IMPORT_C voidProcessCommandL(TInt)
virtual IMPORT_C voidSizeChanged()
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder
Inherited Enumerations
CCoeControl:TZoomType
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
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()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::ActivateL()
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CCoeControlArray
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::InputCapabilities()const
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MakeVisible(TBool)
CCoeControl::MaximumWidth()const
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetContainerWindowL(const CCoeControl &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetDimmed(TBool)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikBorderedControl::WriteInternalStateL(RWriteStream &)const

Detailed Description

Represents a combo box type control, used to implement the Series 60 pop-up field.

Member Attribute Documentation

iAttemptExitAsync

CAsyncCallBack *iAttemptExitAsync[protected]

Active object for calling AttemptExitCallbackL asynchronously. Own.

iButton

CAknPopupFieldBitmapButton *iButton[protected]

Bitmap button for the popup field. Own.

iCba

CEikButtonGroupContainer *iCba[protected]

Button group container for the popup field. Own.

iDecorator

TAknDesCArrayDecorator iDecorator[protected]

Selection array for the popup field.

iEmptyNoteResourceId

TInt iEmptyNoteResourceId[protected]

Resource id for the empty note.

iEmptyNoteTimeout

CAknNoteDialog::TTimeout iEmptyNoteTimeout[protected]

Timeout for the empty tone.

iEmptyNoteTone

CAknNoteDialog::TTone iEmptyNoteTone[protected]

Tone for the empty note.

iEmptyText

HBufC *iEmptyText[protected]

The empty list note text. Own.

iFlags

TInt iFlags[protected]

Flags for the popup field.

iFormMode

EAknFormMode iFormMode[protected]

Enumeration representing form mode values.

iInvalidText

HBufC *iInvalidText[protected]

The invalid text. Used in the view state when none of the elements in the list are available. Own.

iLabel

CEikLabel *iLabel[protected]

Label of the popup field. Own.

iLayoutDecorator

CAknListBoxLayoutDecorator *iLayoutDecorator[protected]

Contains a popup field selection array and a leading text that will be inserted before the text from the descriptor array entry. Own.

iMaxNoLines

TInt iMaxNoLines[protected]

Maximum number of items in selection array.

iObserver

MAknPopupFieldObserver *iObserver[protected]

Observer for receiving events from the popup field. Not own.

iOtherText

HBufC *iOtherText[protected]

Text to the bottom of the selection array. Own.

iSelectionList

CAknFormGraphicStyleListBox *iSelectionList[protected]

List box for the popup field usage. Own.

iSelectionMode

EAknPopupFieldSelectionMode iSelectionMode[protected]

Enumeration representing selection mode values.

iValue

MAknQueryValue *iValue[protected]

Query value for the popup field. Not own.

iWidth

TInt iWidth[protected]

Maximum line width.

Member Enumeration Documentation

Enum EAknFormMode

Form mode for the popup field.

EnumeratorValueDescription
EAknFormModeView

View mode.

EAknFormModeEdit

Editable mode.

EAknFormModeViewWideWithGraphic

View mode with graphic.

EAknFormModeViewWideWithoutGraphic

View mode without graphic.

EAknFormModeEditWideWithGraphic

Edit mode with graphic.

EAknFormModeEditWideWithoutGraphic

Edit mode without graphic.

Enum EAknPopupFieldSelectionMode

Selection mode of the popup field.

EnumeratorValueDescription
EAknPopupFieldLabelMode

Label mode. In Label mode popup field is minimized and popup field looks identical to a list item. When it receives the selection key press it is changed to EAknPopupFieldSelectionListMode and the pre-defined list is displayed.

EAknPopupFieldSelectionListMode

Selection list mode. In this selection mode pre-defined popup selection list is displayed.

Constructor & Destructor Documentation

CAknPopupField ( )

IMPORT_CCAknPopupField()

C++ default constructor.

~CAknPopupField ( )

IMPORT_C~CAknPopupField()

Destructor

Member Function Documentation

ActivateSelectionListL ( )

IMPORT_C voidActivateSelectionListL()

Causes a list of pre-defined values to appear. Use this method to activate the pop-up field from a menu option command. Note that the desired control must be focused on before it can be activated.

CloseSelectionListL ( )

IMPORT_C voidCloseSelectionListL()

Closes the selection list

Since
v5.2

CommonConstructL ( )

voidCommonConstructL()[protected]

Construction tasks common to both a normal construction and a construction from a resource. Used from ConstructL() and ConstructFromResourceL().

ComponentControl ( TInt )

IMPORT_C CCoeControl *ComponentControl(TIntaIndex)const [protected, virtual]

Reimplemented from CCoeControl::ComponentControl(TInt)const

From CCoeControl.

Gets an indexed component of a compound control.

ParameterDescription
aIndexControl index.

Returns: The component control with an index of aIndex.

ConstructFromResourceL ( TResourceReader & )

IMPORT_C voidConstructFromResourceL(TResourceReader &aReader)[virtual]

Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)

From CCoeControl.

Constructs the control from a resource file.

ParameterDescription
aReaderThe resource reader pointing to the popup field resource.

ConstructL ( )

IMPORT_C voidConstructL()

Handles 2nd phase construction.

CountComponentControls ( )

IMPORT_C TIntCountComponentControls()const [protected, virtual]

Reimplemented from CCoeControl::CountComponentControls()const

From CCoeControl.

Gets the number of controls contained in a compound control.

Returns: The number of component controls contained by this control.

Draw ( const TRect & )

IMPORT_C voidDraw(const TRect &aRect)const [protected, virtual]

Reimplemented from CEikBorderedControl::Draw(const TRect &)const

From CEikBorderedControl.

Called by the framework to draw the control.

ParameterDescription
aRectRectangle in which the Cone framework believes drawing is needed.

FocusChanged ( TDrawNow )

IMPORT_C voidFocusChanged(TDrawNowaDrawNow)[protected, virtual]

Reimplemented from CCoeControl::FocusChanged(TDrawNow)

From CCoeControl.

Responds to a change in focus.

ParameterDescription
aDrawNowContains the value that was passed to it by SetFocus().

FormMode ( )

EAknFormMode FormMode()const [inline]

HandleControlEventL ( CCoeControl *, TCoeEvent )

IMPORT_C voidHandleControlEventL(CCoeControl *aControl,
TCoeEventaEvent
)[protected]

From MCoeControlObserver.

Handles an event from an observed control.

ParameterDescription
aControlThe control that sent the event.
aEventThe event type.

HandleListBoxEventL ( CEikListBox *, TListBoxEvent )

IMPORT_C voidHandleListBoxEventL(CEikListBox *aListBox,
TListBoxEventaEventType
)[protected]

From MEikListBoxObserver.

Processes key events from the listbox. Responds to EEventEnterKeyPressed to accept the pop-up.

ParameterDescription
aListBoxListbox being observed.
aEventTypeEvent observed.

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl.

Handles pointer events of popup field list.

ParameterDescription
aPointerEventThe pointer event to be handled.

HandleResourceChange ( TInt )

IMPORT_C voidHandleResourceChange(TIntaType)[virtual]

From CCoeControl.

Handles a change to the control's resources.

ParameterDescription
aTypeThe type of the resource change.

MinimumSize ( )

IMPORT_C TSizeMinimumSize()[virtual]

Reimplemented from CCoeControl::MinimumSize()

From CCoeControl.

Determines the minimum size of the control.

Returns: The minimum size required by the control.

MopSupplyObject ( TTypeUid )

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)[protected]

From CCoeControl.

Retrieves an object of the same type as that encapsulated in aId.

ParameterDescription
aIdAn encapsulated object type ID.

Returns: Encapsulates the pointer to the object provided. Note that the encapsulated pointer may be NULL.

NumLines ( )

IMPORT_C TIntNumLines()const

Number of lines used.

Returns: Number of entries on the selection list. If selection list is not active, 1 is returned. NOTE that the number is limited by KAknMaxEditorLines.

OfferKeyEventL ( const TKeyEvent &, TEventCode )

IMPORT_C TKeyResponseOfferKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)[virtual]

From CCoeControl.

Handles key events.

ParameterDescription
aKeyEventThe key event.
aTypeThe type of key event.

Returns: Indicates whether or not the key event was used by this control.

ProcessCommandL ( TInt )

IMPORT_C voidProcessCommandL(TIntaCommandId)[protected]

From MEikCommandObserver.

Processes events from the softkeys. Responds to EAknSoftkeyOk and EAknSoftkeyCancel to accept or cancel the pop-up.

ParameterDescription
aCommandIdEvent Id from the soft-key.

SelectionMode ( )

EAknPopupFieldSelectionMode SelectionMode()const [inline]

SetAllowsUserDefinedEntry ( TBool )

IMPORT_C voidSetAllowsUserDefinedEntry(TBoolaAllows)

Sets a flag that enables user defined entry. Note that flag can also be set from resources, but this method allows behaviour to be changed at runtime.

ParameterDescription
aAllowsif ETrue sets a flag.

SetEmptyListNoteL ( TInt, CAknNoteDialog::TTimeout, CAknNoteDialog::TTone )

IMPORT_C voidSetEmptyListNoteL(TIntaResourceId,
CAknNoteDialog::TTimeoutaTimeout = CAknNoteDialog::EShortTimeout,
CAknNoteDialog::TToneaTone = CAknNoteDialog::ENoTone
)

Sets the note to be displayed when the selection list has no items available.

ParameterDescription
aResourceIdResource id for the note.
aTimeout= CAknNoteDialog::EShortTimeout Timeout for the note.
aTone= CAknNoteDialog::ENoTone Tone for the note.

SetEmptyTextL ( const TDesC & )

IMPORT_C voidSetEmptyTextL(const TDesC &aEmptyText)

Sets the empty list note text. This note is displayed when the selection list has no items available.

ParameterDescription
aEmptyTextThe empty list note text.

SetFont ( const CFont * )

IMPORT_C voidSetFont(const CFont *aFont)

Sets the font of the contained label.

ParameterDescription
aFontFont definition used to set the font of the contained label.

SetFormFieldRect ( TRect )

IMPORT_C voidSetFormFieldRect(TRectaFormFieldRect)

Sets a form field rectangle so that a popup field can correctly position the label.

ParameterDescription
aFormFieldRectThe form field rectangle.

SetInvalidTextL ( const TDesC & )

IMPORT_C voidSetInvalidTextL(const TDesC &aInvalidText)

Sets the text for view state when none of the elements in the list are available.

ParameterDescription
aInvalidTextThe invalid text.

SetMaxNumberOfLinesPermitted ( TInt )

IMPORT_C voidSetMaxNumberOfLinesPermitted(TIntaMaxNoLines)

/** Sets the maximium number of lines that can be displayed.

ParameterDescription
aMaxNoLinesThe maximum number of lines.

SetOtherTextL ( const TDesC & )

IMPORT_C voidSetOtherTextL(const TDesC &aOtherText)

Sets the text to be added to the bottom of the array to enter user defined data.

ParameterDescription
aOtherTextText to the bottom of the selection array.

SetPopupFieldObserver ( MAknPopupFieldObserver * )

IMPORT_C voidSetPopupFieldObserver(MAknPopupFieldObserver *aObserver)

Sets an observer of this class to receive events from popup field.

ParameterDescription
aObserverPointer to the class that implements the observer interface.

SetQueryValueL ( MAknQueryValue * )

IMPORT_C voidSetQueryValueL(MAknQueryValue *aValue)

Used by the client to set the query value. It is used to represent the user defined query value in this popup field control.

ParameterDescription
aValuePointer to query value, ownership is not passed.

SetShowIndicatorsL ( TBool )

IMPORT_C voidSetShowIndicatorsL(TBoolaShowIndicators)

Sets a flag that determines whether the indicators are shown. In practice the indicators have the appearance of radio buttons.

ParameterDescription
aShowIndicatorsIf ETrue, indicators are displayed.

SizeChanged ( )

IMPORT_C voidSizeChanged()[protected, virtual]

Reimplemented from CCoeControl::SizeChanged()

From CCoeControl.

Responds to changes to the size and position of the contents of this control.