CAknPopupList Class Reference

#include <mw/aknPopup.h>

class CAknPopupList : public CEikBorderedControl

Inherits from

Protected Attributes
TBool iAppBroughtForwards
TInt iCurrentResource
CIdle *iIdle
TAknPopupWindowLayoutDef iLayout
CEikListBox *iListBox
TBool iMarkable
CEikButtonGroupContainer *iPopoutCba
TAknPopupFader iPopupFader
TBool *iReturn
CAknPopupHeadingPane *iTitle
CActiveSchedulerWait iWait
AknPopupLayouts::TAknPopupLayouts iWindowType
Public Member Enumerations
enumanonymous { ETypeId }
Public Member Functions
IMPORT_C CEikButtonGroupContainer *ButtonGroupContainer()
IMPORT_C voidCancelPopup()
IMPORT_C TBoolEnableAdaptiveFind(TBool)
IMPORT_C TBoolEnableFind(TBool)
IMPORT_C TBoolExecuteLD()
IMPORT_C CAknSearchField *FindBox()
virtual IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C CAknPopupHeadingPane *Heading()
IMPORT_C CAknPopupHeadingPane *Heading()
IMPORT_C CEikListBox *ListBox()
IMPORT_C CAknPopupList *NewL(CEikListBox *, TInt, AknPopupLayouts::TAknPopupLayouts)
IMPORT_C voidSetMaximumHeight(TInt)
IMPORT_C voidSetTitleL(const TDesC &)
Protected Member Functions
CAknPopupList()
~CAknPopupList()
virtual IMPORT_C voidAttemptExitL(TBool)
IMPORT_C voidConstructL(CEikListBox *, TInt, AknPopupLayouts::TAknPopupLayouts)
IMPORT_C voidFadeBehindPopup(TBool)
IMPORT_C voidHandleControlEventL(CCoeControl *, TCoeEvent)
IMPORT_C voidHandleListBoxEventL(CEikListBox *, TListBoxEvent)
virtual IMPORT_C voidHandleResourceChange(TInt)
IMPORT_C const TAknPopupWindowLayoutDef &Layout()
IMPORT_C TAknPopupWindowLayoutDef &Layout()
IMPORT_C CEikListBox *ListBox()
IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUid)
IMPORT_C voidProcessCommandL(TInt)
virtual IMPORT_C voidSetupWindowLayout(AknPopupLayouts::TAknPopupLayouts)
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::ConstructFromResourceL(TResourceReader &)
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::SizeChanged()
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

Used to popup a list or grid. Takes an existing listbox control and puts it into a popup frame together with an optional title.

CAknPopupList is not a dialog!

There are two standard usages of CAknPopupList:

  CAknPopupList *plist = CAknPopupList::NewL(...);
  CleanupStack::PushL(plist);
  ...
  TInt popupOk = plist->ExecuteLD(...);
  // No leaving functions allowed between ExecuteLD and
  // CleanupStack::Pop().
  CleanupStack::Pop(); // plist
  if (popupOk) { ... } else { ... } 
And then another way:
  iPList = CAknPopupList::NewL(...);
  ...
  TInt popupOk = iPlist->ExecuteLD(...);
  // No leaving functions allowed between ExecuteLD and iPlist=NULL;
  iPlist = NULL;
  if (popupOk) {... } else {... }
  // note, destructor deletes the iPlist instance.

Both these work corretly and leave-safe way. Notice this usage is pretty different of how dialogs work. With dialogs you _always_ want to do CleanupStack::Pop() before calling ExecuteLD().

Member Attribute Documentation

iAppBroughtForwards

TBool iAppBroughtForwards[protected]

iCurrentResource

TInt iCurrentResource[protected]

iIdle

CIdle *iIdle[protected]

iLayout

TAknPopupWindowLayoutDef iLayout[protected]

collects all LAF specification lines that are needed for popup window.

iListBox

CEikListBox *iListBox[protected]

iMarkable

TBool iMarkable[protected]

iPopoutCba

CEikButtonGroupContainer *iPopoutCba[protected]

A button group container - a wrapper around the different button arrays.

iPopupFader

TAknPopupFader iPopupFader[protected]

iReturn

TBool *iReturn[protected]

The address to hold the return value from the popup

iTitle

CAknPopupHeadingPane *iTitle[protected]

Header control for queries. Defines properties of the header of the pop-up menu.

iWait

CActiveSchedulerWait iWait[protected]

iWindowType

AknPopupLayouts::TAknPopupLayouts iWindowType[protected]

Popup layout type.

Member Enumeration Documentation

Enum anonymous

EnumeratorValueDescription
ETypeId0x20018439

Constructor & Destructor Documentation

CAknPopupList ( )

IMPORT_CCAknPopupList()[protected]

C++ default constructor.

~CAknPopupList ( )

IMPORT_C~CAknPopupList()[protected]

Destructor.

Member Function Documentation

AttemptExitL ( TBool )

IMPORT_C voidAttemptExitL(TBoolaAccept)[protected, virtual]

Called when the user accepts or cancels the listbox.

ParameterDescription
aAcceptETrue if the user has accepted, EFalse if the user has cancelled the listbox.

ButtonGroupContainer ( )

IMPORT_C CEikButtonGroupContainer *ButtonGroupContainer()

