rectangle.h

来自「最新官方例子,图形,描述副,基本控件,通讯协议,等等,」· C头文件 代码 · 共 48 行

H
48
字号
#ifndef __RECTANGLE_H__
#define __RECTANGLE_H__

//INCLUDES

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

//User Includes
#include "shape.h"

namespace NShapes 
	{
	/**
	*
	* @class	TRectangle Rectangle.h 
	* @brief	This class retains the dimensions and coordinates
	* that define an instance of a rectangle, and help to internalize and
	* externalize the representation.
	*
	* Copyright (c) EMCC Software Ltd 2003
	* @version	1.0 
	*/
	class TRectangle : public TShape
		{
	public:
		IMPORT_C TRectangle(const TPoint& aOrigin, TInt aWidth, TInt aHeight);
		IMPORT_C TRectangle();

	public:	//	From TShape
		IMPORT_C void Draw(CWindowGc& aActiveGraphicsContext) const;
		IMPORT_C TRect GetRect() const;
		IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
		IMPORT_C void InternalizeL(RReadStream& aStream);
		IMPORT_C virtual TShapeType ShapeType();
		IMPORT_C virtual TInt StorageSize() const;

	private:
		TInt iWidth;
		TInt iHeight;
		};
	}

#endif	//	__RECTANGLE_H__

//End of File

⌨️ 快捷键说明

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