psln/Inc/PslnMainViewContainer.h
branchRCL_3
changeset 56 d48ab3b357f1
parent 0 2f259fa3e83a
equal deleted inserted replaced
55:aecbbf00d063 56:d48ab3b357f1
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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 view container.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_PSLNMAINVIEWCONTAINER_H
       
    20 #define C_PSLNMAINVIEWCONTAINER_H
       
    21 
       
    22 #include "PslnBaseContainer.h"
       
    23 
       
    24 class CPslnFWPluginInterface;
       
    25 class CPslnUi;
       
    26 class CAknIconArray;
       
    27 class TAknsItemID;
       
    28 
       
    29 /**
       
    30 *  Main view container.
       
    31 *  Contains items to navigate to sub-views and application specfic theme views.
       
    32 *
       
    33 *  @since S60 3.1
       
    34 */
       
    35 class CPslnMainViewContainer : public CPslnBaseContainer
       
    36     {
       
    37     public:
       
    38 
       
    39         /**
       
    40         * C++ constructor.
       
    41         * @param aPslnUi pointer to UI-class.
       
    42         */
       
    43         CPslnMainViewContainer( CPslnUi* aPslnUi );
       
    44 
       
    45         /**
       
    46         * By default Symbian 2nd phase constructor is private.
       
    47         * @param aRect client rect.
       
    48         */
       
    49         void ConstructL( const TRect& aRect );
       
    50 
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CPslnMainViewContainer();
       
    55 
       
    56     private:
       
    57 
       
    58         /**
       
    59         * From CPslnBaseContainer.
       
    60         * Constructs list box and items.
       
    61         * @param aResLbxId used resource ID.
       
    62         */
       
    63         void ConstructListBoxL( TInt aResLbxId );
       
    64 
       
    65         /**
       
    66         * From CPslnBaseContainer.
       
    67         * Creates listbox items.
       
    68         */
       
    69         void CreateListBoxItemsL();
       
    70 
       
    71         // Makes one specific folder name item.
       
    72         void MakeItemL( const TInt aIndex, const TInt aOffset = KErrNotFound );
       
    73 
       
    74         // Gets Help context.
       
    75         void GetHelpContext( TCoeHelpContext& aContext ) const;
       
    76 
       
    77         // Makes one plugin folder.
       
    78         TInt MakePluginItemL(
       
    79             CPslnFWPluginInterface& aPlugin,
       
    80             CAknIconArray& aIconList,
       
    81             TPtr& aBufPtr,
       
    82             TPtr& aItemPtr );
       
    83 
       
    84         // Adds icon to icon array.
       
    85         void AddIconL(
       
    86             CAknIconArray* aIcons,
       
    87             const TAknsItemID& aSkinId,
       
    88             const TDesC& aFileName,
       
    89             TInt aBitmapId,
       
    90             TInt aMaskId );
       
    91 
       
    92         // Parses icon file path to given parameter.
       
    93         void GetIconFilePath( TDes& aPath );
       
    94 
       
    95     private:    // Data
       
    96 
       
    97         // List of folder names.
       
    98         CDesCArrayFlat* iItems;
       
    99 
       
   100         // Array of loaded plugins.
       
   101         CArrayPtrFlat<CPslnFWPluginInterface>* iPluginArray;
       
   102 
       
   103         // Reference to Ui. Owned by Main view.
       
   104         CPslnUi* iPslnUi;
       
   105         
       
   106         // Has AS plugin been added.
       
   107         TBool iASAdded;
       
   108 
       
   109         // Has AI plugin been added.
       
   110         TBool iAIAdded;
       
   111     };
       
   112 
       
   113 #endif      // C_PSLNMAINVIEWCONTAINER_H
       
   114 
       
   115 // End of File