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, FWModelId::index(), FWViewType::isProjected(), FWModelId::item(), B2GTnPMonitor_cfi::item, kAnnotate, kCameraCenter, kResetCameraCenter, m_view, FWEventItem::modelData(), Skims_PA_cff::name, FWSelectionManager::selected(), fireworks::Context::selectionManager(), AlCaHLTBitMon_QueryRunRegistry::string, FWViewBase::typeId(), findQualityFiles::v, FWItemValueGetter::valueFor(), FWEventItem::valueGetter(), 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);
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
const FWItemValueGetter & valueGetter() const
one value from the model which is normally used for the popup
const void * modelData(int iIndex) const
static bool isProjected(int)
const FWEventItem * item() const
const fireworks::Context & context()
double valueFor(const void *, int idx) const
const std::set< FWModelId > & selected() const
FWViewType::EType typeId() const
TGLViewer * viewerGL() const