?? drawing.h
字號:
// drawing.h
// ------------
//
// Copyright (c) 2002 - 2007 Symbian Software Ltd. All rights reserved.
//
////////////////////////////////////////////////////////////////////
// drawing
// ----------
//
//
// The class definitions for the example application
// containing a single view with the text "Hello World !" drawn in 2
// separate boxes.
//
// The class definitions are:
//
// CExampleApplication
// CExampleAppUi
// CExampleAppView
// CExampleDocument
//
//
////////////////////////////////////////////////////////////////////
#ifndef __DRAWING_H
#define __DRAWING_H
#include <coeccntx.h>
#include <eikenv.h>
#include <eikappui.h>
#include <eikapp.h>
#include <eikdoc.h>
#include <eikmenup.h>
#include <eikon.hrh>
#include <aknappui.h>
#include <drawing.rsg>
#include "drawing.hrh"
////////////////////////////////////////////////////////////////////////
//
// CExampleApplication
//
////////////////////////////////////////////////////////////////////////
class CExampleApplication : public CEikApplication
{
private:
// Inherited from class CApaApplication
CApaDocument* CreateDocumentL();
TUid AppDllUid() const;
};
////////////////////////////////////////////////////////////////////////
//
// CExampleAppView
//
////////////////////////////////////////////////////////////////////////
class CExampleHelloView : public CBase
{
public:
// construct/destruct
static CExampleHelloView* NewL();
~CExampleHelloView();
// settings
void SetTextL(const TDesC& aText);
void SetFullRedraw(TBool aFullRedraw);
// draw
void DrawInRect(const MGraphicsDeviceMap& aMap, CGraphicsContext& aGc, const TRect& aDeviceRect, CFont* aFont) const;
private:
void ConstructL();
private:
HBufC* iText;
TBool iFullRedraw;
};
class CExampleHelloControl : public CCoeControl
{
public:
// construct/destruct
static CExampleHelloControl* NewL(const CCoeControl& aContainer, const TRect& aRect);
~CExampleHelloControl();
// settings
void SetZoomAndDeviceDependentFontL(TInt aZoomFactor);
TInt GetZoom() const;
void SetZoomInL();
void SetZoomOutL();
void SetFullRedraw(TBool aFullRedraw);
private:
void ConstructL(const CCoeControl& aContainer, const TRect& aRect);
private: // from CCoeControl
void Draw(const TRect&) const;
private:
HBufC* iText;
TZoomFactor iZoomFactor;
CExampleHelloView* iView;
CFont* iFont;
};
// EIKON application classes
class CExampleAppView : public CCoeControl
{
public:
~CExampleAppView();
void ConstructL(const TRect& aRect);
// zooming
void ZoomInL();
void ZoomOutL();
private: // from CCoeControl
TInt CountComponentControls() const;
CCoeControl* ComponentControl(TInt aIndex) const;
private:
CExampleHelloControl* iControl0;
CExampleHelloControl* iControl1;
CExampleHelloControl* iControl2;
CExampleHelloControl* iControl3;
};
////////////////////////////////////////////////////////////////////////
//
// CExampleAppUi
//
////////////////////////////////////////////////////////////////////////
//class CExampleAppUi : public CEikAppUi
class CExampleAppUi : public CAknAppUi
{
public:
void ConstructL();
~CExampleAppUi();
private:
// Inherited from class CEikAppUi
void HandleCommandL(TInt aCommand);
private:
CExampleAppView* iAppView;
};
////////////////////////////////////////////////////////////////////////
//
// CExampleDocument
//
////////////////////////////////////////////////////////////////////////
class CExampleDocument : public CEikDocument
{
public:
static CExampleDocument* NewL(CEikApplication& aApp);
CExampleDocument(CEikApplication& aApp);
void ConstructL();
private:
// Inherited from CEikDocument
CEikAppUi* CreateAppUiL();
};
#endif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -