1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/openvg/openvgrefimplementation/sfopenvg/test/src/tigerAppUi.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,101 @@
1.4 +/*
1.5 +* Copyright (c) 2009 Symbian Foundation Ltd
1.6 +* This component and the accompanying materials are made available
1.7 +* under the terms of the License "Eclipse Public License v1.0"
1.8 +* which accompanies this distribution, and is available
1.9 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +*
1.11 +* Initial Contributors:
1.12 +* Symbian Foundation Ltd - initial contribution.
1.13 +*
1.14 +* Contributors:
1.15 +*
1.16 +* Description:
1.17 +* Implementation of CTigerAppUi class
1.18 +*/
1.19 +
1.20 +
1.21 +// INCLUDE FILES
1.22 +#include "TigerAppUi.h"
1.23 +#include "TigerContainer.h"
1.24 +#include <Tiger.rsg>
1.25 +#include "Tiger.hrh"
1.26 +
1.27 +#include <avkon.hrh>
1.28 +
1.29 +// ================= MEMBER FUNCTIONS =======================
1.30 +//
1.31 +// ----------------------------------------------------------
1.32 +// CTigerAppUi::ConstructL()
1.33 +// ----------------------------------------------------------
1.34 +//
1.35 +void CTigerAppUi::ConstructL()
1.36 + {
1.37 + BaseConstructL();
1.38 + iAppContainer = new (ELeave) CTigerContainer;
1.39 + iAppContainer->SetMopParent(this);
1.40 + iAppContainer->ConstructL( ClientRect() );
1.41 + AddToStackL( iAppContainer );
1.42 + }
1.43 +
1.44 +// ----------------------------------------------------
1.45 +// CTigerAppUi::~CTigerAppUi()
1.46 +// Destructor
1.47 +// Frees reserved resources
1.48 +// ----------------------------------------------------
1.49 +//
1.50 +CTigerAppUi::~CTigerAppUi()
1.51 +{
1.52 + if ( iAppContainer )
1.53 + {
1.54 + RemoveFromStack( iAppContainer );
1.55 + delete iAppContainer;
1.56 + }
1.57 +}
1.58 +
1.59 +// ------------------------------------------------------------------------------
1.60 +// CTigerAppUi::::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
1.61 +// This function is called by the EIKON framework just before it displays
1.62 +// a menu pane. Its default implementation is empty, and by overriding it,
1.63 +// the application can set the state of menu items dynamically according
1.64 +// to the state of application data.
1.65 +// ------------------------------------------------------------------------------
1.66 +//
1.67 +void CTigerAppUi::DynInitMenuPaneL(
1.68 + TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
1.69 + {
1.70 + }
1.71 +
1.72 +// ----------------------------------------------------
1.73 +// CTigerAppUi::HandleKeyEventL(
1.74 +// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
1.75 +// Key event handler
1.76 +// ----------------------------------------------------
1.77 +//
1.78 +TKeyResponse CTigerAppUi::HandleKeyEventL(
1.79 + const TKeyEvent& /*aKeyEvent*/ ,TEventCode /*aType*/)
1.80 +{
1.81 + return EKeyWasNotConsumed;
1.82 +}
1.83 +
1.84 +// ----------------------------------------------------
1.85 +// CTigerAppUi::HandleCommandL(TInt aCommand)
1.86 +// Command handler
1.87 +// ----------------------------------------------------
1.88 +//
1.89 +void CTigerAppUi::HandleCommandL(TInt aCommand)
1.90 + {
1.91 + switch ( aCommand )
1.92 + {
1.93 + case EAknSoftkeyBack:
1.94 + case EEikCmdExit:
1.95 + {
1.96 + Exit();
1.97 + break;
1.98 + }
1.99 + default:
1.100 + break;
1.101 + }
1.102 + }
1.103 +
1.104 +// End of File