⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simpleex_view.cpp

📁 EMCC源代码 Symbian S60第二版
💻 CPP
字号:
// simpleEx_view.cpp
//
// Copyright (c) Symbian Software Ltd 1999 - 2007.  All rights reserved.
//

/*=================================================================
  This file contains the application view class for SimpleEx.
==================================================================*/

#include "eikenv.h"
#include <coemain.h>

#include "SimpleEx.h"

CSimpleExAppView* CSimpleExAppView::NewL(const TRect& aRect)
	{
    CSimpleExAppView* self = CSimpleExAppView::NewLC(aRect);
    CleanupStack::Pop(self);
    return self;
	}

CSimpleExAppView* CSimpleExAppView::NewLC(const TRect& aRect)
	{
    CSimpleExAppView* self = new (ELeave) CSimpleExAppView;
    CleanupStack::PushL(self);
    self->ConstructL(aRect);
    return self;
	}

void CSimpleExAppView::ConstructL(const TRect& aRect)
	{
    CreateWindowL();
    SetRect(aRect);
    ActivateL();
	}

void CSimpleExAppView::Draw(const TRect& ) const
	{
    CWindowGc& gc = SystemGc();   
	gc.Clear();

	const CFont* font = iEikonEnv->TitleFont();
	gc.UseFont(font);
	
	TRect drawRect = Rect();
	TInt baselineOffset=(drawRect.Height() - font->HeightInPixels())/2; 
	gc.DrawText(_L("Simple Example"),drawRect,baselineOffset,CGraphicsContext::ECenter, 0);
	gc.DiscardFont();
	}


⌨️ 快捷键说明

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