📄 graphicsappui.cpp
字号:
/*
============================================================================
Name : GraphicsAppUi.cpp
Author :
Copyright : Your copyright notice
Description : CGraphicsAppUi implementation
============================================================================
*/
// INCLUDE FILES
#include <avkon.hrh>
#include <aknmessagequerydialog.h>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <f32file.h>
#include <s32file.h>
#include <hlplch.h>
#include <Graphics_0xEA8EF6CD.rsg>
#include "Graphics_0xEA8EF6CD.hlp.hrh"
#include "Graphics.hrh"
#include "Graphics.pan"
#include "GraphicsApplication.h"
#include "GraphicsAppUi.h"
#include "GraphicsAppView.h"
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CGraphicsAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CGraphicsAppUi::ConstructL()
{
// Initialise app UI with standard value.
BaseConstructL(CAknAppUi::EAknEnableSkin);
// Create view object
iAppView = CGraphicsAppView::NewL(ClientRect());
// Create a file to write the text to
/* TInt err = CCoeEnv::Static()->FsSession().MkDirAll(KFileName);
if ((KErrNone != err) && (KErrAlreadyExists != err))
{
return;
}
RFile file;
err = file.Replace(CCoeEnv::Static()->FsSession(), KFileName, EFileWrite);
CleanupClosePushL(file);
if (KErrNone != err)
{
CleanupStack::PopAndDestroy(1); // file
return;
}
RFileWriteStream outputFileStream(file);
CleanupClosePushL(outputFileStream);
outputFileStream << KText;*/
//CleanupStack::PopAndDestroy(2); // outputFileStream, file
}
// -----------------------------------------------------------------------------
// CGraphicsAppUi::CGraphicsAppUi()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CGraphicsAppUi::CGraphicsAppUi()
{
// No implementation required
}
// -----------------------------------------------------------------------------
// CGraphicsAppUi::~CGraphicsAppUi()
// Destructor.
// -----------------------------------------------------------------------------
//
CGraphicsAppUi::~CGraphicsAppUi()
{
if (iAppView)
{
delete iAppView;
iAppView = NULL;
}
}
// -----------------------------------------------------------------------------
// CGraphicsAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CGraphicsAppUi::HandleCommandL(TInt aCommand)
{
//在AppUI中处理command
switch(aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case EGaphicsNoOffScreenDemo:
iAppView->StartNoOffScreenDemo();
break;
case EGaphicsOffScreenDemo:
iAppView->StartOffScreenDemo();
break;
case EGaphicsStopDemo:
iAppView->StopDemo();
break;
default:
_LIT(KGraphicsPanic,"Graphics");
User::Panic (KGraphicsPanic, EGraphicsBasicUi);
break;
}
}
// -----------------------------------------------------------------------------
// Called by the framework when the application status pane
// size is changed. Passes the new client rectangle to the
// AppView
// -----------------------------------------------------------------------------
//
void CGraphicsAppUi::HandleStatusPaneSizeChange()
{
iAppView->SetRect(ClientRect());
}
/*CArrayFix<TCoeHelpContext>* CGraphicsAppUi::HelpContextL() const
{
#warning "Please see comment about help and UID3..."
// Note: Help will not work if the application uid3 is not in the
// protected range. The default uid3 range for projects created
// from this template (0xE0000000 - 0xEFFFFFFF) are not in the protected range so that they
// can be self signed and installed on the device during testing.
// Once you get your official uid3 from Symbian Ltd. and find/replace
// all occurrences of uid3 in your project, the context help will
// work. Alternatively, a patch now exists for the versions of
// HTML help compiler in SDKs and can be found here along with an FAQ:
// http://www3.symbian.com/faq.nsf/AllByDate/E9DF3257FD565A658025733900805EA2?OpenDocument
CArrayFixFlat<TCoeHelpContext>* array = new (ELeave) CArrayFixFlat<
TCoeHelpContext> (1);
CleanupStack::PushL(array);
array->AppendL(TCoeHelpContext(KUidGraphicsApp, KGeneral_Information));
CleanupStack::Pop(array);
return array;
}*/
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -