triangle.h
来自「国内著名嵌入式培训机构内部资料,内含一些实例代码,包括技术专题书籍」· C头文件 代码 · 共 78 行
H
78 行
/*
* ============================================================================
* Name : CTriangle from square.h
* Part of : plugin
* Created : 17/11/2003 by Forum Nokia
* Description:
* Implements the drawing of a triangle
* Version : 1.0
* Copyright: Forum Nokia
* ============================================================================
*/
#ifndef __TRIANGLE_H__
#define __TRIANGLE_H__
// INCLUDES
#include <shapeinterface.h>
/**
* Class: CTriangle
*
* Description: An implementation of the CShape definition. Displays a triangle
* shape to screen. This is concrete class, instance of which
* ECOM framework gives to ECOM clients.
*/
class CTriangle : public CShape
{
public:
/**
* Function: NewL
*
* Description: Create instance of concrete implementation. Note that ECOM
* interface implementations can only have two signatures for
* NewL:
* - NewL without parameters (used here)
* - NewL with TAny* pointer, which may provide some client
* data
*
* Returns: Instance of this class.
*
* Note: The interface, which is abstract base class of this
* implementation, also provides NewL method. Normally abstract
* classes do not provide NewL, because they cannot create
* instances of themselves.
*/
static CTriangle* NewL();
public: // CShape
/**
* Function: ConstructL
*
* Description: Draws shape of object
*
* Param: aGraphicsContext graphics context to display result
*/
virtual void Draw(CWindowGc& aGraphicsContext) const;
protected:
/**
* Function: CTriangle
*
* Discussion: Perform the first phase of two phase construction
*/
CTriangle();
/**
* Function: ConstructL
*
* Discussion: Perform the second phase construction of a
* CImplementationClassPlus object.
*/
void ConstructL();
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?