⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simplemenuappui.cpp

📁 symbian下一个目录的例子,对新手有很大帮助
💻 CPP
字号:
/**
* 
* @brief Definition of CSimpleMenuAppUi
*
* Copyright (c) EMCC Software Ltd 2003
* @version 1.0
*/

// INCLUDE FILES

// Class include
#include "SimpleMenuAppUi.h"

// User includes
#include "SimpleMenu.hrh"
#include "SimpleMenuContainer.h" // CSimpleMenuContainer

// ================= MEMBER FUNCTIONS =======================

/**
* Symbian OS 2nd phase constructor.  Constructs the application's container, 
* setting itself as the container's MOP parent, and adds it to the control 
* stack.
*/		
void CSimpleMenuAppUi::ConstructL()
	{
	BaseConstructL();
	iAppContainer = CSimpleMenuContainer::NewL(ClientRect());
	iAppContainer->SetMopParent(this);
	AddToStackL(iAppContainer);
	}

/**
* Destructor.
* Removes the application's container from the stack and deletes it.
*/	
CSimpleMenuAppUi::~CSimpleMenuAppUi()
	{
	if (iAppContainer)
		{
		RemoveFromStack(iAppContainer);
		delete iAppContainer;
		}
	}

/**
* From CEikAppUi, takes care of command handling.
*
* @param aCommand command to be handled
*/
void CSimpleMenuAppUi::HandleCommandL(TInt aCommand)
	{
	switch (aCommand)
		{
		// New game submenu. N.B. We don't need to handle
		// the ESimpleMenuCmdNewGame command as this just pops 
		// up the submenu.
		case ESimpleMenuCmdViaIR:
			iAppContainer->PlayNewGameVia(aCommand);
			break;		
		case ESimpleMenuCmdViaBluetooth:
			iAppContainer->PlayNewGameVia(aCommand);
			break;		
		case ESimpleMenuCmdViaSMS:
			iAppContainer->PlayNewGameVia(aCommand);
			break;		
		case EAknSoftkeyBack:
		case EEikCmdExit:
			Exit();
			break;
		default:
			break;		
		}
	}

// End of File	

⌨️ 快捷键说明

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