63 lines
1.1 KiB
C++
63 lines
1.1 KiB
C++
#pragma once
|
|
#include "ADSGePoint3d.h"
|
|
class BaseEx;
|
|
|
|
// 字段类
|
|
class SubText
|
|
{
|
|
public:
|
|
|
|
SubText(AcDbObjectId id,AcDbEntity*pTextEnt,long iText,bool bAcadEntity = false);
|
|
|
|
virtual ~SubText();
|
|
|
|
int GetMenuType()const;
|
|
|
|
long GetIndex()const;
|
|
|
|
bool IsMultiLine()const;
|
|
|
|
bool IsAcadEntity()const;
|
|
|
|
void Update(CString sText);
|
|
|
|
void SetText(CString sText);
|
|
|
|
void SetIndex(long i);
|
|
|
|
void SetObjectId(AcDbObjectId id);
|
|
|
|
void SetMenuType(int type);
|
|
|
|
void SetMultiLine(bool bML = true);
|
|
|
|
void Highlight(bool bHL = true)const;
|
|
|
|
void GetExtent2d(ADSGePoint3d&ptMin,ADSGePoint3d&ptMax)const;
|
|
|
|
AcDbObjectId GetObjectId()const;
|
|
|
|
CString GetText()const;
|
|
|
|
const AcDbEntity* GetTextEntity()const;
|
|
|
|
//无法移动时返回NULL
|
|
SubText* GetNext(bool bVert,bool bPre)const;
|
|
|
|
BaseEx* OpenEntityBase(bool bWrite = false)const;
|
|
|
|
protected:
|
|
|
|
long m_iText;
|
|
|
|
int m_iFlag;
|
|
|
|
//0,ACAD文字,1,上华文字,2,轴号文字,3,ACAD单行文字在位编辑,4,门窗,5,表格,6,上华标注
|
|
int m_iMenuType;
|
|
|
|
AcDbObjectId m_idEnt;
|
|
|
|
//临时克隆对象,自动析构
|
|
AcDbEntity *m_pTextEnt;
|
|
};
|