📄 smallservview.cpp
字号:
// SmallServView.cpp
//
// Copyright 05/03/2001
//
#include "SmallServView.h"
#include "SmallServDoc.h"
#include <eikenv.h>
//
// ConstructL
//
// Initial object setup chores.
void CSmallServView::ConstructL( const TRect& aRect
, CSmallServDocument* aDoc
)
{
iDoc = aDoc;
CreateWindowL();
Window().SetShadowDisabled(ETrue);
SetRect(aRect);
ActivateL();
}
//
// Draw
//
void CSmallServView::Draw(const TRect& /*aRect*/) const
{
CWindowGc& gc = SystemGc();
TRect drawRect = Rect();
gc.Clear();
// Draw an outline rectangle (the default pen
// and brush styles ensure this) slightly
// smaller than the drawing area.
drawRect.Shrink(10,10);
gc.DrawRect(drawRect);
// Use the title font supplied by the UI
const CFont* fontUsed = CEikonEnv::Static()->TitleFont();
gc.UseFont(fontUsed);
// Draw the text in the middle of the rectangle.
TInt baselineOffset=(drawRect.Height() - fontUsed->HeightInPixels())/2;
_LIT(KScreenPrompt, "Small Server App");
gc.DrawText(KScreenPrompt,drawRect,baselineOffset,CGraphicsContext::ECenter, 0);
// Finished using the font
gc.DiscardFont();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -