marquee.cpp

来自「手机文件浏览器 Here are the sources to SMan v1.」· C++ 代码 · 共 40 行

CPP
40
字号
#include "marquee.h"

/*************************************************************
*
* Marquee class
*
**************************************************************/

CMarquee::CMarquee() : CTimer(EPriorityNormal)
{
	CTimer::ConstructL();
	CActiveScheduler::Add(this);
}

void CMarquee::RunL()
{
	TPtrC *tempText;
	TBuf<KMaxPath + 8> tempPath;
	
	tempText = (TPtrC*)(localLabel->Label()->Text());
	if (localText->Length() > 20)
	{
		tempPath.Copy(tempText->Mid(1, tempText->Length() - 1));
		if (tempText->Length() == localText->Length())
			tempPath.Append(_L("        "));
		tempPath.Append(tempText->Left(1));
		localLabel->SetTextL(tempPath);
		localLabel->DrawNow();
	}
	After(400000);
}

void CMarquee::startMarquee(CEikTextButton *marqueeLabel, TPath *scrollText)
{
	localLabel = marqueeLabel;
	localText = scrollText;
	After(400000);
}

⌨️ 快捷键说明

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