landmarksui/app/inc/CLmkBaseView.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 -    Declares base view for Landmarks application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #ifndef CLMKBASEVIEW_H
       
    25 #define CLMKBASEVIEW_H
       
    26 
       
    27 // INCLUDES
       
    28 #include "MLmkKeyProcessor.h"
       
    29 #include <aknview.h>
       
    30 #ifdef RD_SCALABLE_UI_V2
       
    31 #include <eiklbo.h>
       
    32 #endif//RD_SCALABLE_UI_V2
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class CLmkBaseContainer;
       
    36 class CEikMenuPane;
       
    37 class CLmkAppUi;
       
    38 class CLmkMapNavigationInterface;
       
    39 
       
    40 /*
       
    41 * This enum specifies, what item to display in the current view.
       
    42 * The information is used by containers and corresponding views.
       
    43 */
       
    44 enum TLmkMskDispItem
       
    45 	{
       
    46 	EContextMenu,//display context menu
       
    47 	ELabel,      //display label
       
    48 	ENoMsk,	     // no MSK
       
    49 	EListEmpty
       
    50 	};
       
    51 
       
    52 // CLASS DECLARATION
       
    53 /**
       
    54 *  Base view class.
       
    55 */
       
    56 #ifdef RD_SCALABLE_UI_V2
       
    57 class CLmkBaseView :
       
    58 public CAknView,
       
    59 public MLmkKeyProcessor,
       
    60 public MEikListBoxObserver
       
    61 #else
       
    62 class CLmkBaseView : public CAknView, public MLmkKeyProcessor
       
    63 #endif//RD_SCALABLE_UI_V2
       
    64     {
       
    65     public: // Constructors and destructor
       
    66         /**
       
    67         * C++ constructor
       
    68         * @param aKeyProcessor A pointer to MLmkKeyProcessor
       
    69         * @return newly instantiated object
       
    70         */
       
    71         CLmkBaseView( MLmkKeyProcessor& aKeyProcessor );
       
    72 
       
    73         /**
       
    74         * By default Symbian 2nd phase constructor is private.
       
    75         * @param aResId Resource id
       
    76         */
       
    77         void BaseConstructL( TInt aResId );
       
    78 
       
    79         /**
       
    80         * Destructor.
       
    81         */
       
    82         ~CLmkBaseView();
       
    83 
       
    84     protected: // From MLmkKeyProcessor
       
    85         TBool ProcessKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
    86         MAknTabObserver* TabObserver();
       
    87 
       
    88     protected: // New methods
       
    89 
       
    90         CLmkAppUi& LmkAppUi() const;
       
    91 
       
    92         /**
       
    93         * Handle help requests.
       
    94         * @param aMenuPane A pointer to CEikMenuPane
       
    95         */
       
    96         void HandleHelpFeature( CEikMenuPane* aMenuPane ) const;
       
    97 
       
    98         /**
       
    99         * Check whether Coordinates has to be hidden.
       
   100         */
       
   101         void CheckHideCoordinateL( );
       
   102 
       
   103   protected://New methods for MSK
       
   104 
       
   105   		/**
       
   106         * Enables the MSK context menu, when some items are marked.
       
   107         * overriden by respective view classes to support the
       
   108         * view based enabling of the MSK menu.
       
   109         * @param aEnable Etrue to enable context menu
       
   110         *                EFalse to disable context menu
       
   111         */
       
   112         virtual void EnableMskMenuL(TBool aEnable);
       
   113 
       
   114         /**
       
   115         * Enables the MSK lable.
       
   116         * overriden by respective view classes to support the
       
   117         * view based enabling of the MSK label.
       
   118         * @param aEnable Etrue to enable label
       
   119         *                EFalse to disable label
       
   120         */
       
   121         virtual void EnableMskLabelL(TBool aEnable);
       
   122 	public:
       
   123 		/**
       
   124         * Decides what to be displayed for MSK.
       
   125         * It can be context menu or label or nothing.
       
   126         * @param aMskDispItem
       
   127         */
       
   128 		virtual void UpdateMskViewL(TLmkMskDispItem aMskDispItem);
       
   129 
       
   130 
       
   131 	public : // for landscape support
       
   132 		void Update();
       
   133     #ifdef RD_SCALABLE_UI_V2
       
   134     protected://for touch support
       
   135 
       
   136     	//from MEikListBoxObserver
       
   137     	void HandlePointerEventL( const TPointerEvent& aPointerEvent );
       
   138     	void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
       
   139     #endif//RD_SCALABLE_UI_V2
       
   140     protected: // Data
       
   141         /// Own: container
       
   142         CLmkBaseContainer* iBaseContainer;
       
   143         /// Ref: reference to key processor
       
   144         MLmkKeyProcessor& iKeyProcessor;
       
   145         //Own: Pointer to map and navigation interface
       
   146         CLmkMapNavigationInterface* iMapNavInterface;
       
   147 
       
   148         //It will be ETrue, when launched from location centre.
       
   149         TBool isEmbeddedLaunch;
       
   150 
       
   151         //It will be ETrue when coordinates has to be hidden.
       
   152         TBool iIsHideCoordinate;
       
   153 
       
   154         //It will be ETrue when help has to be hidden.
       
   155         TBool iIsHideHelp;
       
   156     };
       
   157 
       
   158 #endif // CLMKBASEVIEW_H
       
   159 
       
   160 // End of File