📄 resman.h
字号:
// resman.h
//
// Copyright (c) 1999-2007 Symbian Software Ltd. All rights reserved.
//
// $Change: 937687 $
#ifndef RESMAN_H
#define RESMAN_H
#include <coecntrl.h>
#include <coeccntx.h>
#include <eikappui.h>
#include <eikapp.h>
#include <eikdoc.h>
class CResModel
{
public:
enum TMood {EHappy, ENeutral, ESad};
public:
TMood iMood;
TBool iEyesBig;
public:
void ConstructL();
};
// class CResControl
class CResDocument;
class CResControl : public CCoeControl
{
public:
// construct/destruct
CResControl(CResDocument* aDoc);
void ConstructL(const CCoeControl* aParent, const TRect& aRect);
~CResControl();
private: // framework
virtual void Draw(const TRect& /* aRect */) const;
private: // data
CResDocument* iDoc;
TBuf<25> iFormat;
};
// class CResAppView
class CResAppView : public CCoeControl, public MCoeControlContext
{
public:
void ConstructL(const TRect& aRect, CResDocument* aDoc);
~CResAppView();
// changing view
void ConstructViewL();
private: // from CCoeControl
void Draw(const TRect& /*aRect*/) const;
TInt CountComponentControls() const;
CCoeControl* ComponentControl(TInt aIndex) const;
private: // data
CWindowGc::TBrushStyle iBrushStyle;
TRgb iBrushColor;
CResDocument* iDoc; // document we're working with
CResControl* iControl; // control
};
// CResAppUi
class CResDocument;
class CMySimpleClass;
class CMyCompoundClass;
class CMyCompoundSymbianOSClass;
class CResAppUi : public CEikAppUi
{
public:
void ConstructL();
~CResAppUi();
private: // from CEikAppUi
void HandleCommandL(TInt aCommand);
#if !FILE_BASED
TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC& aTail);
#endif
private:
void Cmd1PressedL();
void Cmd2PressedL();
void Cmd3PressedL();
void Cmd4PressedL();
private:
CResAppView* iAppView;
CResDocument* iDoc;
private:
CMySimpleClass* iLeak;
CMySimpleClass* iSimple;
CMyCompoundClass* iCompound;
CMyCompoundSymbianOSClass* i2Phase;
};
// CResDocument
class CResDocument : public CEikDocument
{
public:
~CResDocument();
static CResDocument* NewL(CEikApplication& aApp);
private:
void ConstructL();
CResDocument(CEikApplication& aApp);
private: // from CEikDocument
CEikAppUi* CreateAppUiL();
#if !FILE_BASED
CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFilename, RFs& aFs); // we're not file-based!
#endif
public:
CResModel* iModel;
};
// CResApplication
class CResApplication : public CEikApplication
{
private: // from CApaApplication
CApaDocument* CreateDocumentL();
TUid AppDllUid() const;
};
#endif // RESMAN_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -