📄 graphicsshell.h
字号:
// GraphicsShell.h
//
#ifndef __GraphicsShell_H
#define __GraphicsShell_H
#include <coecntrl.h>
#include <coeccntx.h>
#include <eikappui.h>
#include <eikapp.h>
#include <eikdoc.h>
#include "GraphicsControl.h"
// UID of app
const TUid KUidExampleShellApp={ 0x10004289 };
//
// TExampleShellModel
//
class TExampleShellModel
{
public:
TExampleShellModel();
TBool Differs(const TExampleShellModel* aCompare) const;
public:
TFileName iLibrary; // active control
};
//
// class CExampleShellContainer
//
class CExampleShellContainer : public CCoeControl,
public MCoeControlBrushContext,
public MGraphicsExampleObserver
{
public:
void ConstructL(const TRect& aRect, TExampleShellModel* aModel);
~CExampleShellContainer();
// changing view
void ResetExampleL(CGraphicExampleControl* aExample);
private: // from CCoeControl
void Draw(const TRect& /*aRect*/) const;
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
TInt CountComponentControls() const;
CCoeControl* ComponentControl(TInt aIndex) const;
private: // from MGraphicsExampleObserver
void NotifyGraphicExampleFinished();
public: // also from MGraphicsExampleObserver
void NotifyStatus(const TDesC& aMessage);
private: // new function
void CreateLabelL();
private: // data
CGraphicExampleControl* iExampleControl; // example control
CEikLabel* iLabel; // label for status messages
// irrelevant
TExampleShellModel* iModel;
};
//
// CExampleShellDocument
//
class CExampleShellDocument : public CEikDocument
{
public:
CExampleShellDocument(CEikApplication& aApp): CEikDocument(aApp) { }
TExampleShellModel* Model() { return(&iModel); }
private: // from CEikDocument
CEikAppUi* CreateAppUiL();
private:
TExampleShellModel iModel;
};
//
// CExampleShellAppUi
//
class CExampleShellAppUi : public CEikAppUi
{
public:
void ConstructL();
~CExampleShellAppUi();
private: // from CEikAppUi
void HandleCommandL(TInt aCommand);
private: // internal use
// void PrepareToolbarButtons();
private:
CExampleShellContainer* iContainer;
TExampleShellModel* iModel;
};
//
// CExampleShellApplication
//
class CExampleShellApplication : public CEikApplication
{
private: // from CApaApplication
CApaDocument* CreateDocumentL();
TUid AppDllUid() const;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -