#include <mw/aknPopup.h>
class CAknPopupList : public CEikBorderedControl |
Public Member Enumerations | |
---|---|
enum | anonymous { ETypeId } |
Public Member Functions | |
---|---|
IMPORT_C CEikButtonGroupContainer * | ButtonGroupContainer() |
IMPORT_C void | CancelPopup() |
IMPORT_C TBool | EnableAdaptiveFind(TBool) |
IMPORT_C TBool | EnableFind(TBool) |
IMPORT_C TBool | ExecuteLD() |
IMPORT_C CAknSearchField * | FindBox() |
virtual IMPORT_C void | HandlePointerEventL(const TPointerEvent &) |
IMPORT_C CAknPopupHeadingPane * | Heading() |
IMPORT_C CAknPopupHeadingPane * | Heading() |
IMPORT_C CEikListBox * | ListBox() |
IMPORT_C CAknPopupList * | NewL(CEikListBox *, TInt, AknPopupLayouts::TAknPopupLayouts) |
IMPORT_C void | SetMaximumHeight(TInt) |
IMPORT_C void | SetTitleL(const TDesC &) |
Protected Member Functions | |
---|---|
CAknPopupList() | |
~CAknPopupList() | |
virtual IMPORT_C void | AttemptExitL(TBool) |
IMPORT_C void | ConstructL(CEikListBox *, TInt, AknPopupLayouts::TAknPopupLayouts) |
IMPORT_C void | FadeBehindPopup(TBool) |
IMPORT_C void | HandleControlEventL(CCoeControl *, TCoeEvent) |
IMPORT_C void | HandleListBoxEventL(CEikListBox *, TListBoxEvent) |
virtual IMPORT_C void | HandleResourceChange(TInt) |
IMPORT_C const TAknPopupWindowLayoutDef & | Layout() |
IMPORT_C TAknPopupWindowLayoutDef & | Layout() |
IMPORT_C CEikListBox * | ListBox() |
IMPORT_C TTypeUid::Ptr | MopSupplyObject(TTypeUid) |
IMPORT_C void | ProcessCommandL(TInt) |
virtual IMPORT_C void | SetupWindowLayout(AknPopupLayouts::TAknPopupLayouts) |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
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 { ... }
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().
TAknPopupWindowLayoutDef | iLayout | [protected] |
collects all LAF specification lines that are needed for popup window.
CEikButtonGroupContainer * | iPopoutCba | [protected] |
A button group container - a wrapper around the different button arrays.
CAknPopupHeadingPane * | iTitle | [protected] |
Header control for queries. Defines properties of the header of the pop-up menu.
IMPORT_C void | AttemptExitL | ( | TBool | aAccept | ) | [protected, virtual] |
Called when the user accepts or cancels the listbox.
Parameter | Description |
---|---|
aAccept | ETrue if the user has accepted, EFalse if the user has cancelled the listbox. |
IMPORT_C CEikButtonGroupContainer * | ButtonGroupContainer | ( | ) |
Gets a button group container.
Returns: The button group.
IMPORT_C void | CancelPopup | ( | ) |
Cancels the current popup. The popup ExecuteLD will return with EFalse.
IMPORT_C void | ConstructL | ( | CEikListBox * | aListBox, |
TInt | aCbaResource, | |||
AknPopupLayouts::TAknPopupLayouts | aType | |||
) | [protected] |
Handles 2nd phase construction.
Parameter | Description |
---|---|
aListBox | Pre-existing listbox-derived class. |
aCbaResource | Softkey pane to display while pop-up is active. |
aType | The layout used. |
IMPORT_C TBool | ExecuteLD | ( | ) |
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.
IMPORT_C CAknSearchField * | FindBox | ( | ) | const |
Gets the search field control.
Returns: Search field control.
IMPORT_C void | HandleControlEventL | ( | CCoeControl * | aControl, |
TCoeEvent | aEventType | |||
) | [protected] |
From MCoeControlObserver.
Handles an event from an observed control.
Parameter | Description |
---|---|
aControl | Control being observed. |
aEventType | Event observed. |
IMPORT_C void | HandleListBoxEventL | ( | CEikListBox * | aListBox, |
TListBoxEvent | aEventType | |||
) | [protected] |
From MEikListBoxObserver.
Processes key events from the listbox. Responds to EEventEnterKeyPressed to accept the pop-up.
Parameter | Description |
---|---|
aListBox | Listbox being observed. |
aEventType | Event being observed. |
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikBorderedControl::HandlePointerEventL(const TPointerEvent &)
From CCoeControl.
Handles pointer events of popups.
Parameter | Description |
---|---|
aPointerEvent | Pointer event to be handled. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [protected, virtual] |
Reimplemented from CEikBorderedControl::HandleResourceChange(TInt)
From CCoeControl.
Handles a change to the control's resources.
Parameter | Description |
---|---|
aType | A message UID value. |
IMPORT_C CAknPopupHeadingPane * | Heading | ( | ) |
Gets the popup header.
Returns: Header properties of the pop-up menu.
IMPORT_C CAknPopupHeadingPane * | Heading | ( | ) | const |
Gets the popup header.
Returns: Header properties of the pop-up menu.
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.
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.
IMPORT_C CEikListBox * | ListBox | ( | ) | const [protected] |
Returns the listbox being used.
Returns: Listbox contained in the pop-up.
IMPORT_C TTypeUid::Ptr | MopSupplyObject | ( | TTypeUid | aId | ) | [protected] |
Reimplemented from CCoeControl::MopSupplyObject(TTypeUid)
From MopSupplyObject.
Retrieves an object of the same type as that encapsulated in aId.
Parameter | Description |
---|---|
aId | Encapsulated object type ID. |
Returns: Encapsulates the pointer to the object provided. Note that the encapsulated pointer may be NULL.
IMPORT_C CAknPopupList * | NewL | ( | CEikListBox * | aListBox, |
TInt | aCbaResource, | |||
AknPopupLayouts::TAknPopupLayouts | aType = AknPopupLayouts::EMenuWindow | |||
) | [static] |
Two-phased constructor.
Creates the pop-up list.
Parameter | Description |
---|---|
aListBox | Pre-existing listbox-derived class. |
aCbaResource | Softkey pane to display while pop-up is active. |
aType | The layout used. |
Returns: A pointer to a pop-up list object.
IMPORT_C void | ProcessCommandL | ( | TInt | aCommandId | ) | [protected] |
From MEikCommandObserver.
Processes events from the softkeys. Responds to EAknSoftkeyOk and EAknSoftkeyBack to accept or cancel the pop-up.
Parameter | Description |
---|---|
aCommandId | Event Id from the soft-key. |
IMPORT_C void | SetMaximumHeight | ( | TInt | aItems | ) |
Sets the maximum height for the popup frame.
Parameter | Description |
---|---|
aItems | The maximum height. |
IMPORT_C void | SetTitleL | ( | const TDesC & | aTitle | ) |
Sets the title for the selection list.
Parameter | Description |
---|---|
aTitle | Title to be displayed. |
IMPORT_C void | SetupWindowLayout | ( | AknPopupLayouts::TAknPopupLayouts | aType | ) | [protected, virtual] |
Setup the whole window layout; window position, grid and heading position, shadow for the window.
Parameter | Description |
---|---|
aType | A choice of layout. |