📄 graphicsappview.h
字号:
/* Copyright (c) 2003, Nokia Mobile Phones. All rights reserved */
#ifndef __GRAPHICSAPPVIEW_H__
#define __GRAPHICSAPPVIEW_H__
#include <coecntrl.h>
class CSprite;
/*!
@class CGraphicsAppView
@discussion An instance of this class is the Application View object for the Graphics
example application
*/
class CGraphicsAppView : public CCoeControl
{
public:
/*!
@function NewL
@discussion Create a CGraphicsAppView object
@param aRect the rectangle this view will be drawn to
@result A pointer to the created instance of CGraphicsAppView
*/
static CGraphicsAppView* NewL(const TRect& aRect);
/*!
@function NewLC
@discussion Create a CGraphicsAppView object
@param aRect A pointer to the rectangle this view will be drawn to
@result A pointer to the created instance of CGraphicsAppView
*/
static CGraphicsAppView* NewLC(const TRect& aRect);
/*!
@function ~CGraphicsAppView
@discussion Destroy the object
*/
~CGraphicsAppView();
/*!
@function StartOffScreenDemo
@discussion Begin the demo using an off screen bitmap
*/
void StartOffScreenDemo();
/*!
@function StartNoOffScreenDemo
@discussion Begin the demo without using an off screen bitmap
*/
void StartNoOffScreenDemo();
/*!
@function StopDemo
@discussion Stop animation
*/
void StopDemo();
private: // from CCoeControl
/*!
@function Draw
@discussion Draw this CGraphicsAppView to the screen
@param aRect the rectangle of this view that needs updating
*/
void Draw(const TRect& aRect) const;
private:
/*!
@function ConstructL
@discussion Perform the second phase construction of a CGraphicsAppView object
@param aRect the rectangle this view will be drawn to
*/
void ConstructL(const TRect& aRect);
/*!
@function CGraphicsAppView
@discussion Perform the first phase of two phase construction
*/
CGraphicsAppView();
/*!
@function DoPeriodTask
@discussion Called by period task static function
*/
void DoPeriodTask();
/*!
@function Period
@discussion Call back function for a periodic timer
@param aPtr a parameter passed to the timer when the timer is started
@result Returning a value of TRUE indicates the callback should be done again
*/
static TInt Period(TAny* aPtr);
/*!
@function UpdateDisplay
@discussion Perfom the drawing, does not activate the GC
*/
void UpdateDisplay() const;
/*!
@function SetUpSpritesL
@discussion Initialise the objects being drawn
*/
void SetUpSpritesL();
/*!
@function StartTimer
@discussion Start the timer
*/
void StartTimer();
private:
/*! @var iBackgroundImage the background bitmap */
CFbsBitmap* iBackgroundImage;
/*! @var iSpriteImage the "sprite" bitmap image */
CFbsBitmap* iSpriteImage;
/*! @var iSpriteMask the "sprite" bitblit mask */
CFbsBitmap* iSpriteMask;
/*! @var iOffScreenBitmap the off screen bitmap */
CFbsBitmap* iOffScreenBitmap;
/*! @var iOffScreenBitmapDevice the off screen bitmap device */
CFbsBitmapDevice* iOffScreenBitmapDevice;
/*! @var iOffScreenBitmapGc the off screen bitmap gc */
CFbsBitGc* iOffScreenBitmapGc;
/*! @var iPeriodicTimer the periodic timer used to control the animation */
CPeriodic* iPeriodicTimer;
/*! @var iUsingOffScreenBitmap the flag to keep track of whether or not the demo is
using an off screen bitmap */
TBool iUsingOffScreenBitmap;
/*! @var iSprites the array of sprites to be drawn */
CArrayPtrFlat<CSprite>* iSprites;
};
#endif // __GRAPHICSAPPVIEW_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -