82 lines
2.4 KiB
C++
82 lines
2.4 KiB
C++
// XText.h: interface for the XText class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_XTEXT_H__5F5444CC_CF22_4557_9FFC_2716D76B1100__INCLUDED_)
|
|
#define AFX_XTEXT_H__5F5444CC_CF22_4557_9FFC_2716D76B1100__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
/* g_AlignList[] = { XExplodeDraw::kTopLeft, XExplodeDraw::kTopCenter ,
|
|
XExplodeDraw::kTopRight, XExplodeDraw::kMiddleLeft ,
|
|
XExplodeDraw::kMiddleCenter, XExplodeDraw::kMiddleRight ,
|
|
XExplodeDraw::kBottomLeft, XExplodeDraw::kBottomCenter ,
|
|
XExplodeDraw::kBottomRight,};
|
|
*/
|
|
|
|
#include "DbText.h"
|
|
#include "EdJigEx.h"
|
|
/*
|
|
class TTextEdJig : public TSymbEdJig {
|
|
protected:
|
|
TDbText *m_pText;
|
|
AcDbText *m_pAcadText;
|
|
static XExplodeDraw::TextAlignment m_AlignList[];
|
|
|
|
public:
|
|
TTextEdJig(BOOL bIsTg, XPoint pt, double nHeight, const char*szText, AcDbObjectId idStyle, double nRotation);
|
|
~TTextEdJig();
|
|
virtual int DoIt(int *pKeyIndex=NULL);
|
|
DragStatus GetPoint(XPoint &pt);
|
|
BOOL m_bIsTgText;
|
|
XPoint m_ptRef;
|
|
AcGeMatrix3d m_AcadTextMat;
|
|
AcDbObjectId m_idStyle;
|
|
void SetWHScale(double nWHScale);
|
|
void SetAlign(AcDb::TextVertMode vertMode, AcDb::TextHorzMode horzMode, AcGeMatrix3d mat);
|
|
void SetAlign(XExplodeDraw::TextAlignment Align);
|
|
protected:
|
|
virtual Adesk::Boolean update();
|
|
virtual AcDbEntity* entity() const;
|
|
};
|
|
|
|
*/
|
|
class TELAPI XText
|
|
{
|
|
public:
|
|
XText();
|
|
XText(Entity ent, BOOL bNew = FALSE);
|
|
XText(const TCHAR* szText, XPoint ptPosition, double nHeight, double nScale = 1, CString csTextStyle = _T("_TCH_DIM"), CString csLayer =_T("SIG_TEXT"));
|
|
virtual ~XText();
|
|
AcDbText* m_pText;
|
|
TDbText *m_pTgText;
|
|
|
|
|
|
void Draw(AcDb::TextVertMode vVerMode = AcDb::kTextBase,
|
|
AcDb::TextHorzMode nHorzMode = AcDb::kTextLeft);
|
|
void TgDraw(XExplodeDraw::TextAlignment Align = XExplodeDraw::kMiddleLeft);
|
|
|
|
double GetEntTextLength();
|
|
void SetWHScale(double nScale){m_nScale = nScale;};
|
|
void SetRotate(double nRotate);
|
|
void SetInsertPoint(XPoint ptIns);
|
|
void SetText(const TCHAR* szText);
|
|
void SetHeight(double nHeight);
|
|
|
|
double m_nTextLength;
|
|
AcDb::TextVertMode m_vertMode;
|
|
AcDb::TextHorzMode m_horzMode;
|
|
XExplodeDraw::TextAlignment m_Align;
|
|
CString m_csLayer, m_csText;
|
|
XPoint m_ptInsert, m_ptAlign;
|
|
double m_nScale;
|
|
double m_nHeight;
|
|
double m_nRotate;
|
|
AcDbObjectId m_idStyle;
|
|
|
|
};
|
|
|
|
#endif // !defined(AFX_XTEXT_H__5F5444CC_CF22_4557_9FFC_2716D76B1100__INCLUDED_)
|