Files
envi-code/SourceCode/Code2026/inc/UIITable.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

82 lines
1.6 KiB
C++

#pragma once
#ifdef EARTHWORM_EXPORT
#define DLLIMPEXP __declspec(dllexport)
#else
#define DLLIMPEXP __declspec(dllimport)
#endif
typedef struct CUIICell
{
AcGePoint3d ptGe[4];//单元格四个点
}CUIICELL;
typedef struct CUIITitle
{
AcGePoint3d ptPos; //文字左小角点
double dH; //高度
double dWFactor; //宽度系数
TCHAR szStyle[65]; //文字样式
TCHAR szTitle[127];//标题文字
}CUIITITLE;
typedef struct CUIITitleA
{
AcGePoint3d ptPos; //文字左小角点
double dH; //高度
double dWFactor; //宽度系数
char szStyle[33]; //文字样式
char szTitle[127];//标题文字
}CUIITITLEA;
class CUIIBorderLine;
class CUIIBoundary;
class DLLIMPEXP CUIITable
{
public:
CUIITable(void);
~CUIITable(void);
bool Add(CUIIBorderLine& bLine);
bool Add(AcGePoint3d& ptSta,AcGePoint3d& ptEnd);
void AddTitle(CUIITitle& title);
void SetKeyText(LPCTSTR pszKeyText);
void GetKeyText(CString& sKeyText);
bool CloseRect();
void GetRect(AcDbExtents& ext);
void Draw(CDC* pDC);
//根据文字,获取单元格 如 设 计 等
bool GetCell(AcGePoint3d& ptPos,CUIICell& cell);
void Sort(int nDir);
void TransformBy(AcGeMatrix3d& xform);
//测试
void ShowToModelSpace(AcDbDatabase* pDb = NULL,AcGeMatrix3d* pMatrix = NULL);
void ShowInGsView(AcGsView* pview,AcGsModel* pModel);
bool Save(LPCTSTR pszFullFile);
bool Read(LPCTSTR pszFullFile);
void HitCell(AcGePoint3d& ptGe,CUIICell& cell);
protected:
std::vector<CUIIBoundary*> m_arHorBoundaryPtrs;
std::vector<CUIIBoundary*> m_arVerBoundaryPtrs;
std::vector<CUIITitle> m_arTitle;
TCHAR m_szKeyText[512];
AcDbVoidPtrArray m_arEntPtrs;
};