Gets a button group container.

Returns: The button group.

CancelPopup ( )

IMPORT_C voidCancelPopup()

Cancels the current popup. The popup ExecuteLD will return with EFalse.

ConstructL ( CEikListBox *, TInt, AknPopupLayouts::TAknPopupLayouts )

IMPORT_C voidConstructL(CEikListBox *aListBox,
TIntaCbaResource,
AknPopupLayouts::TAknPopupLayoutsaType
)[protected]

Handles 2nd phase construction.

ParameterDescription
aListBoxPre-existing listbox-derived class.
aCbaResourceSoftkey pane to display while pop-up is active.
aTypeThe layout used.

EnableAdaptiveFind ( TBool )

IMPORT_C TBoolEnableAdaptiveFind(TBoolaEnable = ETrue)

Enables the findbox with adaptive search of the popup list.

Since
5.0
ParameterDescription
aEnableEnables (default) or disables the adaptive findbox.

Returns: ETrue if enabling/disabling was successfull.

EnableFind ( TBool )

IMPORT_C TBoolEnableFind(TBoolaEnable = ETrue)

Enables the findbox of the popup list.

ParameterDescription
aEnableEnables (default) or disables the findbox.

Returns: ETrue if enabling/disabling was successfull.

ExecuteLD ( )

IMPORT_C TBoolExecuteLD()

Executes the pop-up selection list. Function returns when the user have accepted or cancelled the pop-up.

Returns: ETrue if the popup was accepted. EFalse if the popup was cancelled.

FadeBehindPopup ( TBool )

IMPORT_C voidFadeBehindPopup(TBoolaFade)[protected]

FindBox ( )

IMPORT_C CAknSearchField *FindBox()const

Gets the search field control.

Returns: Search field control.

HandleControlEventL ( CCoeControl *, TCoeEvent )

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

From MCoeControlObserver.

Handles an event from an observed control.

ParameterDescription
aControlControl being observed.
aEventTypeEvent observed.

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 being observed.

HandlePointerEventL ( const TPointerEvent & )

IMPORT_C voidHandlePointerEventL(const TPointerEvent &aPointerEvent)[virtual]

From CCoeControl.

Handles pointer events of popups.

ParameterDescription
aPointerEventPointer event to be handled.

HandleResourceChange ( TInt )

IMPORT_C voidHandleResourceChange(TIntaType)[protected, virtual]

From CCoeControl.

Handles a change to the control's resources.

ParameterDescription
aTypeA message UID value.

Heading ( )

IMPORT_C CAknPopupHeadingPane *Heading()

Gets the popup header.

Returns: Header properties of the pop-up menu.

Heading ( )

IMPORT_C CAknPopupHeadingPane *Heading()const

Gets the popup header.

Returns: Header properties of the pop-up menu.

Layout ( )

IMPORT_C const TAknPopupWindowLayoutDef &Layout()const [protected]

Gets the layout definitions for the popup list.

Returns: Collects all LAF specification lines that are needed for popup windows.

Layout ( )

IMPORT_C TAknPopupWindowLayoutDef &Layout()[protected]

Gets the layout definitions for the popup list.

Returns: Collects all LAF specification lines that are needed for popup windows.

ListBox ( )

IMPORT_C CEikListBox *ListBox()

Gets the list box.

Returns: The list box.

ListBox ( )

IMPORT_C CEikListBox *ListBox()const [protected]

Returns the listbox being used.

Returns: Listbox contained in the pop-up.

MopSupplyObject ( TTypeUid )

IMPORT_C TTypeUid::PtrMopSupplyObject(TTypeUidaId)[protected]

From MopSupplyObject.

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

ParameterDescription
aIdEncapsulated object type ID.

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

NewL ( CEikListBox *, TInt, AknPopupLayouts::TAknPopupLayouts )

IMPORT_C CAknPopupList *NewL(CEikListBox *aListBox,
TIntaCbaResource,
AknPopupLayouts::TAknPopupLayoutsaType = AknPopupLayouts::EMenuWindow
)[static]

Two-phased constructor.

Creates the pop-up list.

ParameterDescription
aListBoxPre-existing listbox-derived class.
aCbaResourceSoftkey pane to display while pop-up is active.
aTypeThe layout used.

Returns: A pointer to a pop-up list object.

ProcessCommandL ( TInt )

IMPORT_C voidProcessCommandL(TIntaCommandId)[protected]

From MEikCommandObserver.

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

ParameterDescription
aCommandIdEvent Id from the soft-key.

SetMaximumHeight ( TInt )

IMPORT_C voidSetMaximumHeight(TIntaItems)

Sets the maximum height for the popup frame.

ParameterDescription
aItemsThe maximum height.

SetTitleL ( const TDesC & )

IMPORT_C voidSetTitleL(const TDesC &aTitle)

Sets the title for the selection list.

ParameterDescription
aTitleTitle to be displayed.

SetupWindowLayout ( AknPopupLayouts::TAknPopupLayouts )

IMPORT_C voidSetupWindowLayout(AknPopupLayouts::TAknPopupLayoutsaType)[protected, virtual]

Setup the whole window layout; window position, grid and heading position, shadow for the window.

ParameterDescription
aTypeA choice of layout.