7 #include "KeySymbols.h" 10 #include "TGLPhysicalShape.h" 11 #include "TGLLogicalShape.h" 12 #include "TEveGedEditor.h" 13 #include "TEveViewer.h" 15 #include "TVirtualX.h" 18 : TEveLegoEventHandler(
w,
obj,
l), m_viewer(nullptr) {}
24 if (
event->fState & kKeyShiftMask &&
event->fState & kKeyControlMask) {
25 TGLEventHandler::PopupContextMenu(pshp,
event, gx, gy);
30 SelectForClicked(
event);
32 if (pshp->GetLogical()) {
47 Bool_t
res = TEveLegoEventHandler::HandleButton(
event);
51 gVirtualX->TranslateCoordinates(
52 gClient->GetDefaultRoot()->GetId(), fGLViewer->GetGLWidget()->GetId(),
event->fX,
event->fY,
x,
y, childdum);
53 fGLViewer->RequestSelect(
event->fX,
event->fY);
54 if (fGLViewer->GetSelRec().GetN() > 0) {
55 TGLVector3
v(
event->fX,
event->fY, 0.5 * fGLViewer->GetSelRec().GetMinZ());
56 fGLViewer->CurrentCamera().WindowToViewport(
v);
57 v = fGLViewer->CurrentCamera().ViewportToWorld(
v);
69 gVirtualX->LookupString(
event,
tmp,
sizeof(
tmp), keysym);
71 if (
m_viewer && (keysym == kKey_Enter || keysym == kKey_Return || keysym == kKey_Space)) {
72 if (
event->fType == kGKeyPress) {
75 gVirtualX->TranslateCoordinates(
76 fGLViewer->GetGLWidget()->GetId(), gClient->GetDefaultRoot()->GetId(),
event->fX,
event->fY,
x,
y, childdum);
78 fGLViewer->RequestSelect(
event->fX,
event->fY);
83 return TEveLegoEventHandler::HandleKey(
event);
94 return TGLEventHandler::HandleFocusChange(
event);
105 return TGLEventHandler::HandleCrossing(
event);
Bool_t HandleKey(Event_t *event) override
void GeoPopupMenu(Int_t gx, Int_t gy, TGLViewer *)
void PopupContextMenu(TGLPhysicalShape *pshp, Event_t *event, Int_t gx, Int_t gy) override
virtual bool requestGLHandlerPick() const
Bool_t HandleCrossing(Event_t *event) override
void setCurrentDMTVertex(double x, double y, double z)
FWGLEventHandler(TGWindow *w, TObject *obj, TEveCaloLego *l=nullptr)
Bool_t HandleFocusChange(Event_t *event) override
Bool_t HandleButton(Event_t *event) override
sigc::signal< void(Int_t, Int_t)> openSelectedModelContextMenu_