#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 m_arHorBoundaryPtrs; std::vector m_arVerBoundaryPtrs; std::vector m_arTitle; TCHAR m_szKeyText[512]; AcDbVoidPtrArray m_arEntPtrs; };