API published in: S60 1st Ed
Link against: avkon.lib
Required Capabilities
None
#include <aknpopup.h>
Inherits CEikBorderedControl, MEikListBoxObserver, MAknIntermediateState, and MAknFadedComponent.
Inherited by CAknGMSPopupGrid.
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()
.
Public Member Functions |
|
IMPORT_C TBool | ExecuteLD () |
Executes the pop-up selection list. |
|
IMPORT_C void | SetTitleL (const TDesC &aTitle) |
Sets the title for the selection list. |
|
IMPORT_C void | CancelPopup () |
Cancels the current popup. |
|
IMPORT_C CEikButtonGroupContainer * | ButtonGroupContainer () |
Gets a button group container. |
|
IMPORT_C CAknPopupHeadingPane * | Heading () |
Gets the popup header. |
|
IMPORT_C CAknPopupHeadingPane * | Heading () const |
Gets the popup header. |
|
IMPORT_C CEikListBox * | ListBox () |
Gets the list box. |
|
IMPORT_C void | SetMaximumHeight (TInt aItems) |
Sets the maximum height for the popup frame. |
|
IMPORT_C TBool | EnableFind (TBool aEnable=ETrue) |
Enables the findbox of the popup list. |
|
IMPORT_C CAknSearchField * | FindBox () const |
Gets the search field control. |
|
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
From CCoeControl . |
|
Static Public Member Functions |
|
static IMPORT_C CAknPopupList * | NewL (CEikListBox *aListBox, TInt aCbaResource, AknPopupLayouts::TAknPopupLayouts aType=AknPopupLayouts::EMenuWindow) |
Two-phased constructor. |
|
Protected Member Functions |
|
IMPORT_C void | ProcessCommandL (TInt aCommandId) |
From MEikCommandObserver . |
|
IMPORT_C void | HandleListBoxEventL (CEikListBox *aListBox, TListBoxEvent aEventType) |
From MEikListBoxObserver . |
|
IMPORT_C void | HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType) |
From MCoeControlObserver . |
|
IMPORT_C | CAknPopupList () |
C++ default constructor. |
|
IMPORT_C | ~CAknPopupList () |
Destructor. |
|
IMPORT_C void | ConstructL (CEikListBox *aListBox, TInt aCbaResource, AknPopupLayouts::TAknPopupLayouts aType) |
Handles 2nd phase construction. |
|
virtual IMPORT_C void | AttemptExitL (TBool aAccept) |
Called when the user accepts or cancels the listbox. |
|
virtual IMPORT_C void | SetupWindowLayout (AknPopupLayouts::TAknPopupLayouts aType) |
Setup the whole window layout; window position, grid and heading position, shadow for the window. |
|
IMPORT_C CEikListBox * | ListBox () const |
Returns the listbox being used. |
|
IMPORT_C const TAknPopupWindowLayoutDef & | Layout () const |
Gets the layout definitions for the popup list. |
|
IMPORT_C TAknPopupWindowLayoutDef & | Layout () |
Gets the layout definitions for the popup list. |
|
IMPORT_C TTypeUid::Ptr | MopSupplyObject (TTypeUid aId) |
From MopSupplyObject . |
|
IMPORT_C void | HandleResourceChange (TInt aType) |
From CCoeControl . |
|
IMPORT_C void | FadeBehindPopup (TBool aFade) |
Protected Attributes |
|
CEikListBox * | iListBox |
CEikButtonGroupContainer * | iPopoutCba |
A button group container - a wrapper around the different button arrays. |
|
CAknPopupHeadingPane * | iTitle |
Header control for queries. |
|
TBool * | iReturn |
The address to hold the return value from the popup. |
|
TBool | iMarkable |
TInt | iCurrentResource |
AknPopupLayouts::TAknPopupLayouts | iWindowType |
Popup layout type. |
|
TAknPopupWindowLayoutDef | iLayout |
collects all LAF specification lines that are needed for popup window. |
|
TBool | iAppBroughtForwards |
TAknPopupFader | iPopupFader |
CIdle * | iIdle |
CActiveSchedulerWait | iWait |
|
C++ default constructor. |
|
Destructor. |
|
Called when the user accepts or cancels the listbox.
|
|
Gets a button group container.
|
|
Cancels the current popup.
The popup |
|
Handles 2nd phase construction.
|
|
Enables the findbox of the popup list.
|
|
Executes the pop-up selection list. Function returns when the user have accepted or cancelled the pop-up.
|
|
|
Gets the search field control.
|
|
From Handles an event from an observed control.
|
|
From
Processes key events from the listbox. Responds to
|
|
From Handles pointer events of popups.
Reimplemented from CEikBorderedControl. Reimplemented in CAknGMSPopupGrid. |
|
From Handles a change to the control's resources.
Reimplemented from CEikBorderedControl. |
|
Gets the popup header.
|
|
Gets the popup header.
|
|
Gets the layout definitions for the popup list.
|
|
Gets the layout definitions for the popup list.
|
|
Returns the listbox being used.
|
|
Gets the list box.
|
|
From
Retrieves an object of the same type as that encapsulated in
|
|
Two-phased constructor. Creates the pop-up list.
Reimplemented in CAknGMSPopupGrid. |
|
From
Processes events from the softkeys. Responds to
|
|
Sets the maximum height for the popup frame.
|
|
Sets the title for the selection list.
|
|
Setup the whole window layout; window position, grid and heading position, shadow for the window.
Reimplemented in CAknGMSPopupGrid. |
|
|
|
|
collects all LAF specification lines that are needed for popup window. |
|
|
|
A button group container - a wrapper around the different button arrays. |
|
|
The address to hold the return value from the popup. |
|
Header control for queries. Defines properties of the header of the pop-up menu. |
|
|
Popup layout type. |