landmarksui/app/inc/CLmkBaseContainer.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 -    LMK application base container
       
    15 *                class definition.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #ifndef CLMKBASECONTAINER_H
       
    25 #define CLMKBASECONTAINER_H
       
    26 
       
    27 // INCLUDES
       
    28 #include <coecntrl.h>
       
    29 #include <akntabgrp.h>
       
    30 
       
    31 
       
    32 #include "MLmkMskObserver.h"
       
    33 #include "CLmkBaseView.h"
       
    34 
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class MLmkKeyProcessor;
       
    38 class CAknNavigationDecorator;
       
    39 class CEikStatusPane;
       
    40 class CEikListBox;
       
    41 class CEikMenuBar;
       
    42 class CAknNavigationControlContainer;
       
    43 class CAknViewAppUi;
       
    44 class CLmkAppSelectorImplBase;
       
    45 
       
    46 
       
    47 
       
    48 // CLASS DECLARATION
       
    49 /**
       
    50 *  CLmkBaseContainer  container control class.
       
    51 * Inheriting from MLmkMSKObserver to get events from selectors, for changing
       
    52 * middle softkeys.
       
    53 */
       
    54 class CLmkBaseContainer : public CCoeControl, public MLmkMskObserver
       
    55     {
       
    56     public: // Constructors and destructor
       
    57         /**
       
    58          * Destructor.
       
    59          */
       
    60         ~CLmkBaseContainer();
       
    61 
       
    62     protected: // Constructors and destructor
       
    63         /**
       
    64          * Constructor
       
    65          * @param aKeyProcessor forward key events
       
    66          * @param aHelpContext reference to help context
       
    67          * @return newly instantiated object
       
    68          */
       
    69         CLmkBaseContainer( MLmkKeyProcessor& aKeyProcessor,
       
    70                            const TDesC& aHelpContext );
       
    71 
       
    72         /**
       
    73          * Destructor
       
    74          */
       
    75         void BaseConstructL();
       
    76 
       
    77     public: // new functions
       
    78         /**
       
    79          * Activate navigation decorator.
       
    80          * Method can called if tab needs to be refreshed.
       
    81          * @param aNaviDecorator    navigation decorator
       
    82          * @param aTabId            activated tabulator id
       
    83          */
       
    84         void ActivateTabL( CAknNavigationDecorator& aNaviDecorator,
       
    85                             TInt aTabId );
       
    86 
       
    87     public: // from CCoeControl
       
    88         void GetHelpContext( TCoeHelpContext& aContext ) const;
       
    89         TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
       
    90                                     TEventCode aType);
       
    91     public:
       
    92 
       
    93     	/**
       
    94         * Return reference to SelectorImpl
       
    95         * @return CLmkAppSelectorImplBase reference
       
    96         */
       
    97         CLmkAppSelectorImplBase& SelectorImpl();
       
    98 
       
    99     protected: // new functions
       
   100         /**
       
   101          * Get application UI. Ownership is not transferred.
       
   102          * @return pointer to CAknViewAppUi
       
   103          */
       
   104         CAknViewAppUi* ViewAppUi();
       
   105 
       
   106         /**
       
   107          * Get navi pane reference.
       
   108          * @return navi pane reference
       
   109          */
       
   110         CAknNavigationControlContainer& NaviPane();
       
   111 
       
   112          //Code added by gaurav for Tab Icons -start-
       
   113         /**
       
   114          * Add new tabs to tabgroup
       
   115          * @param aTabGroup
       
   116          */
       
   117         void AddTabsL(CAknTabGroup& aTabGroup);
       
   118 
       
   119         HBufC* GetBitmapFilenameLC();
       
   120 
       
   121         //-end-
       
   122 
       
   123         /**
       
   124          * Create CAknNavigationDecorator, ownership passed to caller.
       
   125          * This method creates a tab group or empty navi pane if
       
   126          * KZeroResourceId given.
       
   127          * @param aResource resource id
       
   128          * @return new instance of object. NULL, if something fails
       
   129          */
       
   130         CAknNavigationDecorator* CreateNaviPaneL( TInt aResource );
       
   131 
       
   132         /**
       
   133          * Appui's status pane getter
       
   134          * @return Statuspane pointer
       
   135          */
       
   136         CEikStatusPane* StatusPane();
       
   137 
       
   138         /**
       
   139          * Return view's menubar
       
   140          * @return CEikMenuBar
       
   141          */
       
   142         virtual CEikMenuBar* MenuBar();
       
   143 
       
   144         /**
       
   145          * Return container's context specific menubar resource id
       
   146          * @return resource id
       
   147          */
       
   148         virtual TInt ContextSpecificMenuBar();
       
   149 
       
   150         /**
       
   151          * Return container's options menubar resource id
       
   152          * @return resource id
       
   153          */
       
   154         virtual TInt OptionsMenuBar();
       
   155 
       
   156 	public:
       
   157 
       
   158         /**
       
   159         * This functions finds, what MSK item to display.
       
   160         * It is purely based on whether the item is marked or
       
   161         * there are no items in the list.
       
   162         * @return TLmkMskDispItem
       
   163         */
       
   164         virtual TLmkMskDispItem ResolveMskDisplayItem();
       
   165 
       
   166 	protected:
       
   167 
       
   168         /**
       
   169         * This function sets the list box observer to CEikListBox class
       
   170         * @param aObserver MEikListBoxObserver derived class
       
   171         */
       
   172         #ifdef RD_SCALABLE_UI_V2
       
   173         virtual void SetListBoxObserver(MEikListBoxObserver* aObserver);
       
   174         #endif//RD_SCALABLE_UI_V2
       
   175 
       
   176     protected: //data
       
   177 
       
   178         ///Ref:
       
   179         CAknNavigationControlContainer* iNaviPane;
       
   180 
       
   181         // Ref:
       
   182         MLmkKeyProcessor& iKeyProcessor;
       
   183 
       
   184         // Own:
       
   185         TCoeContextName iContextName;
       
   186 
       
   187 		/*
       
   188 		* This member is moved from CLmkLbWithFilterContainer class to this
       
   189 		* class.
       
   190 		*/
       
   191          /// Own.
       
   192         CLmkAppSelectorImplBase* iSelector;
       
   193 
       
   194         TBool iSearchInitiated;
       
   195     };
       
   196 #endif // CLMKBASECONTAINER_H
       
   197 
       
   198 
       
   199 // End of File
       
   200