psln/Inc/PslnMainView.h
branchRCL_3
changeset 56 d48ab3b357f1
equal deleted inserted replaced
55:aecbbf00d063 56:d48ab3b357f1
       
     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 NewContainerL();
       
   115 
       
   116         /**
       
   117         * From CPslnBaseView.
       
   118         * Empty implementation of virtual method.
       
   119         */
       
   120         void SetTitlePaneL( TInt& /*aResourceId*/ ) {};
       
   121 
       
   122         /**
       
   123         * From CPslnBaseView.
       
   124         */
       
   125         void ConstructViewArrayL();
       
   126     
       
   127         /**
       
   128         * From CPslnBaseView
       
   129         */
       
   130         TInt CbaResourceId( const TVwsViewId& aPrevViewId,TUid aCustomMessageId );
       
   131         
       
   132         /**
       
   133         * C++ default constructor.
       
   134         */
       
   135         CPslnMainView();
       
   136 
       
   137         /**
       
   138         * By default Symbian 2nd phase constructor is private.
       
   139         */
       
   140         void ConstructL();
       
   141 
       
   142         /* Tries to launch local view from UI class. */
       
   143         void DoActivateLocalViewL();
       
   144         
       
   145         /**
       
   146         * Locate the specific view's position in list via view id.
       
   147         * @param aViewId The specific view's id
       
   148         * @return Specific view's postion in list
       
   149         */
       
   150         TInt GetListboxItemIndexByViewId(const TVwsViewId& aViewId) const;
       
   151     
       
   152     private:    // Data
       
   153 
       
   154         // View id's for Psln views.
       
   155         RArray<TUid> iViewIds;
       
   156 
       
   157     };
       
   158 
       
   159 #endif      // CPSLNMAINVIEW_H
       
   160 
       
   161 // End of File