shape.h

来自「s60源码」· C头文件 代码 · 共 49 行

H
49
字号
#ifndef __SHAPE_H__
#define __SHAPE_H__

//INCLUDES

//System Includes
#include <e32std.h>
#include <w32std.h>

namespace NShapes 
	{
	enum TShapeType
		{
		KRectangle = 1,
		KCircle
		};

	/**
	*
	* @class	TShape Shape.h 
	* @brief	This is the abstract base class that defines the
	* functions that all concrete shape classes require.
	*
	* Copyright (c) EMCC Software Ltd 2003
	* @version	1.0 
	*/
	class TShape 
		{
	public:
		IMPORT_C TShape (TShapeType aShapeType, const TPoint& aOrigin);
		virtual void Draw(CWindowGc& aActiveGraphicsContext) const = 0;
		virtual TRect GetRect() const = 0;
		IMPORT_C static TShapeType ReadShapeTypeL(RReadStream& aStream);
		IMPORT_C virtual void ExternalizeL(RWriteStream& aStream) const;
		IMPORT_C virtual void InternalizeL(RReadStream& aStream);
		IMPORT_C virtual TShapeType ShapeType() = 0;
		IMPORT_C virtual TInt StorageSize() const;
		IMPORT_C TPoint Coordinates(); 

	protected:
		const TShapeType iShapeType;
		TPoint iOrigin;
		};
	}

#endif	//	__SHAPE_H__

// End of File

⌨️ 快捷键说明

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