widgets/widgetapp/inc/WidgetUiWindowView.h
changeset 0 dd21522fd290
child 10 a359256acfc6
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 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 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:  View of WidgetUi application
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WIDGETUIWINDOWVIEW_H_
       
    20 #define WIDGETUIWINDOWVIEW_H_
       
    21 
       
    22 //  INCLUDES
       
    23 #include <aknview.h>
       
    24 #include <BrCtlInterface.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // MACROS
       
    29 
       
    30 // DATA TYPES
       
    31 
       
    32 // FUNCTION PROTOTYPES
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class CWidgetUiWindowContainer;
       
    36 class CBrCtlInterface;
       
    37 class CWidgetUiObserver;
       
    38 class CWidgetUiWindowManager;
       
    39 class CAknNavigationDecorator;
       
    40 class CAknIndicatorContainer;
       
    41 class CAknNavigationControlContainer;
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 /**
       
    46 *  CWidgetUiWindowView
       
    47 *  @lib resLoader.lib
       
    48 *  @since 3.1
       
    49 */
       
    50 class CWidgetUiWindowView : public CAknView,
       
    51                             public MBrCtlStateChangeObserver
       
    52     {
       
    53     public:  // Constructors and destructor
       
    54 
       
    55         /**
       
    56         * NewLC
       
    57         * Two-phased constructor.
       
    58         * @since 3.1
       
    59         * @param aWindowManger
       
    60         * @return CWidgetUiWindowView*
       
    61         */
       
    62         static CWidgetUiWindowView* NewLC( CWidgetUiWindowManager& aWindowManager );
       
    63 
       
    64         /**
       
    65         * ~CWidgetUiWindowView
       
    66         * Destructor
       
    67         * @since 3.1
       
    68         * @param none
       
    69         * @return none
       
    70         */
       
    71         virtual ~CWidgetUiWindowView();
       
    72 
       
    73     public: // new functions
       
    74 
       
    75          /**
       
    76         * Container
       
    77         * @since 3.1
       
    78         * @param none
       
    79         * @return CWidgetUiWindowContainer*
       
    80         */
       
    81         CWidgetUiWindowContainer* Container();
       
    82 
       
    83         /**
       
    84         * ShowActivatedObject
       
    85         * show/hide the status pane and CBAs
       
    86         * @since 3.1
       
    87         * @param aVisible - ETrue to show; EFalse to hide
       
    88         * @param aShowStatusPane - 
       
    89         *        ETrue shows StatusPane and CBA
       
    90         *        EFalse to show CBA only 
       
    91         * @return void
       
    92         */
       
    93         void ShowActivatedObject(TBool aVisible, TBool aShowStatusPane = EFalse);
       
    94         
       
    95         /**
       
    96         * UpdateStatusPane
       
    97         * show/hide the status pane 
       
    98         * @since 3.1
       
    99         * @return void
       
   100         */
       
   101         void UpdateStatusPane();
       
   102 
       
   103         /**
       
   104         * CbaGroup
       
   105         * @since 3.1
       
   106         * @param none
       
   107         * @return CEikButtonGroupContainer*
       
   108         */
       
   109         CEikButtonGroupContainer* CbaGroup() { return Cba(); }
       
   110 
       
   111         /**
       
   112         * IsOptionsMenuActivated
       
   113         * @return ETrue if Options menu loaded, EFalse otherwise
       
   114         */
       
   115         TBool IsOptionsMenuActivated();
       
   116         /**
       
   117         * DeActivateOptionsMenu
       
   118         * Set Optionsmenu loaded flag to EFalse
       
   119         * @return void
       
   120         */
       
   121         void DeActivateOptionsMenu();
       
   122     public: // Functions from base classes
       
   123 
       
   124         /**
       
   125         * HandleCommandL
       
   126         * @since 3.1
       
   127         * @param aCommand
       
   128         * @return void
       
   129         */
       
   130         void HandleCommandL( TInt aCommand );
       
   131 
       
   132         /**
       
   133         * Id
       
   134         * @since 3.1
       
   135         * @param none
       
   136         * @return TUid
       
   137         */
       
   138         TUid Id() const;
       
   139         
       
   140         /**
       
   141         * Find if the platform supports touch
       
   142         * @return ETrue if the platform supports touch, EFalse otherwise
       
   143         */
       
   144         TBool PenEnabled() { return iPenEnabled; }
       
   145 
       
   146     public: // Functions from MEikStatusPaneObserver
       
   147 
       
   148         /**
       
   149         * HandleStatusPaneSizeChange
       
   150         * @since 3.1
       
   151         * @param none
       
   152         * @return void
       
   153         */
       
   154         void HandleStatusPaneSizeChange();
       
   155 
       
   156     public:     // from MBrCtlStateChangeObserver
       
   157 
       
   158         /**
       
   159         * State change event handling for disable javascript notification changes.
       
   160         * @param aState which state we are in
       
   161         * @param aValue state specific value
       
   162         * @return void
       
   163         */
       
   164         void StateChanged( TBrCtlDefs::TBrCtlState aState, TInt aValue );
       
   165 
       
   166     private:
       
   167 
       
   168         /**
       
   169         * CWidgetUiWindowView
       
   170         * Constructor
       
   171         * @since 3.1
       
   172         * @param aWindowManager
       
   173         * @return none
       
   174         */
       
   175         CWidgetUiWindowView( CWidgetUiWindowManager& aWindowManager );
       
   176 
       
   177         /**
       
   178         * ConstructL
       
   179         * EPOC default constructor.
       
   180         * By default Symbian 2nd phase constructor is private.
       
   181         * @since 3.1
       
   182         * @param none
       
   183         * @return void
       
   184         */
       
   185         void ConstructL();
       
   186 
       
   187     private: // from CAknView
       
   188 
       
   189         /**
       
   190         * DynInitMenuPaneL
       
   191         * @since 3.1
       
   192         * @param aResourceId
       
   193         * @param aMenuPane
       
   194         * @return void
       
   195         */
       
   196         void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
   197 
       
   198         /**
       
   199         * DoActivateL
       
   200         * @since 3.1
       
   201         * @param aPrevViewId
       
   202         * @param aCustomMessageId
       
   203         * @param aCustomMessage
       
   204         * @return void
       
   205         */
       
   206         void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, const TDesC8& aCustomMessage );
       
   207 
       
   208         /**
       
   209         * DoDeactivate
       
   210         * @since 3.1
       
   211         * @param none
       
   212         * @return void
       
   213         */
       
   214         void DoDeactivate();
       
   215 
       
   216         /**
       
   217         * Redraw
       
   218         * @since 3.1
       
   219         * @param none
       
   220         * @return void
       
   221         */
       
   222         void Redraw() const;
       
   223 
       
   224       private :  // Data
       
   225 
       
   226         CWidgetUiWindowContainer*           iContainer;     // Component container owned
       
   227         CWidgetUiWindowManager&             iWindowManager; // not owned, not responsible for deleting
       
   228         CAknNavigationDecorator*            iNaviDecorator; // owned, responsible for deleting
       
   229         CAknIndicatorContainer*             iIndiContainer; // not owned, not responsible for deleting
       
   230         CAknNavigationControlContainer*     iNaviCont;
       
   231         TBool                               iCbaVisible;
       
   232         TBool                               iStatusPaneVisible;
       
   233         TBool                               iPenEnabled;
       
   234         TBool                               iActivatedObjectVisible; 
       
   235 		TBool 								iIsOptionsMenuActivated;
       
   236   };
       
   237 
       
   238 #endif // CWidgetUIWINDOWVIEW_H_
       
   239 
       
   240 // End of File