Called when a menu item was selected iEntryIndex: the index of the selected menu item. Same as returned from 'addEntry' iX, iY: Screen coordinates of where mouse was clicked
Implements FWViewContextMenuHandlerBase.
Definition at line 36 of file FWViewContextMenuHandlerGL.cc.
References FWEveView::context(), f, FWViewType::isProjected(), B2GTnPMonitor_cfi::item, kAnnotate, kCameraCenter, kResetCameraCenter, m_view, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::mId, Skims_PA_cff::name, FWSelectionManager::selected(), fireworks::Context::selectionManager(), AlCaHLTBitMon_QueryRunRegistry::string, FWViewBase::typeId(), findQualityFiles::v, FWItemValueGetter::valueFor(), FWEveView::viewerGL(), x, and y.
41 gVirtualX->TranslateCoordinates(gClient->GetDefaultRoot()->GetId(),
v->GetGLWidget()->GetId(), iX, iY,
x,
y, wdummy);
43 TGLVector3 pnt(
x,
y, 0.5 *
v->GetSelRec().GetMinZ());
44 v->CurrentCamera().WindowToViewport(pnt);
45 pnt =
v->CurrentCamera().ViewportToWorld(pnt);
47 switch (iEntryIndex) {
49 TGFrame*
f =
v->GetGLWidget();
50 gVirtualX->TranslateCoordinates(gClient->GetDefaultRoot()->GetId(),
f->GetId(), iX, iY,
x,
y, wdummy);
53 if (
id.
item()->haveInterestingValue())
54 name +=
", " +
id.item()->modelInterestingValueAsString(
id.
index());
57 new TGLAnnotation(
v,
name.c_str(),
x * 1.f /
f->GetWidth(), 1 -
y * 1.f /
f->GetHeight(), pnt);
58 an->SetUseColorSet(
true);
59 an->SetTextSize(0.03);
67 center.fX = valueGetter.
valueFor(
mId.item()->modelData(
mId.index()), 0);
68 center.fY = valueGetter.
valueFor(
mId.item()->modelData(
mId.index()), 1);
69 center.fZ = valueGetter.
valueFor(
mId.item()->modelData(
mId.index()), 2);
72 pv->shiftOrigin(center);
74 v->CurrentCamera().SetExternalCenter(
true);
75 v->CurrentCamera().SetCenterVec(pnt.X(), pnt.Y(), pnt.Z());
76 v->SetDrawCameraCenter(
true);
86 v->CurrentCamera().SetExternalCenter(
false);
87 v->SetDrawCameraCenter(
false);
FWSelectionManager * selectionManager() const
static bool isProjected(int)
const fireworks::Context & context()
double valueFor(const void *, int idx) const
const std::set< FWModelId > & selected() const
FWViewType::EType typeId() const
TGLViewer * viewerGL() const