landmarksui/uicontrols/inc/CLmkMultiSelectorDialog.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:    LandmarksUi Content File -    Multi selector dialog.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef CLMKMULTISELECTORDIALOG_H
       
    26 #define CLMKMULTISELECTORDIALOG_H
       
    27 
       
    28 //  INCLUDES
       
    29 #include "CLmkSelectorDialog.h"
       
    30 #include "LmkConsts.h"
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CLmkSender;
       
    34 class MLmkDlgMenuObserver;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 * CLmkMultiSelectorDialog class
       
    40 * Don't have default icons, user should set icon array self
       
    41 */
       
    42 class CLmkMultiSelectorDialog : public CLmkSelectorDialog
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45 
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         * @param aCurrentItemIndex
       
    49         * @param aSelectionIndexArray
       
    50         * @param aLbModel listbox model, ownership is not transferred
       
    51         * @param aMenuBarResourceId
       
    52         * @param iOkOptionsMenuResourceId
       
    53         * @param aCmdObserver, ownership is not transferred
       
    54         * @param aMenuObserver, ownership is not transferred
       
    55         * @return newly instantiated object
       
    56         */
       
    57         static CLmkMultiSelectorDialog* NewL( TInt& aCurrentItemIndex,
       
    58                                          CArrayFix<TInt>* aSelectionIndexArray,
       
    59                                          MDesCArray* aLbModel,
       
    60                                          TInt aMenuBarResourceId,
       
    61                                          TInt iOkOptionsMenuResourceId,
       
    62                                          MEikCommandObserver* aCmdObserver,
       
    63                                          MLmkDlgMenuObserver* aMenuObserver,
       
    64                                          MLmkListMemento* aMemento = NULL );
       
    65 
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         virtual ~CLmkMultiSelectorDialog();
       
    70 
       
    71     public: // New functions
       
    72 
       
    73         /**
       
    74         * This method prepares the dialog to use "Send as..." menu.
       
    75         * Note: this function requires that command ELmkCmdSendDummy exists
       
    76         * in the menu pane, since it determines the position of "Send as...".
       
    77         * @param aSender reference
       
    78         * @param aSendUiMenuPaneResource, must contain ELmkCmdSendDummy
       
    79         * @param aMenuTextResource customized "Send as..." substitute
       
    80         */
       
    81         void SetupSendMenu( CLmkSender& aSender,
       
    82                             TInt aSendUiMenuPaneResource,
       
    83                             TInt aMenuTextResource = KZeroResourceId );
       
    84 		/**
       
    85         * Updates MSK of the dialog.
       
    86         */
       
    87         void UpdateMskL();
       
    88 	private:
       
    89 		TBool IsCurrentItemMarked();
       
    90 
       
    91     protected: // From MEikListBoxObserver
       
    92         void HandleListBoxEventL( CEikListBox* aListBox,
       
    93                                   TListBoxEvent aEventType );
       
    94 
       
    95     protected: // From CAknSelectionListDialog
       
    96         void SelectionListProcessCommandL( TInt aCommand );
       
    97         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    98                                      TEventCode aType );
       
    99         void PreLayoutDynInitL();
       
   100         void PostLayoutDynInitL();
       
   101         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   102         TBool OkToExitL( TInt aButtonId );
       
   103 
       
   104     protected:
       
   105         /**
       
   106         * C++ default constructor.
       
   107         */
       
   108         CLmkMultiSelectorDialog( TInt& aCurrentItemIndex,
       
   109                                  CArrayFix<TInt>* aSelectionIndexArray,
       
   110                                  MDesCArray* aLbModel,
       
   111                                  TInt aMenuBarResourceId,
       
   112                                  TInt iOkOptionsMenuResourceId,
       
   113                                  MEikCommandObserver* aCmdObserver,
       
   114                                  MLmkDlgMenuObserver* aMenuObserver,
       
   115                                  MLmkListMemento* aMemento = NULL );
       
   116 
       
   117     protected:
       
   118 
       
   119         TInt iMenuBarResourceId;
       
   120         TInt iOkOptionsMenuResourceId;
       
   121         TInt iSendUiMenuPaneResourceId;
       
   122         TInt iMenuTextResourceId;
       
   123 
       
   124     private:
       
   125     	void ConstructL(TInt aMenuBarResourceId);
       
   126     private:
       
   127 
       
   128         /// Ref:
       
   129         CArrayFix<TInt> *iSelectionIndexArray;
       
   130         /// Ref:
       
   131         CLmkSender* iLmkSender;
       
   132         /// Ref:
       
   133         MLmkDlgMenuObserver* iMenuObserver;
       
   134         TBool iExited;
       
   135         TBool iIsToClearSelection;
       
   136     };
       
   137 
       
   138 #endif      // CLMKMULTISELECTORDIALOG_H
       
   139 
       
   140 // End of File