public void HandlePointerInput( PointerInputEvent inputEvent, ref GestureEventResult result) { if (inputEvent.State == PointerInputState.Began) { this._delegate.OnTouchBegan(); } else if (inputEvent.State == PointerInputState.Ended) { this._delegate.OnTouchEnded(); } else if (inputEvent.State == PointerInputState.Canceled) { this._delegate.OnTouchCanceled(); } this.OnPointerInput(inputEvent, ref result); if ((this.State == GestureState.Recognized) || (this.State == GestureState.Failed) || (this.State == GestureState.Canceled)) { // Reset on reaching a terminal node in the state machine this.Reset(); } }
public virtual bool HandlePointerEvent( PointerInputEvent pointerInputEvent) { if (this.Application.HandlePreviewInput(this, pointerInputEvent)) { return(true); } GestureEventResult result = new GestureEventResult(); this.GestureRecognizer?.HandlePointerInput(pointerInputEvent, ref result); return(result.DidHandleEvent); }
protected abstract void OnPointerInput( PointerInputEvent inputEvent, ref GestureEventResult result);