📄 sampleappui.cpp
字号:
/*
* ============================================================================
* Name : CSampleAppUi from SampleAppUi.cpp
* Part of : Sample
* Created : 2005-09-27 by
* Implementation notes:
* Initial content was generated by Series 60 AppWizard.
* Version :
* Copyright:
* ============================================================================
*/
// INCLUDE FILES
#include "SampleAppUi.h"
#include "SampleContainer.h"
#include <Sample.rsg>
#include "sample.hrh"
#include <avkon.hrh>
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CSampleAppUi::ConstructL()
// ?implementation_description
// ----------------------------------------------------------
//
void CSampleAppUi::ConstructL()
{
BaseConstructL();
iAppContainer = new (ELeave) CSampleContainer;
iAppContainer->SetMopParent(this);
iAppContainer->ConstructL( TRect(0,0,176,208) );
AddToStackL( iAppContainer );
}
// ----------------------------------------------------
// CSampleAppUi::~CSampleAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CSampleAppUi::~CSampleAppUi()
{
if (iAppContainer)
{
RemoveFromStack( iAppContainer );
delete iAppContainer;
}
}
// ------------------------------------------------------------------------------
// CSampleAppUi::::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
// This function is called by the EIKON framework just before it displays
// a menu pane. Its default implementation is empty, and by overriding it,
// the application can set the state of menu items dynamically according
// to the state of application data.
// ------------------------------------------------------------------------------
//
void CSampleAppUi::DynInitMenuPaneL(
TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
{
}
// ----------------------------------------------------
// CSampleAppUi::HandleKeyEventL(
// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
// ?implementation_description
// ----------------------------------------------------
//
TKeyResponse CSampleAppUi::HandleKeyEventL(
const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
{
if (aKeyEvent.iScanCode == EStdKeyEscape)
{
Exit();
}
return EKeyWasNotConsumed;
}
// ----------------------------------------------------
// CSampleAppUi::HandleCommandL(TInt aCommand)
// ?implementation_description
// ----------------------------------------------------
//
void CSampleAppUi::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAknSoftkeyBack:
case EEikCmdExit:
{
Exit();
break;
}
case ESampleCmdAppTest:
{
iEikonEnv->InfoMsg(_L("test"));
break;
}
// TODO: Add Your command handling code here
default:
break;
}
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -