phonebookui/Phonebook2/GroupExtension/inc/CPguGroupView.h
changeset 0 e686773b3f54
child 21 b3431bff8c19
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Phonebook 2 Group UI extension group view.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPGUGROUPVIEW_H
       
    20 #define CPGUGROUPVIEW_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <MPbk2UIExtensionView.h>
       
    25 #include <MPbk2ControlObserver.h>
       
    26 #include <MPbk2StoreConfigurationObserver.h>
       
    27 #include <MPbk2MenuCommandObserver.h>
       
    28 #include <eiklbo.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CPbk2UIExtensionView;
       
    32 class CPbk2NamesListControl;
       
    33 template<class ControlType> class CPbk2ControlContainer;
       
    34 class MPbk2CommandHandler;
       
    35 class MPbk2PointerEventInspector;
       
    36 class CPbk2StoreConfiguration;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41  * Phonebook 2 Group UI extension group view.
       
    42  */
       
    43 class CPguGroupView : public CBase,
       
    44                       public MPbk2UIExtensionView,
       
    45                       private MPbk2ControlObserver,
       
    46                       private MPbk2StoreConfigurationObserver,
       
    47                       private MPbk2MenuCommandObserver,
       
    48                       public MEikListBoxObserver
       
    49     {
       
    50     public: // Construction and destruction
       
    51 
       
    52         /**
       
    53          * Creates a new instance of this class.
       
    54          *
       
    55          * @param aView             Phonebook 2 UI Extension view.
       
    56          * @return  A new instance of this class.
       
    57          */
       
    58         static CPguGroupView* NewL(
       
    59                 CPbk2UIExtensionView& aView );
       
    60 
       
    61         /**
       
    62          * Destructor.
       
    63          */
       
    64         ~CPguGroupView();
       
    65 
       
    66     public:  // new function
       
    67         
       
    68         void CheckUiControlL();
       
    69         
       
    70     public: // From MPbk2UIExtensionView
       
    71         void HandleStatusPaneSizeChange();
       
    72         CPbk2ViewState* ViewStateLC() const;
       
    73         TBool HandleCommandKeyL(
       
    74                 const TKeyEvent& aKeyEvent,
       
    75                 TEventCode aType );
       
    76         void HandlePointerEventL(
       
    77                 const TPointerEvent& aPointerEvent );
       
    78         TInt GetViewSpecificMenuFilteringFlagsL() const;
       
    79         void DoActivateL(
       
    80                 const TVwsViewId& aPrevViewId,
       
    81                 TUid aCustomMessageId,
       
    82                 const TDesC8& aCustomMessage );
       
    83         void DoDeactivate();
       
    84         void HandleCommandL(
       
    85                 TInt aCommand );
       
    86         void DynInitMenuPaneL(
       
    87                 TInt aResourceId,
       
    88                 CEikMenuPane* aMenuPane );
       
    89         void HandleLongTapEventL(
       
    90                 const TPoint& aPenEventLocation,
       
    91                 const TPoint& aPenEventScreenLocation);
       
    92 
       
    93     protected: 
       
    94         // from MEikListBoxObserver
       
    95         void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
       
    96    
       
    97    
       
    98     private: // From MPbk2ControlObserver
       
    99         void HandleControlEventL(
       
   100                 MPbk2ContactUiControl& aControl,
       
   101                 const TPbk2ControlEvent& aEvent );
       
   102 
       
   103     private: // From MPbk2StoreConfigurationObserver
       
   104         void ConfigurationChanged();
       
   105         void ConfigurationChangedComplete();
       
   106 
       
   107     private: // From MPbk2MenuCommandObserver
       
   108         void PreCommandExecutionL(
       
   109                 const MPbk2Command& aCommand );
       
   110         void PostCommandExecutionL(
       
   111                 const MPbk2Command& aCommand );
       
   112 
       
   113     private: // Implementation
       
   114         CPguGroupView(
       
   115                 CPbk2UIExtensionView& aView );
       
   116         void ConstructL();
       
   117         TBool CurrentStoreSupportsGroupsL() const;
       
   118         void CreateControlsL();
       
   119         void StoreStateL();
       
   120         void RestoreStateL();
       
   121         void UpdateCbasL();
       
   122         void UpdateListEmptyTextL();
       
   123         void HandleConfigurationChangeL();
       
   124         void ShowContextMenuL();
       
   125 
       
   126     private: // Types
       
   127         /// This view's control container type
       
   128         typedef CPbk2ControlContainer<CPbk2NamesListControl> CContainer;
       
   129 
       
   130     private: // Data
       
   131         /// Ref: View that contains this extension view
       
   132         CPbk2UIExtensionView& iView;
       
   133         /// Own: This view's control container
       
   134         CContainer* iContainer;
       
   135         /// Ref: This view's control
       
   136         CPbk2NamesListControl* iControl;
       
   137         /// Ref: Pointer event inspector
       
   138         MPbk2PointerEventInspector* iPointerEventInspector;
       
   139         /// Own: Stored control state
       
   140         CPbk2ViewState* iControlState;
       
   141         /// Own: Control state passed as parameter
       
   142         CPbk2ViewState* iParamState;
       
   143         /// Ref: Command handler
       
   144         MPbk2CommandHandler* iCommandHandler;
       
   145         /// Own: Latest group name list control state
       
   146         TInt iListControlState;
       
   147         /// Ref: Phonebook store configuration
       
   148         CPbk2StoreConfiguration* iStoreConfiguration;
       
   149         /// Own: Stylus popup menu state indicator
       
   150         TBool iStylusPopupMenuLaunched;
       
   151     };
       
   152 
       
   153 #endif // CPGUGROUPVIEW_H
       
   154 
       
   155 // End of File