browserui/browser/FeedsInc/FeedsFeedView.h
changeset 0 84ad3b177aa3
child 36 c9249d037530
equal deleted inserted replaced
-1:000000000000 0:84ad3b177aa3
       
     1 /*
       
     2 * Copyright (c) 2005-2008 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 the License "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:  A view to browse a given feed.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef FEED_VIEW_H
       
    20 #define FEED_VIEW_H
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include "BrowserAppViewBase.h"
       
    25 #include "FeedsFeedContainer.h"
       
    26 #include <AknToolbarObserver.h>
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // MACROS
       
    31 
       
    32 // DATA TYPES
       
    33 
       
    34 // FUNCTION PROTOTYPES
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class MApiProvider;
       
    38 
       
    39 // CLASS DECLARATION
       
    40 
       
    41 
       
    42 /**
       
    43 *  A view to browse a given feed.
       
    44 *  @lib FeedsEngine.lib
       
    45 *  @since 3.0
       
    46 */
       
    47 class CFeedsFeedView: public CBrowserViewBase,
       
    48                       public MAknToolbarObserver
       
    49     {
       
    50     public:
       
    51         /**
       
    52         * Two-phased constructor.
       
    53         */
       
    54         static CFeedsFeedView* NewL( MApiProvider& aApiProvider,	TRect& aRect );
       
    55         
       
    56         /**
       
    57         * Destructor.
       
    58         */        
       
    59         virtual ~CFeedsFeedView();
       
    60 
       
    61 	public:     // From CBrowserViewBase
       
    62         
       
    63         /**
       
    64         * Return command set id, to be displayed.
       
    65         * @return The command set's resource id.
       
    66         */
       
    67         TInt CommandSetResourceIdL();
       
    68 
       
    69 		/**
       
    70 		* Set command set lsk,rsk,msk dynamically via pointers.
       
    71 		* Derived classes should implement, though it can be empty.
       
    72 		* If it does nothing, empty softkeys will be assigned
       
    73 		* @since 5.0
       
    74 		*/
       
    75 		void CommandSetResourceDynL(TSKPair& /*lsk*/, TSKPair& /*rsk*/, TSKPair& /*msk*/) {};
       
    76         
       
    77         /**
       
    78         * @see CAknView
       
    79         */
       
    80 		void HandleClientRectChange();
       
    81 
       
    82 	public: // From CAknView
       
    83         /**
       
    84         * Returns the id of the view.
       
    85         *
       
    86         * @since ?
       
    87         * @return the id.
       
    88         */
       
    89 		virtual TUid Id() const;
       
    90 
       
    91         /**
       
    92         * Processes commands.
       
    93         *
       
    94         * @since ?
       
    95         * @param aCommand the command to process.
       
    96         * @return void.
       
    97         */
       
    98 		virtual void HandleCommandL(TInt aCommand);
       
    99 
       
   100 
       
   101     protected: // From CAknView
       
   102         /**
       
   103         * Called when the view is activated.
       
   104         *
       
   105         * @since ?
       
   106         * @param aPrevViewId the id of the prev view.
       
   107         * @param aCustomMessageId The activation message id.
       
   108         * @param aCustomMessage Activation params.
       
   109         * @return void.
       
   110         */
       
   111 		virtual void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, 
       
   112                 const TDesC8& aCustomMessage);
       
   113     
       
   114         /**
       
   115         * Called when the view is deactivated.
       
   116         *
       
   117         * @since ?
       
   118         * @return void.
       
   119         */
       
   120 		virtual void DoDeactivate();
       
   121 
       
   122         /**
       
   123         * Disables unrelated menu options.
       
   124         *
       
   125         * @since ?
       
   126         * @param aResourceId  The resource id of the menu.
       
   127         * @param aMenuPane The menu.
       
   128         * @return void.
       
   129         */
       
   130 		virtual void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
       
   131 
       
   132     public: // MAknToolbarObserver
       
   133         /**
       
   134         * Called when toolbar events occur
       
   135         *
       
   136         * @since 5.0
       
   137         * @return void
       
   138         */
       
   139         void OfferToolbarEventL( TInt aCommand ) { HandleCommandL(aCommand); }
       
   140 
       
   141     public:  // New Methods
       
   142 
       
   143         /**
       
   144         * Sets the initial item once the view is activated.
       
   145         *
       
   146         * @since 3.1
       
   147         * @param aItemIndex The index of the inital item.
       
   148         * @return void
       
   149         */
       
   150         void SetInitialItem(TInt aItemIndex);
       
   151 
       
   152         /**
       
   153         * Update the toolbar buttons' state
       
   154         *
       
   155         * @since 5.0
       
   156         * @return void
       
   157         */
       
   158         void UpdateToolbarButtonsState();
       
   159         
       
   160         /**
       
   161         * Disconnect Browser Control
       
   162         *
       
   163         * @since 3.1
       
   164         * @return void
       
   165         */
       
   166         void DisconnectL();
       
   167         
       
   168     private:  // New Methods
       
   169         /**
       
   170         * C++ default constructor.
       
   171         */
       
   172         CFeedsFeedView( MApiProvider& aApiProvider );
       
   173         
       
   174         /**
       
   175         * By default Symbian 2nd phase constructor is private.
       
   176         */
       
   177         void ConstructL(TRect& aRect);
       
   178         
       
   179         
       
   180     public:  // Friends
       
   181         friend class CFeedsFeedContainer;
       
   182 
       
   183 
       
   184     private:
       
   185 		CFeedsFeedContainer*  iContainer;
       
   186         TBool            iContainerOnStack;
       
   187         TInt             iInitialItem;
       
   188         TBool            iPageScalerEnabled;
       
   189         TBool            iPenEnabled;
       
   190     };
       
   191 
       
   192 #endif      // FEED_VIEW_H
       
   193             
       
   194 // End of File
       
   195