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

📄 findthebombappview.h

📁 symbian手机应用开发
💻 H
字号:
// Copyright (c) 2004, Symbian Software Ltd. All rights reserved.

#ifndef __FINDTHEBOMB_APPVIEW_H__
#define __FINDTHEBOMB_APPVIEW_H__

#include <coecntrl.h>
#include <coedef.h>
#include <eikenv.h>

class CFindTheBombAppView;
class MFindTheBombGameControl;

class CFindTheBombTile : public CCoeControl
    {
public:
    CFindTheBombTile();
    ~CFindTheBombTile();
    void ConstructL(RWindow& aWindow);

public: // New function
    void SetOwnerAndObserver(CFindTheBombAppView* aControl);

public: // From CCoeControl
    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
	TCoeInputCapabilities InputCapabilities() const;

public:
    void Draw(const TRect& aRect) const;
    
public: // New function
    void TryHitL();
    
protected:
    void FocusChanged(TDrawNow aDrawNow);
    void HandlePointerEventL(const TPointerEvent& aPointerEvent);

private:
    CFindTheBombAppView* iAppView; // Pointer to the owning view
public:
		TInt abcde;
	};


class CFindTheBombAppView : public CCoeControl, public MCoeControlObserver
    {
public:
    CFindTheBombAppView();
    ~CFindTheBombAppView();
    void ConstructL(const TRect& aRect, MFindTheBombGameControl* aGameControl);
    
public: // From CCoeControl
    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);

public:
    TInt IdOfFocusControl();
    void MoveFocusTo(const TInt aIndex);
    void ResetView();
    TBool TryHitSquareL(const CFindTheBombTile* aControl);
    TInt SquareStatus(const CFindTheBombTile* aControl);

private:
    void SwitchFocus(TInt aFromIndex, CCoeControl* aToControl);
    void DrawComps(TRect& aRect) const;
    CFindTheBombTile * CreateTileL();

private: // From CCoeControl
    void Draw(const TRect& aRect) const;
    TInt CountComponentControls() const;
    CCoeControl* ComponentControl(TInt aIndex) const;
    void SizeChanged();

	
    
private: // From MCoeControlObserver
    void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);

private:
    TRect iBoardRect;  // Board area
    TRect iBorderRect; // Bounding rectangle for border
    TInt iTileSide;    // allowing for line widths and border
    RPointerArray<CFindTheBombTile> iTiles; // View owns the tiles
    MFindTheBombGameControl* iGameControl;  // View does not own the game control
private:
//	CFbsBitmap* iSpriteImage;  
	};

#endif // __FINDTHEBOMB_APPVIEW_H__

⌨️ 快捷键说明

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