MCPcopy Create free account
hub / github.com/comaps/comaps / ProcessTouch

Method ProcessTouch

libs/drape_frontend/user_event_stream.cpp:740–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

738}
739
740bool UserEventStream::ProcessTouch(TouchEvent const & touch)
741{
742 ASSERT(touch.GetFirstTouch().m_id != -1, ());
743
744 TouchEvent touchEvent = touch;
745 touchEvent.PrepareTouches(m_touches);
746 bool isMapTouch = false;
747
748 switch (touchEvent.GetTouchType())
749 {
750 case TouchEvent::TOUCH_DOWN: isMapTouch = TouchDown(touchEvent.GetTouches()); break;
751 case TouchEvent::TOUCH_MOVE: isMapTouch = TouchMove(touchEvent.GetTouches()); break;
752 case TouchEvent::TOUCH_CANCEL: isMapTouch = TouchCancel(touchEvent.GetTouches()); break;
753 case TouchEvent::TOUCH_UP: isMapTouch = TouchUp(touchEvent.GetTouches()); break;
754 default: ASSERT(false, ()); break;
755 }
756
757 if (m_listener)
758 m_listener->OnTouchMapAction(touchEvent.GetTouchType(), isMapTouch);
759
760 return isMapTouch;
761}
762
763bool UserEventStream::TouchDown(std::array<Touch, 2> const & touches)
764{

Callers

nothing calls this directly

Calls 4

ASSERTFunction · 0.85
PrepareTouchesMethod · 0.80
GetTouchTypeMethod · 0.80
OnTouchMapActionMethod · 0.45

Tested by

no test coverage detected