📄 gouyuappview.h
字号:
/* Copyright (c) 2003, Nokia. All rights reserved */
#ifndef __GouYu_APPVIEW_H__
#define __GouYu_APPVIEW_H__
#include <coecntrl.h>
#include <eiklabel.h> // for example label control
#include <coecntrl.h>
#include <e32std.h>
#include <fbs.h>
#include <bitdev.h>
#include <bitstd.h>
#include "GouYuEngine.h"
#include "BluetoothEngine.h"
class CEikLabel;
class CBluetoothEngine;
//class CGouYuAppView;
class CFbsBitmap;
class CFbsBitmapDevice;
class CFbsBitGc;
/*!
@class CGouYuAppView
@discussion An instance of CGouYuAppView is the Application View object
for the GouYu example application
*/
class CGouYuAppView :public CCoeControl, MCoeControlObserver
{
public:
/*!
@function NewL
@discussion Create a CGouYuAppView object, which will draw itself to aRect
@param aRect The rectangle this view will be drawn to
@result A pointer to the created instance of CGouYuAppView
*/
static CGouYuAppView* NewL(const TRect& aRect);
/*!
@function NewLC
@discussion Create a CGouYuAppView object, which will draw itself to aRect
@param aRect The rectangle this view will be drawn to
@result A pointer to the created instance of CGouYuAppView
*/
static CGouYuAppView* NewLC(const TRect& aRect);
/*!
@function ~CGouYuAppView
@discussion Destroy the object
*/
~CGouYuAppView();
public: // from CCoeControl
/*!
@function Draw
@discussion Draw this CGouYuAppView to the screen
@param aRect The rectangle of this view that needs updating
*/
void SizeChanged();
TInt CountComponentControls() const;
CCoeControl* ComponentControl(TInt aIndex) const;
void NewRound();
CFbsBitmap * iDesk;
CFbsBitmap * iCard;
CFbsBitmap * iBack;
TBool iGameStart;
// RArray<TInt> table_cards;
//双缓冲相关
CFbsBitmap* iOffScrnBmp;
CFbsBitmapDevice* iOffScrnBmpDevice;
CFbsBitGc* iOffScrnContext;
void DrawMove() const;
void UpdateDisplay() const;
//按键触控函数
void MoveLeft() const;
void MoveRight() const;
void SelectCard() const;
void CancelSelectCards() const;
void Dofish() const;
void Giveup() const;
void Fishing() const;
public:
void ShowMessageL(const TDesC& /* aMsg */);
CGouYuAppView();
void ConstructL(const TRect& aRect);
///////////////////////////////////////////////////////////////////////////
//UpdateDisplay1(),UpdateDisplay2(),DrawPlayer1(),DrawPlayer2()是用来分屏的,暂无用
/////////////////////////////////////////////////////////////////////////////
// void UpdateDisplay1() const;
// void UpdateDisplay2() const;
// void DrawPlayer1() const;
// void DrawPlayer2() const;
// TInt iclear ;
// TInt flp1;
// TInt flp2;
//控制按钮变量
TInt isfish;
TInt is_f_s;
TInt ctr_2;
TInt ct1;
TInt is_f ;
private:
void Draw(const TRect& aRect) const;
void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
CBluetoothEngine* iEngine;
CEikLabel* iLabel;
/*!
@function ConstructL
@discussion Perform the second phase construction of a CGouYuAppView object
@param aRect The rectangle this view will be drawn to
*/
/*!
@function CGouYuAppView
@discussion Perform the first phase of two phase construction
*/
public:
CEngine * iAppEngine;
};
#endif // __GouYu_APPVIEW_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -