98 lines
2.4 KiB
C++
98 lines
2.4 KiB
C++
|
|
#include "StdAfx.h"
|
|
#include "AcEdInputPointMonitorEx.h"
|
|
|
|
|
|
ACRX_CONS_DEFINE_MEMBERS(AcEdInputPointMonitorEx, AcEdInputPointMonitor, 1)
|
|
|
|
|
|
AcEdInputPointMonitorEx::AcEdInputPointMonitorEx (AcApDocument *pDoc) : AcEdInputPointMonitor(), mpDocument(pDoc)
|
|
{
|
|
if ( pDoc )
|
|
{
|
|
pDoc->inputPointManager ()->addPointMonitor (this) ;
|
|
}
|
|
}
|
|
|
|
AcEdInputPointMonitorEx::~AcEdInputPointMonitorEx ()
|
|
{
|
|
Detach () ;
|
|
}
|
|
|
|
void AcEdInputPointMonitorEx::Attach(AcApDocument *pDoc)
|
|
{
|
|
Detach () ;
|
|
if ( mpDocument == NULL )
|
|
{
|
|
if ( (mpDocument =pDoc) != NULL )
|
|
{
|
|
pDoc->inputPointManager()->addPointMonitor(this) ;
|
|
}
|
|
}
|
|
}
|
|
|
|
void AcEdInputPointMonitorEx::Detach()
|
|
{
|
|
if ( mpDocument )
|
|
{
|
|
mpDocument->inputPointManager()->removePointMonitor(this) ;
|
|
mpDocument =NULL ;
|
|
}
|
|
}
|
|
|
|
AcApDocument *AcEdInputPointMonitorEx::Subject() const
|
|
{
|
|
return (mpDocument) ;
|
|
}
|
|
|
|
bool AcEdInputPointMonitorEx::IsAttached () const
|
|
{
|
|
return (mpDocument != NULL) ;
|
|
}
|
|
|
|
bool AcEdInputPointMonitorEx::excludeFromOsnapCalculation (
|
|
const AcArray<AcDbObjectId> &nestedEntity,
|
|
int gsSelectionMark
|
|
)
|
|
{
|
|
return (AcEdInputPointMonitor::excludeFromOsnapCalculation (nestedEntity, gsSelectionMark)) ;
|
|
}
|
|
|
|
Acad::ErrorStatus AcEdInputPointMonitorEx::monitorInputPoint (
|
|
bool &appendToTooltipStr,
|
|
TCHAR *&additionalTooltipString,
|
|
AcGiViewportDraw *drawContext,
|
|
AcApDocument *document,
|
|
bool pointComputed,
|
|
int history,
|
|
const AcGePoint3d &lastPoint,
|
|
const AcGePoint3d &rawPoint,
|
|
const AcGePoint3d &grippedPoint,
|
|
const AcGePoint3d &cartesianSnappedPoint,
|
|
const AcGePoint3d &osnappedPoint,
|
|
AcDb::OsnapMask osnapMask,
|
|
const AcArray<AcDbCustomOsnapMode *> &customOsnapModes,
|
|
AcDb::OsnapMask osnapOverrides,
|
|
const AcArray<AcDbCustomOsnapMode *> &customOsnapOverrides,
|
|
const AcArray<AcDbObjectId> &apertureEntities,
|
|
const AcArray<AcDbObjectIdArray, AcArrayObjectCopyReallocator<AcDbObjectIdArray> > &nestedApertureEntities,
|
|
const AcArray<int> &gsSelectionMark,
|
|
const AcArray<AcDbObjectId> &keyPointEntities,
|
|
const AcArray<AcDbObjectIdArray, AcArrayObjectCopyReallocator<AcDbObjectIdArray> > &nestedKeyPointEntities,
|
|
const AcArray<int> &keyPointGsSelectionMark,
|
|
const AcArray<AcGeCurve3d *> &alignmentPaths,
|
|
const AcGePoint3d &computedPoint,
|
|
const TCHAR *tooltipString
|
|
)
|
|
{
|
|
appendToTooltipStr =false ;
|
|
|
|
m_ptCursorPos = rawPoint;
|
|
|
|
return (Acad::eOk) ;
|
|
}
|
|
|
|
AcGePoint3d AcEdInputPointMonitorEx::GetCursorPos()
|
|
{
|
|
return m_ptCursorPos;
|
|
} |