当前位置: 首页>>代码示例>>C++>>正文


C++ CEikEdwin::HandleTextChangedL方法代码示例

本文整理汇总了C++中CEikEdwin::HandleTextChangedL方法的典型用法代码示例。如果您正苦于以下问题:C++ CEikEdwin::HandleTextChangedL方法的具体用法?C++ CEikEdwin::HandleTextChangedL怎么用?C++ CEikEdwin::HandleTextChangedL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CEikEdwin的用法示例。


在下文中一共展示了CEikEdwin::HandleTextChangedL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: HandleLogWriteL

void CSymellaConsoleView::HandleLogWriteL(const TDesC& aText)
{
	/*if (aText.Length() < KMaxConsoleBufferSize)
	{
		// Checks the new text length
		TInt diff = iTextBuffer->DocumentLength() + 
			aText.Length() - KMaxConsoleBufferSize;

		// If it's longer than the maximum then deletes from
		// the beginning
		if ( diff > 0)
		{
			iTextBuffer->DeleteL(0, diff);
			if (iContainer)
				iContainer->Edwin()->Text()->DeleteL(0, diff);
		}

		iTextBuffer->InsertL(iTextBuffer->DocumentLength(), aText);*/

		if (iContainer)
		{
			CEikEdwin* edwin = iContainer->Edwin();

			TInt diff = edwin->Text()->DocumentLength() + 
				aText.Length() - KMaxConsoleBufferSize;

			if (diff > edwin->Text()->DocumentLength()) 
				diff = edwin->Text()->DocumentLength();

			if ( diff > 0)			
				edwin->Text()->DeleteL(0, diff);

			
			edwin->Text()->InsertL(edwin->Text()->DocumentLength(), aText);
			edwin->HandleTextChangedL();
			edwin->SetCursorPosL(edwin->Text()->DocumentLength(), EFalse);		
		}
/*	}
	else
	{
		TPtrC ptr = aText.Right(KMaxConsoleBufferSize);

		iTextBuffer->DeleteL(0, iTextBuffer->DocumentLength());
		iTextBuffer->InsertL(0, ptr);
		if (iContainer)
		{
			CEikEdwin* edwin = iContainer->Edwin();
			edwin->Text()->DeleteL(0, edwin->Text()->DocumentLength());
			edwin->Text()->InsertL(0, ptr);
			edwin->HandleTextChangedL();
			edwin->SetCursorPosL(edwin->Text()->DocumentLength(), EFalse);		
		}		
	}*/
}
开发者ID:imrekel,项目名称:Symella,代码行数:54,代码来源:SymellaConsoleView.cpp


注:本文中的CEikEdwin::HandleTextChangedL方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。