📄 s60testappview.cpp
字号:
#include <coemain.h>
#include <eikenv.h>
#include "S60TestAppView.h"
#include "S60TestDocument.h"
CS60TestAppView *CS60TestAppView::NewL(const TRect& aRect, CS60TestDocument *aDoc)
{
CS60TestAppView *self=CS60TestAppView::NewLC(aRect, aDoc);
CleanupStack::Pop(self);
return self;
}
CS60TestAppView* CS60TestAppView::NewLC(const TRect& aRect, CS60TestDocument *aDoc)
{
CS60TestAppView *self=new(ELeave) CS60TestAppView(aDoc);
CleanupStack::PushL(self);
self->ConstructL(aRect);
return self;
}
CS60TestAppView::CS60TestAppView(CS60TestDocument *aDoc)
{
iDoc=aDoc;
}
CS60TestAppView::~CS60TestAppView()
{
}
void CS60TestAppView::ConstructL(const TRect& aRect)
{
CreateWindowL();
SetRect(aRect);
ActivateL();
}
void CS60TestAppView::Draw(const TRect& /*aRect*/) const
{
CWindowGc &gc=SystemGc();
TRect rect=Rect();
gc.Clear(rect);
TBuf<64> napis;
_LIT(format, "Drawing area %dx%d");
napis.Format(format, rect.Width(), rect.Height());
gc.UseFont(iCoeEnv->NormalFont());
gc.DrawText(napis, TPoint(5, 50));
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -