59 lines
1.4 KiB
C++
59 lines
1.4 KiB
C++
// TLeaderAddOtherPtJig.cpp: implementation of the CTLeaderAddOtherPtJig class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#include "stdafx.h"
|
|
#include "TLeaderAddOtherPtJig.h"
|
|
|
|
#ifdef _DEBUG
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[]=__FILE__;
|
|
#define new DEBUG_NEW
|
|
#endif
|
|
|
|
TLeaderAddOtherPtJig::TLeaderAddOtherPtJig(CLeaderTextDlg *pDlg, XPoint ptStart, XPoint ptBase)
|
|
:m_pDlg(pDlg)
|
|
{
|
|
m_bUpdateDlg = TRUE;
|
|
m_ptLeader = ptBase.AsAcGePoint3d();
|
|
m_ptFirstVertexes = ptStart.AsAcGePoint3d();
|
|
m_line.setStartPoint(m_ptLeader);
|
|
}
|
|
|
|
TLeaderAddOtherPtJig::TLeaderAddOtherPtJig(BOOL bAllPtsOnLine, XPoint ptStart, XPoint ptBase,double dLayoutRotation,BOOL b)
|
|
{
|
|
m_bUpdateDlg = FALSE;
|
|
m_ptLeader = ptBase.AsAcGePoint3d();
|
|
m_ptFirstVertexes = ptStart.AsAcGePoint3d();
|
|
m_line.setStartPoint(m_ptLeader);
|
|
m_nLayoutRotation = dLayoutRotation;
|
|
m_bLeaderParall = b;
|
|
}
|
|
// 开始执行拖动
|
|
int TLeaderAddOtherPtJig::DoIt(int *keyIndex)
|
|
{
|
|
// XPushVar<int> osmode(_T("OSMODE"), 0); // 临时将对象捕捉关掉
|
|
return TSymbEdJig::DoIt(keyIndex);
|
|
}
|
|
|
|
AcEdJig::DragStatus TLeaderAddOtherPtJig::GetPoint(XPoint &pt)
|
|
{
|
|
return acquirePoint(pt); // 自由拖拽,不受正交控制
|
|
}
|
|
|
|
Adesk::Boolean TLeaderAddOtherPtJig::update()
|
|
{
|
|
if (m_bUpdateDlg) // 时时更新对话框
|
|
{
|
|
m_pDlg->UpdateData(TRUE);
|
|
}
|
|
|
|
m_line.setEndPoint(m_ptResult);
|
|
return Adesk::kTrue;
|
|
}
|
|
|
|
AcDbEntity* TLeaderAddOtherPtJig::entity() const
|
|
{
|
|
return (AcDbEntity *)&m_line;
|
|
}
|