|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================ 00003 * Name : tactileexampleappui.cpp 00004 * Part of : Tactile Example 00005 * Interface : N/A 00006 * Description : Implementation of UI class 00007 * Version : 00008 * 00009 * Copyright (c) 2008 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================ 00014 */ 00015 00016 // INCLUDE FILES 00017 #include <aknnotewrappers.h> 00018 #include <tactileexample.rsg> 00019 #include <touchfeedback.h> 00020 #include "tactileexampleappui.h" 00021 #include "tactileexampleappview.h" 00022 00023 00024 00025 // ============================ MEMBER FUNCTIONS ============================= 00026 00027 00028 // --------------------------------------------------------------------------- 00029 // C++ default constructor can NOT contain any code, that might leave. 00030 // --------------------------------------------------------------------------- 00031 // 00032 CTactileExampleAppUi::CTactileExampleAppUi() 00033 { 00034 // No implementation required 00035 } 00036 00037 00038 // --------------------------------------------------------------------------- 00039 // Symbian 2nd phase constructor can leave. 00040 // --------------------------------------------------------------------------- 00041 // 00042 void CTactileExampleAppUi::ConstructL() 00043 { 00044 // Initialise app UI with standard value. 00045 BaseConstructL( CAknAppUi::EAknEnableSkin ); 00046 00047 00048 // Create view object 00049 iAppView = CTactileExampleAppView::NewL( ClientRect() ); 00050 // We need to set the object provider parent for the view, so that 00051 // automatic feedback area disabling works for dimmed and invisible 00052 // controls. 00053 iAppView->SetMopParent( this ); 00054 AddToStackL( iAppView ); 00055 } 00056 00057 00058 // --------------------------------------------------------------------------- 00059 // Destructor. 00060 // --------------------------------------------------------------------------- 00061 // 00062 CTactileExampleAppUi::~CTactileExampleAppUi() 00063 { 00064 RemoveFromStack( iAppView ); 00065 if ( iAppView ) 00066 { 00067 delete iAppView; 00068 iAppView = NULL; 00069 } 00070 } 00071 00072 00073 // --------------------------------------------------------------------------- 00074 // From class CEikAppUi. 00075 // Takes care of command handling. 00076 // --------------------------------------------------------------------------- 00077 // 00078 void CTactileExampleAppUi::HandleCommandL( TInt aCommand ) 00079 { 00080 switch( aCommand ) 00081 { 00082 case EAknSoftkeyBack: 00083 case EAknSoftkeyExit: 00084 case EEikCmdExit: 00085 Exit(); 00086 break; 00087 00088 default: 00089 break; 00090 } 00091 } 00092 00093 00094 // --------------------------------------------------------------------------- 00095 // From class CEikAppUi. 00096 // Called by framework when layout is changed. 00097 // Passes the new client rectangle to the AppView 00098 // --------------------------------------------------------------------------- 00099 // 00100 void CTactileExampleAppUi::HandleResourceChangeL( TInt aType ) 00101 { 00102 // base-class call also 00103 CAknAppUi::HandleResourceChangeL( aType ); 00104 if ( aType == KEikDynamicLayoutVariantSwitch ) 00105 { 00106 if ( iAppView ) 00107 { 00108 iAppView->SetRect( ClientRect() ); 00109 } 00110 } 00111 } 00112 // End of File 00113
|
© Nokia 2009 |