CAknMarkableListDialog Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikctl.lib eikcoctl.lib

Capability Information

Required Capabilities

None


#include <aknselectionlist.h>

Inherits CAknSelectionListDialog.


Detailed Description

CAknMarkableListDialog is an interface for applications.

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

Constructor & Destructor Documentation

IMPORT_C CAknMarkableListDialog::~CAknMarkableListDialog  ) 
 
IMPORT_C CAknMarkableListDialog::CAknMarkableListDialog TInt &  aOpenedItem,
CArrayFix< TInt > *  aSelectedItems,
MDesCArray *  aArray,
TInt  aMenuBarResourceId,
TInt  aOkMenuBarResourceId,
MEikCommandObserver *  aObserver
[protected]
 

CAknMarkableListDialog().

Default constructor.

Parameters:
aOpenedItem  Variable to be modified when user selects a list item.
aSelectedItems  array of selected items
aArray  Content of list items; A tab-separated string with texts and indexes to icon array
aMenuBarResourceId  Menu items to be shown in options menu. May be NULL.
aOkMenuBarResourceId  Resource id of a menu bar. This menu bar is displayed, when there are marked items in the list and user presses selection ( OK ) key. May be NULL.
aObserver  Observer for the menu bar. May be NULL.
Returns:
A pointer to created object
IMPORT_C CAknMarkableListDialog::CAknMarkableListDialog TInt &  aValue,
CArrayFix< TInt > *  aSelectedItems,
MDesCArray *  aArray,
MEikCommandObserver *  aObserver
[protected]
 

CAknMarkableListDialog().

Deprecated:
Do not use.

Member Function Documentation

IMPORT_C void CAknMarkableListDialog::ConstructL TInt  aMenuTitleResourceId  ) 
 

ConstructL() 2nd phase constructor.

Parameters:
aMenuTitleResourceId  Menu items to be shown in options menu

Reimplemented from CAknSelectionListDialog.

IMPORT_C void CAknMarkableListDialog::DynInitMenuPaneL TInt  aResourceId,
CEikMenuPane aMenuPane
[protected, virtual]
 

DynInitMenuPaneL() From MEikCommandObserver.

Parameters:
aResourceId  resource id of the menu pane to be modified
aMenuPane  pointer to menu pane to be modified

Reimplemented from CAknDialog.

IMPORT_C void CAknMarkableListDialog::HandleListBoxEventL CEikListBox aListBox,
TListBoxEvent  aEventType
[protected]
 

HandleListBoxEventL() From MEikListBoxObserver Handles listbox events.

Parameters:
aListBox  currently ignored
aEventType  type of the listbox event

Reimplemented from CAknSelectionListDialog.

IMPORT_C void CAknMarkableListDialog::HandlePointerEventL const TPointerEvent &  aPointerEvent  ) 
 

HandlePointerEventL() from CCoeControl.

Parameters:
aPointerEvent  a pointer event.

Reimplemented from CAknSelectionListDialog.

static IMPORT_C CAknMarkableListDialog* CAknMarkableListDialog::NewL TInt &  aOpenedItem,
CArrayFix< TInt > *  aSelectedItems,
MDesCArray *  aArray,
TInt  aMenuBarResourceId,
MEikCommandObserver *  aObserver = 0
[static]
 

NewL().

Deprecated:
Do not use.
static IMPORT_C CAknMarkableListDialog* CAknMarkableListDialog::NewL TInt &  aOpenedItem,
CArrayFix< TInt > *  aSelectedItems,
MDesCArray *  aArray,
TInt  aMenuBarResourceId,
TInt  aOkMenuBarId,
MEikCommandObserver *  aObserver = 0
[static]
 

CAknMarkableListDialog::NewL().

Static factory constructor. Uses two phase construction.

Parameters:
aOpenedItem  Variable to be modified when user selects a list item.
aSelectedItems  array of selected items
aArray  Content of list items; A tab-separated string with texts and indexes to icon array
aMenuBarResourceId  Menu items to be shown in options menu. May be NULL.
aOkMenuBarId  Resource id of a menu bar. This menu bar is displayed, when there are marked items in the list and user presses selection ( OK ) key. May be NULL.
aObserver  Observer for the menu bar. May be NULL.
Returns:
A pointer to created object
static IMPORT_C CAknMarkableListDialog* CAknMarkableListDialog::NewLC TInt &  aOpenedItem,
CArrayFix< TInt > *  aSelectedItems,
MDesCArray *  aArray,
TInt  aMenuBarResourceId,
MEikCommandObserver *  aObserver = 0
[static]
 

NewLC().

Deprecated:
Do not use.
static IMPORT_C CAknMarkableListDialog* CAknMarkableListDialog::NewLC TInt &  aOpenedItem,
CArrayFix< TInt > *  aSelectedItems,
MDesCArray *  aArray,
TInt  aMenuBarResourceId,
TInt  aOkMenuBarId,
MEikCommandObserver *  aObserver = 0
[static]
 

CAknMarkableListDialog::NewL().

Static factory constructor. Uses two phase construction. Leaves created object to cleanup stack.

Parameters:
aOpenedItem  Variable to be modified when user selects a list item.
aSelectedItems  array of selected items
aArray  Content of list items; A tab-separated string with texts and indexes to icon array
aMenuBarResourceId  Menu items to be shown in options menu. May be NULL.
aOkMenuBarId  Resource id of a menu bar. This menu bar is displayed, when there are marked items in the list and user presses selection ( OK ) key. May be NULL.
aObserver  Observer for the menu bar. May be NULL.
Returns:
A pointer to created object
IMPORT_C TKeyResponse CAknMarkableListDialog::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
[protected]
 

OfferKeyEventL() From CCoeControl.

Reimplemented from CAknSelectionListDialog.

IMPORT_C TBool CAknMarkableListDialog::OkToExitL TInt  aButtonId  )  [protected, virtual]
 

OkToExitL() From CAknDialog.

This is not called if the Cancel button is activated unless the EEikDialogFlagNotifyEsc flag has been set.

Parameters:
aButtonId  The ID of the button that was activated.

Reimplemented from CAknSelectionListDialog.

IMPORT_C void CAknMarkableListDialog::PostLayoutDynInitL  )  [protected, virtual]
 

PreLayoutDynInitL() From CAknDialog.

Reimplemented from CAknSelectionListDialog.

IMPORT_C void CAknMarkableListDialog::PreLayoutDynInitL  )  [protected, virtual]
 

PreLayoutDynInitL() From CAknDialog.

Reimplemented from CAknSelectionListDialog.

IMPORT_C void CAknMarkableListDialog::ProcessCommandL TInt  aCommand  )  [protected, virtual]
 

ProcessCommandL() From CAknDialog.

Processes commands and passes commands to FindBox and ListBox as needed.

Parameters:
aCommand  id of the command.

Reimplemented from CAknSelectionListDialog.

IMPORT_C void CAknMarkableListDialog::SelectionListProcessCommandL TInt  aCommand  )  [protected, virtual]
 

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.


Field Documentation

TInt CAknMarkableListDialog::iMenuBarResourceId [protected]
 

resource id of the menu bar

TInt CAknMarkableListDialog::iOkMenuBarResourceId [protected]
 

resource id of the OK menu bar


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top