亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? drawing_hellocontrol.cpp

?? Symbian OS C++ for Mobile Phones v3 Example Code
?? CPP
字號:
// Drawing_HelloControl.cpp
// ----------------------------
//
// Copyright (c) 2002 - 2007 Symbian Software Ltd.  All rights reserved.
//

////////////////////////////////////////////////////////////////////////
//
// Source file for the implementation of the 
// application CExampleHelloControl class
//
////////////////////////////////////////////////////////////////////////

#include "Drawing.h"
#include <GulUtil.h>


CExampleHelloControl* CExampleHelloControl::NewL(const CCoeControl& aContainer)
	{
	CExampleHelloControl* self=new(ELeave) CExampleHelloControl;
	CleanupStack::PushL(self);
	self->ConstructL(aContainer);
	CleanupStack::Pop();
	return self;
	}

void CExampleHelloControl::ConstructL(const CCoeControl& aContainer)
	{
	SetContainerWindowL(aContainer);
	iView=CExampleHelloView::NewL();
	iText=iEikonEnv->AllocReadResourceL(R_EXAMPLE_TEXT_HELLO_WORLD);
	iView->SetTextL(*iText);
	iZoomFactor.SetGraphicsDeviceMap(iCoeEnv->ScreenDevice());
	SetZoomAndDeviceDependentFontL(1000);
	ActivateL();
	}
	


TInt CExampleHelloControl::GetZoom() const
	{
	return iZoomFactor.ZoomFactor();
	}

//
//	Called on class construction and as a result of zooming in or out. 
//	As well as setting the zoom factor, the function allocates a device-dependent
//  font for the "Hello World" text.
//	This is an appropriate location for the font allocation as it is expected to
//	change when the user zooms in or out.
//	The font allocation could also be performed in Draw() or CExampleHelloControl::DrawL(), which
//	is called by Draw(). However, Draw() is not a leave function and it implements a
//  virtual function in the parent class and cannot be altered. Therefore, in order to
//  be able to allocate a font a trap harness would have to be used, resulting in a call
//  from Draw() something like the following, with the font allocation taking place in
//  DrawL(): TRAPD(err, iView -> DrawL(iZoomFactor, gc, rect));
//  Using a trap here is undesirable practice (although it would allow all the
//  device-independent code to be contained in the CExampleHelloView class).
//
void CExampleHelloControl::SetZoomAndDeviceDependentFontL(TInt aZoomFactor)
	{
	iZoomFactor.SetZoomFactor(aZoomFactor);

	//Allocate a device dependent font for drawing.
	iZoomFactor.ReleaseFont(iFont);
	iFont=NULL; // This is in case the function leaves with the LeaveIfError() below.
				// In this case iFont would still have the old value when the class
				// destructor is called, and in the destructor the zoom factor will
				// attempt to release the same font again, causing the application
				// to crash. 
    _LIT(fontName, "SwissA");
    TFontSpec fontSpec(fontName, 240); // font size is 12 point 
	fontSpec.iFontStyle=TFontStyle(EPostureUpright, EStrokeWeightBold, EPrintPosNormal);
	User::LeaveIfError(iZoomFactor.GetNearestFontInTwips(iFont, fontSpec));
	}

void CExampleHelloControl::SetZoomInL()
	{
	TInt zoom=GetZoom();
	zoom=
		zoom < 500 ?  500 :
		zoom < 1000 ? 1000 : 
		zoom < 1500 ? 1500 :
		zoom < 2000 ? 2000 :
		500;//if you keep zooming in the font and rectangle size becomes small again.
	SetZoomAndDeviceDependentFontL(zoom);
	}

void CExampleHelloControl::SetZoomOutL()
	{
	TInt zoom=GetZoom();
	zoom=
		zoom > 2000 ? 2000 :
		zoom > 1500 ? 1500 :
		zoom > 1000 ? 1000 :
		zoom > 500 ? 500 :
		2000;//if you keep zooming out the font and rectangle size becomes large again.
	SetZoomAndDeviceDependentFontL(zoom);
	}


