psln/Inc/PslnMainView.h
changeset 37 89c890c70182
parent 34 6b5204869ed5
child 45 667edd0b8678
equal deleted inserted replaced
34:6b5204869ed5 37:89c890c70182
     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:  Main state view for Psln application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPSLNMAINVIEW_H
       
    20 #define CPSLNMAINVIEW_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "PslnBaseView.h"
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CPslnFWPluginHandler;
       
    27 class CPslnFWPluginInterface;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 *  Main state view for Psln application.
       
    33 *  This view contains folders for other views.
       
    34 *
       
    35 *  @since S60 v3.1
       
    36 */
       
    37 class CPslnMainView : public CPslnBaseView
       
    38     {
       
    39     public:
       
    40 
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         * @return new instance of CPslnMainView.
       
    44         */
       
    45         static CPslnMainView* NewLC();
       
    46 
       
    47         /**
       
    48         * Destructor.
       
    49         */
       
    50         virtual ~CPslnMainView();
       
    51 
       
    52         /**
       
    53         * From CAknView.
       
    54         * Returns view id.
       
    55         * @return An unsigned integer (view id).
       
    56         */
       
    57         TUid Id() const;
       
    58 
       
    59         /**
       
    60         * From MEikCommandObserver.
       
    61         * Handles commands.
       
    62         * @param aCommand Command to be handled.
       
    63         */
       
    64         void HandleCommandL( TInt aCommand );
       
    65 
       
    66         /**
       
    67         * Returns active view index.
       
    68         * @return active view index.
       
    69         */
       
    70         TInt ActiveView() const;
       
    71 
       
    72         /**
       
    73         * Sets active folder.
       
    74         * @param aIndex new active folder index.
       
    75         */
       
    76         void SetActiveFolder( TInt aIndex );
       
    77 
       
    78         /**
       
    79         * Returns Uid of currently selected folder.
       
    80         * @return Uid of currently selected folder.
       
    81         */
       
    82         TInt ActiveFolderUid();
       
    83 
       
    84         /**
       
    85         * Sets active folder.
       
    86         * @param aUid new active folder uid.
       
    87         */
       
    88         void SetActiveFolder( TUid aUid );
       
    89 
       
    90     private:
       
    91 
       
    92         /**
       
    93         * From CAknView.
       
    94         */
       
    95         void DoActivateL(
       
    96             const TVwsViewId& aPrevViewId,
       
    97             TUid aCustomMessageId,
       
    98             const TDesC8& aCustomMessage );
       
    99 
       
   100         /**
       
   101         * From MEikMenuObserver.
       
   102         * Changes MenuPane dynamically
       
   103         */
       
   104         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   105 
       
   106         /**
       
   107         * From CPslnBaseView.
       
   108         */
       
   109         void HandleListBoxSelectionL();
       
   110         
       
   111         /**
       
   112         * From CPslnBaseView.
       
   113         */
       
   114         void HandleListBoxItemHighlightL();
       
   115 
       
   116         /**
       
   117         * From CPslnBaseView.
       
   118         */
       
   119         void NewContainerL();
       
   120 
       
   121         /**
       
   122         * From CPslnBaseView.
       
   123         * Empty implementation of virtual method.
       
   124         */
       
   125         void SetTitlePaneL( TInt& /*aResourceId*/ ) {};
       
   126 
       
   127         /**
       
   128         * From CPslnBaseView.
       
   129         */
       
   130         void ConstructViewArrayL();
       
   131     
       
   132         /**
       
   133         * From CPslnBaseView
       
   134         */
       
   135         TInt CbaResourceId( const TVwsViewId& aPrevViewId,TUid aCustomMessageId );
       
   136         
       
   137         /**
       
   138         * C++ default constructor.
       
   139         */
       
   140         CPslnMainView();
       
   141 
       
   142         /**
       
   143         * By default Symbian 2nd phase constructor is private.
       
   144         */
       
   145         void ConstructL();
       
   146 
       
   147         /* Tries to launch local view from UI class. */
       
   148         void DoActivateLocalViewL();
       
   149         
       
   150         /**
       
   151         * Locate the specific view's position in list via view id.
       
   152         * @param aViewId The specific view's id
       
   153         * @return Specific view's postion in list
       
   154         */
       
   155         TInt GetListboxItemIndexByViewId(const TVwsViewId& aViewId) const;
       
   156     
       
   157     private:    // Data
       
   158 
       
   159         // View id's for Psln views.
       
   160         RArray<TUid> iViewIds;
       
   161 
       
   162     };
       
   163 
       
   164 #endif      // CPSLNMAINVIEW_H
       
   165 
       
   166 // End of File