Message 1 of 2
How to add tooltip for selected point / entity for AcEdInputPointMonitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I use my own class AcEdInputPointMonitor for selecting point from preslect group of points.
I am not able to add tooltips during slection.
class CMajPointMonitor : public AcEdInputPointMonitor
{
protected:
const vector<AcGePoint2d>* m_pVecOfBody;
....
}
Acad::ErrorStatus CMajPointMonitor::monitorInputPoint(const AcEdInputPoint &input /*input*/,
AcEdInputPointMonitorResult &output /*output*/)
{
if (input.pointComputed())
{
AcGePoint2d ptCurr = asPnt2d(input.computedPoint());
AcGePoint2d ptNear = getNearestPoint(asPnt2d(input.computedPoint()));
AcCmEntityColor cm(255, 255, 0);
input.drawContext()->subEntityTraits().setTrueColor(cm);
input.drawContext()->geometry().circle(asPnt3d(ptNear), MajDraw::GetRozmerZnacky() / 2, input.drawContext()->viewport().viewDir());
if (m_pptStartBod)
{
AcGePoint3d pnts[2] = { asPnt3d(ptNear), asPnt3d(*m_pptStartBod) };
input.drawContext()->geometry().worldLine(pnts);
output.setAdditionalTooltipString(L"Tool");
output.appendToTooltipStr();
}
}
return Acad::eOk;
}