examples/AppFramework/BmpAnim/BmpAnimGui_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 "BmpAnimGui.h"
00017 
00018 // Second phase constructor of the application UI class.
00019 // It creates and owns a single view.
00020 void CExampleAppUi::ConstructL()
00021         {
00022         // Complete the UI framework's construction of the App UI.
00023         BaseConstructL();
00024         // Create the appview.
00025         iAppView = CExampleAppView::NewL( ClientRect() );
00026         }
00027 
00028 // The application UI class owns one view, and is responsible
00029 // for destroying it
00030 CExampleAppUi::~CExampleAppUi()
00031         {
00032         delete iAppView;
00033         }
00034 
00035 // Called by the UI framework when a command has been issued.
00036 void CExampleAppUi::HandleCommandL( TInt aCommand )
00037         {
00038         
00039         switch (aCommand)
00040                 {
00041         case EGuiBaseDo0:
00042                 iAppView->iBitmapAnimPlayer.SetPlayModeL( CBitmapAnimClientData::EPlay );
00043                 iAppView->iBitmapAnimPlayer.StartL();           
00044                 break;                           
00045         
00046         case EGuiBaseDo1:
00047                 iAppView->iBitmapAnimPlayer.StopL();
00048                 break;
00049         
00050         case EGuiBaseDo2:
00051                 iAppView->iBitmapAnimPlayer.SetPlayModeL( CBitmapAnimClientData::EBounce );
00052                 iAppView->iBitmapAnimPlayer.StartL();
00053                 break;
00054                 
00055         case EGuiBaseDo3:
00056                 iAppView->iBitmapAnimPlayer.SetPlayModeL( CBitmapAnimClientData::ECycle );
00057                 iAppView->iBitmapAnimPlayer.StartL();
00058                 break;
00059 
00060         case EEikCmdExit: 
00061                 Exit();
00062                 break;
00063                 }
00064         
00065         }
00066 

Generated by  doxygen 1.6.2