119 lines
4.2 KiB
C++
119 lines
4.2 KiB
C++
#ifndef __DBIDDOT_H
|
|
#define __DBIDDOT_H
|
|
#include "DbIDEntity.h"
|
|
|
|
/*============================================================================*
|
|
* Copyright(c), 1994-2007, Beijing Tangent Engineering Software Co.Ltd.
|
|
* 文 件 名: DbIDDot.h
|
|
* 版 本: 1.0
|
|
* 作 者: lzh
|
|
* 创建时间: 2007-12-19
|
|
* 描 述: 焓湿图状态点
|
|
* 归属项目: 暖通
|
|
* 历史记录:
|
|
=============================================================================*/
|
|
|
|
class PS_EXP TDbIDDot : public TDbEntity
|
|
{
|
|
DECLARE_TENTBASE();
|
|
ACRX_DECLARE_MEMBERS(TDbIDDot);
|
|
private:
|
|
static const Adesk::UInt8 g_nVersion;
|
|
public:
|
|
TDbIDDot();
|
|
~TDbIDDot();
|
|
protected:
|
|
AcDbHandle m_IDHandle; //所属焓湿图
|
|
XPoint m_DotPt; //空气状态点
|
|
double m_dbDotSize;//状态点尺寸
|
|
XString m_szDotName; //状态点名称
|
|
XPoint m_LabelPt;//引出标注点
|
|
BOOL m_bDrawLabel;//是否引出标注
|
|
enum LABEL_DIRECTION
|
|
{
|
|
dUnDraw=0, //不绘制
|
|
|
|
dTopLeft=1, //左上
|
|
dTopRight=2, //右上
|
|
dBottomLeft=3, //左下
|
|
dBottomRight=4, //右下
|
|
|
|
dLeft=5, //左
|
|
dRight=6, //右
|
|
dTop = 7,
|
|
dBottom = 8
|
|
};
|
|
Adesk::UInt32 m_nLabelDirection; //名称文字标注方向
|
|
AcDbHardPointerId m_IdLabelStyle;
|
|
public:
|
|
//设置状态点所属焓湿图
|
|
void SetDbIDEntity(AcDbHandle IDHandle);
|
|
//设置状态点位置---通过点位置
|
|
void SetDotPt(AcGePoint3d pt);
|
|
//设置状态点位置---通过状态点
|
|
void SetDot(CAirState As);
|
|
//获得状态点参数
|
|
CAirState GetDot()const;
|
|
//判断状态点参数是否合理
|
|
BOOL IsRightAirStateDot()const{if(GetIDEntity() == NULL) return FALSE;return GetIDEntity()->IsRightAirStateDot(m_DotPt);};
|
|
//获得状态点名称
|
|
XString GetDotName(){return m_szDotName;};
|
|
//设置状态点名称
|
|
void SetDotName(CString szName){m_szDotName = szName; recordGraphicsModified();};
|
|
//获得名称标注方向
|
|
int GetNameLabelDirection(){return m_nLabelDirection;};
|
|
//设置名称标注方向
|
|
void SetNameLabelDirection(int nDirection){m_nLabelDirection = nDirection;recordGraphicsModified();};
|
|
|
|
void SetLabelPoint(XPoint pt);
|
|
XPoint GetLabelPoint(){return m_LabelPt;};
|
|
BOOL GetIsLabel(){return m_bDrawLabel;};
|
|
void SetIsLabel(BOOL bIsDrawlabel){m_bDrawLabel = bIsDrawlabel;recordGraphicsModified(); recordGraphicsModified();};
|
|
|
|
TDbIDEntity* GetIDEntity()const;
|
|
|
|
XPoint GetDotPt(){return m_DotPt;};
|
|
AcDbHandle GetIdHandle(){return m_IDHandle;};
|
|
void GetIdNewHandle()const;
|
|
void GetIDEntAr(AcDbObjectIdArray & IdAr)const;
|
|
void SetTextStyleObjectId(AcDbObjectId Id){m_IdLabelStyle = Id;};
|
|
|
|
private:
|
|
void DrawText(XExplodeDraw& dc,XPoint pt,int nDirection,XString szName)const;
|
|
void DrawLabelText(XExplodeDraw& dc)const;
|
|
|
|
public: // Override TDbEntity
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrc, unsigned gMatchFlag);
|
|
virtual void GetTips(DList<TObjInfoUnit> &) const; //取动态属性显示数据
|
|
virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;
|
|
|
|
virtual Acad::ErrorStatus ExplodeOrDraw2d(XExplodeDraw &dc) const;
|
|
virtual Acad::ErrorStatus ExplodeOrDraw3d(XExplodeDraw &dc) const{return ExplodeOrDraw2d(dc);};
|
|
|
|
virtual int GetFirstVersion() const { return 7; }
|
|
|
|
public: // Override AcDbEntity
|
|
virtual void subList() const;
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
virtual Acad::ErrorStatus subMoveStretchPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
|
|
virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode,
|
|
INT_PTR gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;
|
|
virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* pFiler);
|
|
virtual Acad::ErrorStatus GetGripText(int idx, CString &cs) const;
|
|
};
|
|
|
|
#endif // !defined(AFX_DBIDDOT_H__42AA07BD_E9FB_4E61_A974_408D31A7D7EC__INCLUDED_)
|