haneaseengine.h
来自「三字经输入法源码」· C头文件 代码 · 共 111 行
H
111 行
#ifndef HANEASEENGINE_H
#define HANEASEENGINE_H
// INCLUDES
#include <e32base.h>
#include <e32std.h>
#include <coedef.h>
// Forward declarations
class CHaneaseFepControl;
class CHaneaseTimer;
class MTimerNotifier
{
public:
virtual void OnTimer() = 0;
};
class CHaneaseEngine : public CBase, MTimerNotifier
{
public:
CHaneaseEngine(CHaneaseFepControl& aControl, TDes16& aInput, CArrayFix<TUint> &aCand, CArrayFix<TUint> &aOutput);
~CHaneaseEngine();
// Static construction
static CHaneaseEngine* NewL (CHaneaseFepControl& aControl, TDes16& aInput, CArrayFix<TUint> &aCand, CArrayFix<TUint> &aOutput);
// Second phase construction
void ConstructL();
void AppenChar(TInt aKeyCode);
void ChangeLastChar(TInt aKeyCode);
TKeyResponse DelChar();
void CommitCand();
void PrePage();
void NextPage();
void PreCand();
void NextCand();
void MakeCandArray();
void MakeCand();
TKeyResponse OnKey(TInt aKeyCode);
void OnTimer();
private:
CHaneaseFepControl& iFepControl; // not owned
TDes16& iInput;
CArrayFix<TUint> &iCand;
CArrayFix<TUint> &iOutput;
CHaneaseTimer *iTimer;
TInt iPrekey;
TInt iKeyPos;
TInt iStart;
TInt iEnd;
TInt iCur;
};
class CMultiTapEngine : public CBase, MTimerNotifier
{
public:
CMultiTapEngine(CHaneaseFepControl& aControl, TDes16& aInput, CArrayFix<TUint> &aCand, CArrayFix<TUint> &aOutput);
~CMultiTapEngine();
// Static construction
static CMultiTapEngine* NewL (CHaneaseFepControl& aControl, TDes16& aInput, CArrayFix<TUint> &aCand, CArrayFix<TUint> &aOutput);
// Second phase construction
void ConstructL();
TKeyResponse OnKey(TInt aKeyCode);
void CommitInput();
void OnTimer();
private:
CHaneaseFepControl& iFepControl; // not owned
TDes16& iInput;
CArrayFix<TUint> &iCand;
CArrayFix<TUint> &iOutput;
CHaneaseTimer *iTimer;
TInt iPrekey;
TInt iKeyPos;
};
class CHaneaseTimer : public CTimer
{
public:
CHaneaseTimer();
void ConstructL(MTimerNotifier *aEngine);
void RunL();
void Restart();
private:
MTimerNotifier *iEngine;
};
#endif // HANEASEENGINE_H
// end of file
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?