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()) {
33 FWGeoTopNodeGLScene *js = dynamic_cast<FWGeoTopNodeGLScene *>(pshp->GetLogical()->GetScene());
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);