📄 active1.h
字号:
// Active1.h
//
// Copyright (c) 1999-2007 Symbian Software Ltd. All rights reserved.
//
// $Change: 937687 $
//
// Active1 exercise
#ifndef ACTIVE1_H
#define ACTIVE1_H
// PROJECT HEADERS
#include "eustd.h"
// panics
enum
{
EPanicAlreadyActive = 1000,
};
//////////////////////////////////////////////////////////////////////////////
//
// -----> CExampleScheduler (definition)
//
//////////////////////////////////////////////////////////////////////////////
class CExampleScheduler : public CActiveScheduler
{
public:
void Error (TInt aError) const;
};
//////////////////////////////////////////////////////////////////////////////
//
// -----> CActiveConsole (definition)
//
// An abstract class which provides the facility to issue key requests.
//
//////////////////////////////////////////////////////////////////////////////
class CActiveConsole : public CActive
{
public:
// Construction
CActiveConsole(CConsoleBase* aConsole);
// Destruction
~CActiveConsole();
// Issue request
void RequestCharacter();
// Cancel request.
// Defined as pure virtual by CActive;
// implementation provided by this class.
void DoCancel();
// Service completed request.
// Defined as pure virtual by CActive;
// implementation provided by this class,
void RunL();
// Called from RunL() - an implementation must be provided
// by derived classes to handle the completed request
virtual void ProcessKeyPress(TChar aChar) = 0;
public:
void ConstructL();
protected:
// Data members defined by this class
CConsoleBase* iConsole; // A console for reading from
};
//////////////////////////////////////////////////////////////////////////////
//
// -----> CWriteKeyProcessor (definition)
//
// This class is derived from CActiveConsole.
// Request handling: accepts input from the keyboard and outputs it
// to the console.
//
//////////////////////////////////////////////////////////////////////////////
class CWriteKeyProcessor : public CActiveConsole
{
public:
// Construction
CWriteKeyProcessor(CConsoleBase* aConsole);
public:
// Static constuction
static CWriteKeyProcessor *NewLC(CConsoleBase* aConsole);
static CWriteKeyProcessor *NewL(CConsoleBase* aConsole);
public:
// Service request
void ProcessKeyPress(TChar aChar);
};
#endif ACTIVE1_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -