79 lines
1.6 KiB
C++
79 lines
1.6 KiB
C++
//-----------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TSubText.h
|
|
// = Version : ver2.0
|
|
// = Author : xlc
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: 上华字段类的声明
|
|
// = Maintainers:
|
|
//
|
|
//-----------------------------------------------------------------------------+
|
|
#ifndef _TSUBTEXT_H_
|
|
#define _TSUBTEXT_H_
|
|
|
|
#ifndef _TADSGEPOINT3D_H_
|
|
#include "TADSGePoint3d.h"
|
|
#endif
|
|
|
|
class TEntityBase;
|
|
|
|
// 字段类
|
|
class GEOAPI TSubText
|
|
{
|
|
public:
|
|
|
|
TSubText(AcDbObjectId id,AcDbEntity*pTextEnt,long iText,bool bAcadEntity = false);
|
|
|
|
virtual ~TSubText();
|
|
|
|
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(TADSGePoint3d&ptMin,TADSGePoint3d&ptMax)const;
|
|
|
|
AcDbObjectId GetObjectId()const;
|
|
|
|
CString GetText()const;
|
|
|
|
const AcDbEntity* GetTextEntity()const;
|
|
|
|
//无法移动时返回NULL
|
|
TSubText* GetNext(bool bVert,bool bPre)const;
|
|
|
|
TEntityBase* 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;
|
|
};
|
|
|
|
#endif |