API published in: S60 1st Ed
Link against: avkon.lib eikctl.lib eikcoctl.lib
Required Capabilities
None
#include <aknselectionlist.h>
Inherits CAknSelectionListDialog.
The class provides a list with items markable with shift+selection_key.
What this class does:
1) Setup listbox for markable list (resource file still needs to be correct for markable lists :)
2) Loading default bitmaps
3) Handles mark/unmark/mark all/unmark all and edit list options menu visibility
4) Handles mark/unmark/mark all/unmark all commands from options menu
resource definition for this class:
RESOURCE DIALOG r_res_id_for_a_dialog { flags = EAknDialogMarkableList; buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK; items = { DLG_LINE { type = EAknCtSingleGraphicListBox; id = ESelectionListControl; control = LISTBOX { flags = EAknListBoxMarkableList; }; } // the next dlg line is optional. , DLG_LINE { itemflags = EEikDlgItemNonFocusing; id = EFindControl; type = EAknCtSelectionListFixedFind; } }; }
The listbox type can be one of the following ( defined in avkon.hrh and aknlists.h ):
EAknCtSingleListBox (See CAknSingleStyleListBox) EAknCtSingleNumberListBox (See CAknSingleNumberStyleListBox) EAknCtSingleHeadingListBox (See CAknSingleHeadingStyleListBox) EAknCtSingleGraphicListBox (See CAknSingleGraphicStyleListBox) EAknCtSingleGraphicHeadingListBox (See CAknSingleGraphicHeadingStyleListBox) EAknCtSingleNumberHeadingListBox (See CAknSingleNumberHeadingStyleListBox) EAknCtSingleLargeListBox (See CAknSingleLargeStyleListBox) EAknCtDoubleListBox (See CAknDoubleStyleListBox) EAknCtDoubleNumberListBox (See CAknDoubleNumberStyleListBox) EAknCtDoubleTimeListBox (See CAknDoubleTimeStyleListBox) EAknCtDoubleLargeListBox (See CAknDoubleLargeStyleListBox) EAknCtDoubleGraphicListBox (See CAknDoubleGraphicStyleListBox)
The type field while defining find can be one of the following:
EAknCtSelectionListFixedFind EAknCtSelectionListPopupFind
The menubar you give for markable list dialog should have one of the following as menu panes:
R_AVKON_MENUPANE_MARKABLE_LIST to get edit list menu R_AVKON_MENUPANE_MARKABLE_LIST_WITH_FIND_POPUP to get find and edit list
RESOURCE MENU_BAR r_res_id_for_a_menubar { titles = { MENU_TITLE { menu_pane = R_AVKON_MENUPANE_MARKABLE_LIST; } }; };
C++ Usage:
TInt openedItem = 0; MDesCArray *arrayOfItems = ...; CArrayFix<TInt> *selectedItems = ...; CAknMarkableListDialog *dialog = CAknMarkableListDialog::NewL(openedItem, selectedItems, arrayOfItems, R_RES_ID_FOR_A_MENUBAR); TInt result = dialog->ExecuteLD(R_RES_ID_FOR_A_DIALOG); if (result) { ... } else { ... }
Public Member Functions |
|
IMPORT_C void | ConstructL (TInt aMenuTitleResourceId) |
ConstructL() 2nd phase constructor. |
|
IMPORT_C | ~CAknMarkableListDialog () |
IMPORT_C void | HandlePointerEventL (const TPointerEvent &aPointerEvent) |
HandlePointerEventL() from CCoeControl. |
|
Static Public Member Functions |
|
static IMPORT_C CAknMarkableListDialog * | NewL (TInt &aOpenedItem, CArrayFix< TInt > *aSelectedItems, MDesCArray *aArray, TInt aMenuBarResourceId, TInt aOkMenuBarId, MEikCommandObserver *aObserver=0) |
CAknMarkableListDialog::NewL(). |
|
static IMPORT_C CAknMarkableListDialog * | NewLC (TInt &aOpenedItem, CArrayFix< TInt > *aSelectedItems, MDesCArray *aArray, TInt aMenuBarResourceId, TInt aOkMenuBarId, MEikCommandObserver *aObserver=0) |
CAknMarkableListDialog::NewL(). |
|
static IMPORT_C CAknMarkableListDialog * | NewL (TInt &aOpenedItem, CArrayFix< TInt > *aSelectedItems, MDesCArray *aArray, TInt aMenuBarResourceId, MEikCommandObserver *aObserver=0) |
NewL(). |
|
static IMPORT_C CAknMarkableListDialog * | NewLC (TInt &aOpenedItem, CArrayFix< TInt > *aSelectedItems, MDesCArray *aArray, TInt aMenuBarResourceId, MEikCommandObserver *aObserver=0) |
NewLC(). |
|
Protected Member Functions |
|
IMPORT_C | CAknMarkableListDialog (TInt &aOpenedItem, CArrayFix< TInt > *aSelectedItems, MDesCArray *aArray, TInt aMenuBarResourceId, TInt aOkMenuBarResourceId, MEikCommandObserver *aObserver) |
CAknMarkableListDialog(). |
|
IMPORT_C void | PreLayoutDynInitL () |
PreLayoutDynInitL() From CAknDialog. |
|
IMPORT_C void | PostLayoutDynInitL () |
PreLayoutDynInitL() From CAknDialog. |
|
IMPORT_C void | SelectionListProcessCommandL (TInt aCommand) |
SelectionListProcessCommandL() handles selection list and markable list default commands. |
|
IMPORT_C void | ProcessCommandL (TInt aCommand) |
ProcessCommandL() From CAknDialog. |
|
IMPORT_C void | DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane) |
DynInitMenuPaneL() From MEikCommandObserver. |
|
IMPORT_C void | HandleListBoxEventL (CEikListBox *aListBox, TListBoxEvent aEventType) |
HandleListBoxEventL() From MEikListBoxObserver Handles listbox events. |
|
IMPORT_C TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
OfferKeyEventL() From CCoeControl. |
|
IMPORT_C TBool | OkToExitL (TInt aButtonId) |
OkToExitL() From CAknDialog. |
|
IMPORT_C | CAknMarkableListDialog (TInt &aValue, CArrayFix< TInt > *aSelectedItems, MDesCArray *aArray, MEikCommandObserver *aObserver) |
CAknMarkableListDialog(). |
|
Protected Attributes |
|
TInt | iMenuBarResourceId |
resource id of the menu bar |
|
TInt | iOkMenuBarResourceId |
resource id of the OK menu bar |
|
|
Default constructor.
|
|
|
|
ConstructL() 2nd phase constructor.
Reimplemented from CAknSelectionListDialog. |
|
DynInitMenuPaneL() From MEikCommandObserver.
Reimplemented from CAknDialog. |
|
HandleListBoxEventL() From MEikListBoxObserver Handles listbox events.
Reimplemented from CAknSelectionListDialog. |
|
HandlePointerEventL() from CCoeControl.
Reimplemented from CAknSelectionListDialog. |
|
|
|
CAknMarkableListDialog::NewL(). Static factory constructor. Uses two phase construction.
|
|
|
|
CAknMarkableListDialog::NewL(). Static factory constructor. Uses two phase construction. Leaves created object to cleanup stack.
|
|
OfferKeyEventL() From CCoeControl. Reimplemented from CAknSelectionListDialog. |
|
OkToExitL() From CAknDialog. This is not called if the Cancel button is activated unless the EEikDialogFlagNotifyEsc flag has been set.
Reimplemented from CAknSelectionListDialog. |
|
PreLayoutDynInitL() From CAknDialog. Reimplemented from CAknSelectionListDialog. |
|
PreLayoutDynInitL() From CAknDialog. Reimplemented from CAknSelectionListDialog. |
|
ProcessCommandL() From CAknDialog. Processes commands and passes commands to FindBox and ListBox as needed.
Reimplemented from CAknSelectionListDialog. |
|
SelectionListProcessCommandL() handles selection list and markable list default commands. For markable lists, this method handles EAknCmdMark, EAknCmdUnmark, EAknMarkAll, EAknUnmarkAll defined in options menu pane R_AVKON_MENUPANE_MARKABLE_LIST. Reimplemented from CAknSelectionListDialog. |
|
resource id of the menu bar |
|
resource id of the OK menu bar |