creator/inc/creator_appui.h
branchRCL_3
changeset 22 fad26422216a
parent 0 d6fe6244b863
equal deleted inserted replaced
21:b3cee849fa46 22:fad26422216a
       
     1 /*
       
     2 * Copyright (c) 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 "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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CREATOR_APPUI_H__
       
    21 #define __CREATOR_APPUI_H__
       
    22 
       
    23 #include "creator_model.h"
       
    24 #include <creator.rsg>
       
    25 #include <aknappui.h>
       
    26 #include <aknnotewrappers.h> 
       
    27 
       
    28 
       
    29 class CCoeEnv;
       
    30 class CCreatorEngine;
       
    31 
       
    32 class CCreatorAppView;
       
    33 
       
    34 
       
    35 
       
    36 /*! 
       
    37   @class CCreatorAppUi
       
    38   
       
    39   @discussion An instance of class CCreatorAppUi is the UserInterface part of the AVKON
       
    40   application framework for the Creator example application
       
    41   */
       
    42 class CCreatorAppUi : public CAknAppUi, public MBeating
       
    43     {
       
    44 public:
       
    45 /*!
       
    46   @function ConstructL
       
    47   
       
    48   @discussion Perform the second phase construction of a CCreatorAppUi object
       
    49   this needs to be public due to the way the framework constructs the AppUi 
       
    50   */
       
    51     void ConstructL();
       
    52 
       
    53 /*!
       
    54   @function CCreatorAppUi
       
    55   
       
    56   @discussion Perform the first phase of two phase construction.
       
    57   This needs to be public due to the way the framework constructs the AppUi 
       
    58   */
       
    59     CCreatorAppUi();
       
    60 
       
    61 
       
    62 /*!
       
    63   @function ~CCreatorAppUi
       
    64   
       
    65   @discussion Destroy the object and release all memory objects
       
    66   */
       
    67     ~CCreatorAppUi();
       
    68 
       
    69 
       
    70 public: // from CEikAppUi
       
    71 /*!
       
    72   @function HandleCommandL
       
    73   
       
    74   @discussion Handle user menu selections
       
    75   @param aCommand the enumerated code for the option selected
       
    76   */
       
    77     void HandleCommandL(TInt aCommand);
       
    78 
       
    79 
       
    80 
       
    81 public: // from MEikMenuPaneObserver
       
    82     
       
    83     /*!
       
    84      @function DynInitMenuPaneL
       
    85 
       
    86      @discussion Initialise a menu pane before it is displayed
       
    87      @param aMenuId id of menu
       
    88      @param aMenuPane handle for menu pane
       
    89      */
       
    90     void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    91 
       
    92     // callback from engine when the commands from the script file have been executed
       
    93     void RunScriptDone();
       
    94 
       
    95     // from MBeating
       
    96     void Beat();
       
    97     void Synchronize();
       
    98 
       
    99 private:
       
   100 	void Tick();
       
   101 	
       
   102 protected:
       
   103     CEikonEnv* iEnv;
       
   104 
       
   105 
       
   106 //private:
       
   107 public:
       
   108     CCreatorAppView* iAppView;
       
   109     CCreatorEngine* iEngine;
       
   110 
       
   111 
       
   112 
       
   113 public:
       
   114 
       
   115 private:
       
   116 	HBufC* iCommandLineScriptName;
       
   117 	HBufC* iCommandLineRandomDataFileName;
       
   118 	CHeartbeat* iTimer;
       
   119 	enum TTimerMode
       
   120 		{
       
   121 		ETimerModeNone,
       
   122 		ETimerModeStartScript,
       
   123 		ETimerModeExitAppUi
       
   124 		};
       
   125 	TTimerMode iMode;
       
   126 	TInt iTickCount;
       
   127     };
       
   128 
       
   129 
       
   130 
       
   131 
       
   132 
       
   133 #endif // __CREATOR_APPUI_H__
       
   134