📄 graphicslabappui.cpp
字号:
/*
* ============================================================================
* Name : CGraphicsLabAppUi from GraphicsLabAppUi.cpp
* Part of : GraphicsLab
* Created : 10/14/2002 by
* Implementation notes:
* Initial content was generated by Series 60 AppWizard.
* Version :
* Copyright:
* ============================================================================
*/
// INCLUDE FILES
#include "GraphicsLabAppUi.h"
#include "GraphicsLabAppView.h"
#include <GraphicsLab.rsg>
#include "graphicslab.hrh"
#include "graphicslab.pan"
#include <avkon.hrh>
// ================= MEMBER FUNCTIONS =======================
//
// ----------------------------------------------------------
// CGraphicsLabAppUi::ConstructL()
// ?implementation_description
// ----------------------------------------------------------
//
void CGraphicsLabAppUi::ConstructL()
{
BaseConstructL();
// create application view
iAppView = CGraphicsLabAppView::NewL(ApplicationRect());
AddToStackL(iAppView);
}
CGraphicsLabAppUi::CGraphicsLabAppUi()
{
}
// ----------------------------------------------------
// CGraphicsLabAppUi::~CGraphicsLabAppUi()
// Destructor
// Frees reserved resources
// ----------------------------------------------------
//
CGraphicsLabAppUi::~CGraphicsLabAppUi()
{
// delete the view if it exists
if (iAppView)
{
RemoveFromStack(iAppView);
delete iAppView;
iAppView = NULL;
}
}
// ------------------------------------------------------------------------------
// CGraphicsLabAppUi::::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 CGraphicsLabAppUi::DynInitMenuPaneL(
TInt /*aResourceId*/,CEikMenuPane* /*aMenuPane*/)
{
}
// ----------------------------------------------------
// CGraphicsLabAppUi::HandleKeyEventL(
// const TKeyEvent& aKeyEvent,TEventCode /*aType*/)
// ?implementation_description
// ----------------------------------------------------
//
TKeyResponse CGraphicsLabAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
// key events are handled in the app view
return iAppView->OfferKeyEventL(aKeyEvent, aType);
}
// ----------------------------------------------------
// CGraphicsLabAppUi::HandleCommandL(TInt aCommand)
// ?implementation_description
// ----------------------------------------------------
//
void CGraphicsLabAppUi::HandleCommandL(TInt aCommand)
{
switch(aCommand)
{
case EAknSoftkeyBack:
case EEikCmdExit:
{
Exit();
break;
}
// handle menu commands - see graphicslab.hrh for menu command IDs
case EGraphicsLabCmdStart:
iAppView->StartAnimation();
break;
case EGraphicsLabCmdStop:
iAppView->StopAnimation();
break;
case EGraphicsLabCmdReset:
iAppView->ResetCounter();
break;
default:
// something has gone wrong - panic
User::Panic (_L("GraphicsLab"), EGraphicsLabBasicUi);
break;
}
}
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -