drawing_appui.cpp

来自「Symbian OS C++ for Mobile Phones v3 Exam」· C++ 代码 · 共 79 行

CPP
79
字号
// Drawing_AppUi.cpp
// ----------------------------
//
// Copyright (c) 2002 - 2007 Symbian Software Ltd.  All rights reserved.
//

////////////////////////////////////////////////////////////////////////
//
// Source file for the implementation of the 
// application UI class - CExampleAppUi
//
////////////////////////////////////////////////////////////////////////

#include "Drawing.h"
#include <avkon.hrh>

//             The second phase constructor of the application UI class.
//             The application UI creates and owns the one and only view.
// 
void CExampleAppUi::ConstructL()
    {
	           // BaseConstructL() completes the UI framework's
	           // construction of the App UI.
    BaseConstructL(EAknEnableSkin);
	           // Create the single application view in which to
	           // draw the text "Hello World!", passing into it
	           // the rectangle available to it.
	iAppView=new(ELeave) CExampleAppView;
	iAppView->ConstructL(ClientRect());

	}


//             The app Ui owns the view and is responsible for destroying it
//
CExampleAppUi::~CExampleAppUi()
	{
	delete iAppView;
	}


//             Called by the UI framework when a command has been issued.
//             In this example, a command can originate through a 
//             shortcut-key press or by selection of a menu item.
//             The command Ids are defined in the .hrh file
//             and are 'connected' to the hot-key and menu item in the
//             resource file.
//             Note that the EEikCmdExit is defined by the UI
//             framework and is pulled in by including eikon.hrh
//
void CExampleAppUi::HandleCommandL(TInt aCommand)
	{
	switch (aCommand)
		{
	case EExampleCmd1:
		iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_CMD1);
		break;
	case EExampleCmd2:
		iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_CMD2);
		break;
	case EExampleCmd3:
		iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_CMD3);
		break;
	case EExampleCmd4:
		iEikonEnv->InfoMsg(R_EXAMPLE_TEXT_CMD4);
		break;
	case EEikCmdZoomIn:
		iAppView->ZoomInL();
		break;
	case EEikCmdZoomOut:
		iAppView->ZoomOutL();
		break;
	case EEikCmdExit:
	case EAknSoftkeyExit:
		Exit();
		break;
		}
	}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?