|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : SimpleLightAppUi.h 00004 * Part of : OpenGLEx / SimpleLight 00005 * 00006 * Copyright (c) 2004-2006 Nokia Corporation. 00007 * This material, including documentation and any related 00008 * computer programs, is protected by copyright controlled by 00009 * Nokia Corporation. 00010 * ============================================================================== 00011 */ 00012 00013 #ifndef SIMPLELIGHTAPPUI_H 00014 #define SIMPLELIGHTAPPUI_H 00015 00016 // INCLUDES 00017 #include <eikapp.h> 00018 #include <eikdoc.h> 00019 #include <e32std.h> 00020 #include <coeccntx.h> 00021 #include <aknappui.h> 00022 00023 // FORWARD DECLARATIONS 00024 class CSimpleLightContainer; 00025 00026 00027 // CLASS DECLARATION 00028 00029 /** 00030 * Application UI class that is contains the CSimpleLightContainer 00031 * (as required by the Symbian UI application architecture). 00032 */ 00033 class CSimpleLightAppUi : public CAknAppUi 00034 { 00035 public: // Constructors and destructor 00036 00037 /** 00038 * Second phase constructor. Creates the CSimpleLightContainer 00039 * and adds it to the control stack. 00040 */ 00041 void ConstructL(); 00042 00043 /** 00044 * Destructor. Removes CSimpleLightContainer from the control 00045 * stack and destroys it. 00046 */ 00047 virtual ~CSimpleLightAppUi(); 00048 00049 private: // Functions from base classes 00050 00051 /** 00052 * This method is called by the EIKON framework just before it displays 00053 * a menu pane. Builds the dynamic menuitems for toggling the lights on and 00054 * off in the example. 00055 */ 00056 void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); 00057 00058 /** 00059 * CEikAppUi method that is used to handle user commands. 00060 * Handles menu commands and application exit request. 00061 * @param aCommand Command to be handled. 00062 */ 00063 void HandleCommandL(TInt aCommand); 00064 00065 /** 00066 * CEikAppUi method that is used to handle key events. 00067 * Does nothing in this implemenation. 00068 * @param aKeyEvent Event to handled (ignored by this implementation). 00069 * @param aType Type of the key event (ignored by this implementation). 00070 * @return Response code. Always EKeyWasNotConsumed in this implementation. 00071 */ 00072 virtual TKeyResponse HandleKeyEventL( 00073 const TKeyEvent& aKeyEvent,TEventCode aType); 00074 00075 private: //Data 00076 00077 /** GUI container that resides in this application UI. */ 00078 CSimpleLightContainer* iAppContainer; 00079 }; 00080 00081 #endif 00082 00083 // End of File
|
© Nokia 2009 |