oandxappui.h

来自「Symbian OS C++ 手机应用开发(第一卷)部分事例代码」· C头文件 代码 · 共 68 行

H
68
字号
// Copyright (c) 2004, Symbian Software Ltd. All rights reserved.

#ifndef __OANDX_APPUI_H__
#define __OANDX_APPUI_H__

#include <aknappui.h>
#include <eikmenup.h>
#include <eikmenub.h>
#include <aknnavi.h>
#include <aknnavide.h>

class COandXAppView;

class MOandXGameControl
    {
public:
    virtual TBool HitSquareL(TInt aIndex)=0;
    virtual TInt SquareStatus(TInt aIndex)=0;
    };

class COandXAppUi : public CAknAppUi, public MOandXGameControl
    {
public:
    COandXAppUi();
    ~COandXAppUi();
    void ConstructL();

private: // Implementation
    void SetWinLineL(TInt aTile0, TInt aTile1, TInt aTile2);

public: // From CAknAppUi
    void HandleCommandL(TInt aCommand);

public: // From MEikMenuObserver
    void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);

public: // New functions
    TBool IsCrossTurn();
    TInt GameWonBy();

public: // From CEikAppUi, for permanent data
    TStreamId StoreL(CStreamStore& aStore) const;
    void RestoreL(const CStreamStore& aStore, TStreamId aStreamId);
    void ExternalizeL(RWriteStream& aStream) const;
    void InternalizeL(RReadStream& aStream);

private:
    void SetNavigationPaneL(TBool aBool);
    void SwitchTurnL();

private: // From MOandXGameControl
    TBool HitSquareL(TInt aIndex);
    TInt SquareStatus(TInt aIndex);

private:
    COandXAppView* iAppView; // AppUi owns the application view
    TInt iGameStatus;
    TBool iCrossTurn;
    RArray<TInt> iTileState;
    RArray<TInt> iWinLines;
    CAknNavigationControlContainer* iNaviPane; // Not owned by the AppUi
    CAknNavigationDecorator* iNaviDecorator;   // Owned by the AppUi
    };


#endif // __OANDX_APPUI_H__

⌨️ 快捷键说明

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