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

📄 textinputdialog.cpp

📁 Symbian OS C++ for Mobile Phones Volume 3 源码
💻 CPP
字号:

#include <oandx.rsg>
#include "oandxappui.h"
#include "oandxcontroller.h"


CTextInputDialog::CTextInputDialog(const TDesC& aTitle, TDes& aBuffer)
/**
	Record the dialog's title and the descriptor into which the
	data is written.
	Record descriptor into which the data is written.
	
	@param	aDlgTitle		Dialog title text.  Thios must be valid until
							the dialog has been constructed.
	@param	aBuffer			Buffer which will be populated with text
							entered by the user.
 */
:	iTitle(aTitle),
	iBuffer(aBuffer)
	{
	// empty.
	}

void CTextInputDialog::PreLayoutDynInitL()
/**
	Overrides CEikDialog by populating the dialog from the initial name.
 */
	{
	SetTitleL(iTitle);
	
	CEikEdwin* pew = static_cast<CEikEdwin*>(Control(EAddressCtIdName));
	pew->SetTextLimit(iBuffer.MaxLength());
	}

TBool CTextInputDialog::OkToExitL(TInt aKeyCode)
/**
	Overrides CEikDialog by deciding whether it is all right to
	close the dialog.  On exit the updated address is stored
	in iAddress.  This function leaves and displays a message
	if no address has been entered.

	@param	aKeyCode		The ID of the button that was activated.
	@return					ETrue, meaning the dialog can be closed.
 */
	{
	(void) aKeyCode;

	CEikEdwin* pew = static_cast<CEikEdwin*>(Control(EAddressCtIdName));
	pew->GetText(iBuffer);
	if (iBuffer.Length() == 0)
		CEikonEnv::Static()->LeaveWithInfoMsg(R_TEXTINPUT_ENTER_TEXT);

	return ETrue;
	}

⌨️ 快捷键说明

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