Files
envi-code/SourceCode/Code2026/inc/UIITable.h
T

81 lines
1.6 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#pragma once
2026-09-28 15:28:50 +08:00
#ifdef EARTHWORM_EXPORT
#define DLLIMPEXP __declspec(dllexport)
#else
#define DLLIMPEXP __declspec(dllimport)
#endif
typedef struct CUIICell
{
2026-10-04 00:04:20 +08:00
AcGePoint3d ptGe[4];//单元格四个点
2026-09-28 15:28:50 +08:00
}CUIICELL;
typedef struct CUIITitle
{
2026-10-04 00:04:20 +08:00
AcGePoint3d ptPos; //文字左小角点
double dH; //高度
double dWFactor; //宽度系数
TCHAR szStyle[65]; //文字样式
TCHAR szTitle[127];//标题文字
2026-09-28 15:28:50 +08:00
}CUIITITLE;
typedef struct CUIITitleA
{
2026-10-04 00:04:20 +08:00
AcGePoint3d ptPos; //文字左小角点
double dH; //高度
double dWFactor; //宽度系数
char szStyle[33]; //文字样式
char szTitle[127];//标题文字
2026-09-28 15:28:50 +08:00
}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);
2026-10-04 00:04:20 +08:00
//根据文字,获取单元格 如 设 计 等
2026-09-28 15:28:50 +08:00
bool GetCell(AcGePoint3d& ptPos,CUIICell& cell);
void Sort(int nDir);
void TransformBy(AcGeMatrix3d& xform);
2026-10-04 00:04:20 +08:00
//测试
2026-09-28 15:28:50 +08:00
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;
};