examples/SFExamples/SkeletonS60/src/SkeletonAppUi.cpp

00001 // 
00002 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
00003 // All rights reserved.
00004 // This component and the accompanying materials are made available
00005 // under the terms of the License "Eclipse Public License v1.0"
00006 // which accompanies this distribution, and is available
00007 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00008 // 
00009 // Initial Contributors:
00010 // Nokia Corporation - initial contribution.
00011 // 
00012 // Contributors:
00013 // 
00014 // Description:  CSkeletonAppUi implementation
00015 // 
00016 // 
00017 
00018 
00019 // INCLUDE FILES
00020 #include <avkon.hrh>
00021 
00022 
00023 
00024 #include <Skeleton_0xEDC523C6.rsg>
00025 
00026 #include "Skeleton.hrh"
00027 #include "SkeletonApplication.h"
00028 #include "SkeletonAppUi.h"
00029 #include "SkeletonAppView.h"
00030 
00031 // ============================ MEMBER FUNCTIONS ===============================
00032 
00033 
00034 // -----------------------------------------------------------------------------
00035 // CSkeletonAppUi::ConstructL()
00036 // Symbian 2nd phase constructor can leave.
00037 // -----------------------------------------------------------------------------
00038 //
00039 void CSkeletonAppUi::ConstructL()
00040         {
00041         // Initialise app UI with standard value.
00042         BaseConstructL(CAknAppUi::EAknEnableSkin);
00043 
00044         // Remove key blocking.
00045         SetKeyBlockMode(ENoKeyBlock);
00046         
00047         // Create view object
00048         iAppView = CSkeletonAppView::NewL( ClientRect() );
00049         AddToStackL(iAppView);
00050         }
00051 // -----------------------------------------------------------------------------
00052 // CSkeletonAppUi::CSkeletonAppUi()
00053 // C++ default constructor can NOT contain any code, that might leave.
00054 // -----------------------------------------------------------------------------
00055 //
00056 CSkeletonAppUi::CSkeletonAppUi()
00057         {
00058         // No implementation required
00059         }
00060 
00061 // -----------------------------------------------------------------------------
00062 // CSkeletonAppUi::~CSkeletonAppUi()
00063 // Destructor.
00064 // -----------------------------------------------------------------------------
00065 //
00066 CSkeletonAppUi::~CSkeletonAppUi()
00067         {
00068         if (iAppView)
00069                 {
00070                 RemoveFromStack(iAppView);
00071                 delete iAppView;
00072                 }
00073         }
00074 
00075 // -----------------------------------------------------------------------------
00076 // CSkeletonAppUi::HandleCommandL()
00077 // Takes care of command handling.
00078 // -----------------------------------------------------------------------------
00079 //
00080 void CSkeletonAppUi::HandleCommandL( TInt aCommand )
00081         {
00082         switch( aCommand )
00083                 {
00084                 case EEikCmdExit:
00085                 case EAknSoftkeyExit:
00086                         Exit();
00087                         break;
00088                 case EResume:
00089                         {
00090                         // Handler code to resume the game, if necessary
00091                         // Focus is regained automatically, so do nothing               
00092                         }
00093                         break;
00094                 default:
00095                         ASSERT(EFalse); // Should not get here
00096                         break;
00097                 }
00098         }
00099 // -----------------------------------------------------------------------------
00100 //  Called by the framework when the application status pane
00101 //  size is changed.  Passes the new client rectangle to the
00102 //  AppView
00103 // -----------------------------------------------------------------------------
00104 //
00105 void CSkeletonAppUi::HandleStatusPaneSizeChange()
00106         {
00107         iAppView->SetRect( ClientRect() );
00108         } 
00109 
00110 
00111 
00112 // End of File

Generated by  doxygen 1.6.2