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


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

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


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

示例1: GetFieldsLC

void CUploadContainer::GetFieldsLC(HBufC*& Tag, HBufC*& Description)
{
	CALLSTACKITEM_N(_CL("CUploadContainer"), _CL("GetFieldsLC"));

	const TDesC& tag=iTagEdit->Text()->Read(0);
	delete Tag; Tag=0;
	if (tag.Length()>0 && tag.Left(tag.Length()-1).CompareF(KTag)) Tag=tag.Left(tag.Length()-1).AllocLC();
	else Tag=HBufC::NewLC(0);

	delete Description; Description=0;
	if (iDescriptionEdit) {
		const TDesC& desc=iDescriptionEdit->Text()->Read(0);
	
		if (desc.Length()>0 && desc.Left(desc.Length()-1).CompareF(KDescription)) 
			Description=desc.Left(desc.Length()-1).AllocLC();
		else
			Description=HBufC::NewLC(0);
	} else {
		Description=HBufC::NewLC(0);
	}
}
开发者ID:flaithbheartaigh,项目名称:jaikuengine-mobile-client,代码行数:21,代码来源:uploadview.cpp

示例2: 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

示例3: UseFontL

void CEikListBoxTextEditor::UseFontL( CEikEdwin& aEditor, const CFont& aFont )
	{
	_AKNTRACE_FUNC_ENTER;
	CGlobalText* globalText;

    TCharFormatMask defaultCharFormatMask;
	defaultCharFormatMask.SetAttrib(EAttFontTypeface);
	defaultCharFormatMask.SetAttrib(EAttFontHeight);
	TFontSpec fontspec = aFont.FontSpecInTwips();
    TCharFormat defaultCharFormat( fontspec.iTypeface.iName, fontspec.iHeight );

	iParaFormatLayer=CParaFormatLayer::NewL();
	iCharFormatLayer=CCharFormatLayer::NewL(defaultCharFormat,defaultCharFormatMask);
	globalText=CGlobalText::NewL(iParaFormatLayer,iCharFormatLayer,CEditableText::ESegmentedStorage,5);
	CleanupStack::PushL(globalText);

	TCharFormat charFormat;
	TCharFormatMask charMask;
	iCharFormatLayer->Sense(charFormat,charMask);
	if ( fontspec.iFontStyle.Posture()==EPostureItalic )
		{
		charMask.SetAttrib(EAttFontPosture);
		charFormat.iFontSpec.iFontStyle.SetPosture(EPostureItalic);
		}
	if ( fontspec.iFontStyle.StrokeWeight()==EStrokeWeightBold )
		{
		charMask.SetAttrib(EAttFontStrokeWeight );
		charFormat.iFontSpec.iFontStyle.SetStrokeWeight(EStrokeWeightBold);
		}
	iCharFormatLayer->SetL(charFormat,charMask);

	CPlainText* old=aEditor.Text();
	CleanupStack::Pop(); // globalText
	CleanupStack::PushL(old);	// old is pushed because we're using EUseText in the subsequent call
	aEditor.SetDocumentContentL(*globalText,CEikEdwin::EUseText);
	CleanupStack::PopAndDestroy();	// old
	_AKNTRACE_FUNC_EXIT;
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:38,代码来源:EIKLBED.CPP


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