void mepp_component_Compression_Valence_plugin::OnDecompress_precedent_level() { if (mw->activeMdiChild() != 0) { Viewer* viewer = (Viewer *)mw->activeMdiChild(); PolyhedronPtr polyhedron_ptr = viewer->getScenePtr()->get_polyhedron(); if (doesExistComponentForViewer<Compression_Valence_ComponentPtr, Compression_Valence_Component>(viewer, polyhedron_ptr)) // important !!! { OnMouseRightUp(NULL); } } }
void mepp_component_Compression_Valence_plugin::OnMouseWheel(QWheelEvent *event) { if (mw->activeMdiChild() != 0) { Viewer* viewer = (Viewer *)mw->activeMdiChild(); PolyhedronPtr polyhedron_ptr = viewer->getScenePtr()->get_polyhedron(); if (doesExistComponentForViewer<Compression_Valence_ComponentPtr, Compression_Valence_Component>(viewer, polyhedron_ptr)) // important !!! { int rot = event->delta(); if (rot<0) OnMouseLeftUp(NULL); // todo: NULL else OnMouseRightUp(NULL); // todo: NULL } } }
void WxGraphs::OnMouseLeave(wxMouseEvent &event) { OnMouseRightUp(event); OnMouseLeftDClick(event); }
void GCDCGraphs::OnMouseLeave(wxMouseEvent& event) { OnMouseLeftUp(event); OnMouseRightUp(event); }
void State::OnEvent(const sf::Event::Event &e) { switch (e.Type) { case sf::Event::KeyPressed: OnKeyPressed(e.Key.Code, e.Key.Alt, e.Key.Control, e.Key.Shift); break; case sf::Event::KeyReleased: OnKeyReleased(e.Key.Code, e.Key.Alt, e.Key.Control, e.Key.Shift); break; case sf::Event::MouseMoved: OnMouseMoved(e.MouseMove.X, e.MouseMove.Y); break; case sf::Event::MouseButtonPressed: { int x = e.MouseButton.X; int y = e.MouseButton.Y; switch (e.MouseButton.Button) { case sf::Mouse::Left: OnMouseLeftDown(x, y); buttons_[0] = true; break; case sf::Mouse::Right: OnMouseRightDown(x, y); buttons_[1] = true; break; case sf::Mouse::Middle: OnMouseMiddleDown(x, y); buttons_[2] = true; break; } break; } case sf::Event::MouseButtonReleased: { int x = e.MouseButton.X; int y = e.MouseButton.Y; switch (e.MouseButton.Button) { case sf::Mouse::Left: OnMouseLeftUp(x, y); if (buttons_[0]) { buttons_[0] = false; OnMouseLeftClick(x, y); } break; case sf::Mouse::Right: OnMouseRightUp(x, y); if (buttons_[1]) { buttons_[1] = false; OnMouseRightClick(x, y); } break; case sf::Mouse::Middle: OnMouseMiddleUp(x, y); if (buttons_[2]) { buttons_[2] = false; OnMouseMiddleClick(x, y); } break; } break; } case sf::Event::MouseEntered: OnMouseEntered(); break; case sf::Event::MouseLeft: OnMouseExited(); break; case sf::Event::GainedFocus: OnGainedFocus(); break; case sf::Event::LostFocus: OnLostFocus(); break; } }
UINT NervWindowHandler::OnRButtonUp(WPARAM wParam, LPARAM lParam){ NervMouseEvent event{int(wParam), int(lParam)}; OnMouseRightUp(&event); return 0; }