Nokia N97 SDK
Example Applications Guide

MyViewAppUi.h

00001 
00002 /*
00003 * ==============================================================================
00004 *  Name        : MyViewApp.h
00005 *  Part of     : MyView
00006 *  Interface   :
00007 *  Description : Declares UI class for application
00008 *  Version     :
00009 *
00010 *  Copyright (c) 2002 - 2007 Nokia Corporation.
00011 *  This material, including documentation and any related
00012 *  computer programs, is protected by copyright controlled by
00013 *  Nokia Corporation.
00014 * ==============================================================================
00015 */
00016 
00017 #ifndef MYVIEWAPPUI_H
00018 #define MYVIEWAPPUI_H
00019 
00020 // INCLUDES
00021 #include <eikapp.h>
00022 #include <eikdoc.h>
00023 #include <e32std.h>
00024 #include <coeccntx.h>
00025 #include <aknviewappui.h>       // View AppUi adds View handling to AppUi
00026 #include <akntabgrp.h>          // For handling tabs
00027 #include <aknnavide.h>
00028 
00029 // FORWARD DECLARATIONS
00030 class CMyViewView;
00031 class CMyViewView2;  
00032 // CLASS DECLARATION
00033 
00034 /**
00035 * Application UI class. CAknViewAppUi derives from CAknAppUi and has view handling methods added.
00036 * Provides support for the following features:
00037 * - EIKON control architecture
00038 * - view architecture
00039 * - status pane
00040 * 
00041 */
00042 class CMyViewAppUi : public CAknViewAppUi
00043     {
00044     public: // // Constructors and destructor
00045 
00046         /**
00047         * EPOC default constructor.
00048         */      
00049         void ConstructL();
00050 
00051         /**
00052         * Destructor.
00053         */      
00054         ~CMyViewAppUi();
00055         
00056     private:
00057         // From MEikMenuObserver
00058         // With this, we can dynamically manipulate menu items.
00059         void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
00060 
00061     private:
00062         /**
00063         * From CEikAppUi, takes care of command handling.
00064         * @param aCommand command to be handled
00065         */
00066         void HandleCommandL(TInt aCommand);
00067 
00068         /**
00069         * From CEikAppUi, handles key events.
00070         * @param aKeyEvent Event to handled.
00071         * @param aType Type of the key event. 
00072         * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). 
00073         */
00074         virtual TKeyResponse HandleKeyEventL(
00075             const TKeyEvent& aKeyEvent,TEventCode aType);
00076 
00077         void HandleForegroundEventL(TBool aForeground);
00078 
00079             /**
00080             * From CEikAppUi, handles key events.
00081             * @param aType The type of resources that have changed
00082             */    
00083             virtual void HandleResourceChangeL( TInt aType );  
00084 
00085     private: //Data
00086         CAknNavigationControlContainer* iNaviPane;
00087         CAknTabGroup*                   iTabGroup;
00088         CAknNavigationDecorator*        iDecoratedTabGroup;
00089                 TUid                                                    iViewId1;
00090                 TUid                                                    iViewId2;
00091     };
00092 
00093 #endif
00094 
00095 // End of File

© Nokia 2009

Back to top