examples/AppFramework/AnimExample/Anim_AppUi.cpp

00001 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 //
00015 
00016 #include "AnimExample.h"
00017 
00018 // Second phase constructor of the application UI class.
00019 // It creates and owns a single view.
00020 void CAnimationAppUi::ConstructL()
00021     {
00022     
00023         // Complete the UI framework's construction of the App UI.
00024         BaseConstructL();
00025         // Create the appview.
00026         iAppView = CAnimationAppView::NewL(ClientRect());
00027         }
00028 
00029 // The application UI class owns one view, and is responsible for destroying it
00030 CAnimationAppUi::~CAnimationAppUi()
00031         {
00032         delete iAppView;
00033         }
00034 
00035 // Called by the UI framework when a command has been issued.
00036 void CAnimationAppUi::HandleCommandL(TInt aCommand)
00037         {
00038         
00039         switch (aCommand)
00040                 {
00041         case EAnimToDo0:
00042                 
00043                 iAppView->ResetSpriteAnimAndMover();
00044                 iAppView->ProduceSpriteAnimL();
00045                 break;                           
00046         
00047         case EAnimToDo1:
00048         
00049                 iAppView->ResetBasicAnimAndMover();
00050                 iAppView->ProduceBasicAnimL();
00051                 break;
00052         
00053         case EAnimToDo2:
00054 
00055                 iAppView->DoSpriteAnimOperationL( EAnimPause );
00056                 break;
00057                 
00058         case EAnimToDo3:        
00059 
00060                 iAppView->DoSpriteAnimOperationL( EAnimResume );
00061                 break;
00062                 
00063                 case EAnimToDo4:
00064                 iAppView->DoSpriteAnimOperationL( EAnimStop );
00065                                 
00066                 break;
00067                 
00068         case EAnimToDo5:
00069 
00070                 iAppView->MoveAnimsL();
00071                 break;                           
00072         
00073         case EAnimToDo6:
00074 
00075                 iAppView->DoBasicAnimOperationL( EAnimPause );
00076                 break;
00077 
00078         case EAnimToDo7:
00079 
00080                 iAppView->DoBasicAnimOperationL( EAnimResume );
00081                 break;
00082                 
00083         case EAnimToDo8:
00084         
00085                 iAppView->DoBasicAnimOperationL( EAnimStop );
00086                 break;
00087                         
00088         case EAnimToDo9:        
00089         case EEikCmdExit:
00090         
00091                 Exit();
00092                 break;
00093                 }
00094                 
00095         }
00096 
00097         
00098 
00099 

Generated by  doxygen 1.6.2