void CExampleHelloControl::SetFullRedraw(TBool aFullRedraw)
	{
	iView->SetFullRedraw(aFullRedraw);
	}

CExampleHelloControl::~CExampleHelloControl()
	{
	delete iText;
	delete iView;
	iZoomFactor.ReleaseFont(iFont);	//releases the last font to be used
	}
//
// Draws a rectangle in a corner of the screen with a white border, then calls
// DrawInRect() to fill the rectangle
//
void CExampleHelloControl::Draw(const TRect& /*aRect*/) const
	{
	CWindowGc& gc=SystemGc();
	TRect rect=Rect();
	rect.Shrink(10,10);
	gc.SetPenStyle(CGraphicsContext::ENullPen);
	gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
	gc.SetBrushColor(KRgbWhite);
	DrawUtils::DrawBetweenRects(gc, Rect(), rect); 
	gc.SetPenStyle(CGraphicsContext::ESolidPen);
	gc.SetPenColor(KRgbBlack);
	gc.SetBrushStyle(CGraphicsContext::ENullBrush);
	gc.DrawRect(rect);
	rect.Shrink(1,1);
	iView->DrawInRect(iZoomFactor, gc, rect, iFont);
	}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品中文字幕一区二区三区| 久久久国产午夜精品| 国产美女一区二区| 亚洲一区二区三区不卡国产欧美| 中文av一区二区| 欧美激情中文不卡| 国产精品电影院| 亚洲人成精品久久久久| 亚洲国产精品尤物yw在线观看| 一区二区三区波多野结衣在线观看| 亚洲女人的天堂| 一区二区三区成人| 日本不卡一二三| 国产美女精品人人做人人爽| 成人av网站大全| 欧美日韩卡一卡二| 日韩三级.com| 国产一区二区精品久久| 91在线播放网址| 99久久精品国产网站| 91官网在线免费观看| 91精品国产福利在线观看| 亚洲精品在线免费播放| 欧美精彩视频一区二区三区| 亚洲人午夜精品天堂一二香蕉| 一区二区三区四区五区视频在线观看| 一区二区三区精密机械公司| 奇米四色…亚洲| 国产一区二区精品在线观看| 一本一本久久a久久精品综合麻豆| 欧美剧情片在线观看| 日本一区二区在线不卡| 亚洲一区在线视频| 国产精品99久久久久久久女警| 成人听书哪个软件好| 欧美情侣在线播放| 亚洲视频网在线直播| 久久机这里只有精品| 91黄色免费网站| 国产精品日产欧美久久久久| 奇米精品一区二区三区在线观看 | 亚洲人成网站在线| 美国欧美日韩国产在线播放| 国产.欧美.日韩| 日韩亚洲欧美一区二区三区| 国产精品欧美久久久久无广告| 婷婷丁香激情综合| 99re亚洲国产精品| 久久久久久久久久久电影| 日韩精品乱码免费| 色综合天天综合| 日韩精品一区二区三区蜜臀 | 91麻豆国产香蕉久久精品| 欧美高清视频www夜色资源网| 日韩免费成人网| 一区二区免费看| 福利电影一区二区| 精品日韩一区二区三区| 五月激情综合色| 在线观看国产日韩| 亚洲男人的天堂av| av在线播放一区二区三区| 久久久不卡网国产精品二区| 青青草97国产精品免费观看| 欧美三级一区二区| 亚洲成人免费av| 色女孩综合影院| 亚洲欧美一区二区不卡| 成人小视频在线| 国产日韩欧美精品一区| 国产高清不卡一区| 久久久亚洲精品一区二区三区| 极品尤物av久久免费看| 欧美v亚洲v综合ⅴ国产v| 欧美a级理论片| 精品久久久久一区二区国产| 激情图片小说一区| 国产亚洲精品超碰| 成人av网在线| 亚洲视频在线观看三级| 欧美综合视频在线观看| 亚洲一级二级在线| 69堂精品视频| 国产综合色产在线精品| 久久久久国产精品人| 成人午夜短视频| 夜夜嗨av一区二区三区中文字幕| 欧美午夜影院一区| 麻豆成人综合网| 欧美经典一区二区| 色综合一区二区三区| 丝袜诱惑制服诱惑色一区在线观看| 3d成人动漫网站| 懂色av中文一区二区三区| 亚洲老妇xxxxxx| 制服丝袜激情欧洲亚洲| 国产高清不卡二三区| 亚洲麻豆国产自偷在线| 欧美一区二区三区在| 高清久久久久久| 一区二区三区不卡在线观看| 国产精品萝li| 欧美乱妇20p| 高清shemale亚洲人妖| 亚洲制服丝袜在线| 久久伊99综合婷婷久久伊| 色婷婷av一区二区三区软件| 蜜臂av日日欢夜夜爽一区| 日韩毛片视频在线看| 欧美一区二区三区在线视频| 99视频一区二区| 毛片av中文字幕一区二区| 亚洲欧美自拍偷拍| 精品国产亚洲在线| 日本乱人伦一区| 国产不卡在线播放| 日产精品久久久久久久性色| 国产精品超碰97尤物18| 欧美va亚洲va香蕉在线| 欧美三级日韩三级| www.亚洲免费av| 国产资源在线一区| 日本欧美一区二区三区| 亚洲欧美日韩国产综合在线| 久久久www免费人成精品| 欧美一区二区三区婷婷月色| 色噜噜狠狠成人网p站| 国产成人av资源| 精东粉嫩av免费一区二区三区| 亚洲国产视频直播| 亚洲视频你懂的| 国产精品私人影院| 久久久另类综合| 欧美一区二区三区公司| 欧美男人的天堂一二区| 欧美亚洲尤物久久| 91久久久免费一区二区| 波多野结衣视频一区| 国产成人av在线影院| 国产乱码精品一品二品| 中文字幕一区二区三区色视频 | 亚洲成年人影院| 国产拍欧美日韩视频二区| 日韩一区二区三区免费看| 欧美人xxxx| 欧美福利电影网| 91精品国产综合久久久蜜臀图片| 欧美在线观看视频在线| 在线视频欧美精品| 色噜噜狠狠成人网p站| 色欧美88888久久久久久影院| 99综合影院在线| 99久久精品免费| 色偷偷成人一区二区三区91| 99精品视频在线免费观看| 欧美日韩在线三级| 欧美日韩成人在线| 欧美一区二区在线免费播放| 日韩一级欧美一级| 久久这里只精品最新地址| 国产欧美日产一区| 亚洲欧洲av一区二区三区久久| 日韩国产一区二| 精品制服美女久久| 91在线国产福利| 337p亚洲精品色噜噜噜| 国产欧美日韩不卡| 精品一区二区三区在线观看国产 | 美日韩一区二区| 国产精品自产自拍| 欧美一卡二卡在线| 亚洲一区中文日韩| 国产综合成人久久大片91| 亚洲www啪成人一区二区麻豆| 中文字幕一区二区三| 一区二区高清免费观看影视大全| 春色校园综合激情亚洲| 色网综合在线观看| 国内久久精品视频| 91在线国内视频| 日韩一区二区在线观看视频| 欧美精品一区二区三区很污很色的 | 国产日韩欧美电影| 亚洲老司机在线| 久99久精品视频免费观看| 成人永久看片免费视频天堂| 欧美在线观看一二区| 久久久久久黄色| 亚洲国产综合91精品麻豆| 精品在线观看免费| 91福利区一区二区三区| 亚洲精品在线三区| 亚洲亚洲精品在线观看| 国产尤物一区二区| 欧美日韩精品专区| 国产精品久久久久久久久快鸭 | 色综合天天综合色综合av| 欧美一级夜夜爽| 一区二区三区在线看| 国产在线看一区|