Exemplo n.º 1
0
        /// <summary>
        /// Invoked by the <see cref="Touch.TapEvent"/> attached routed event.
        /// </summary>
        /// <param name="device">The touch device.</param>
        /// <param name="fingerID">The identifier of the finger that caused the touch.</param>
        /// <param name="x">The x-coordinate of the touch.</param>
        /// <param name="y">The y-coordinate of the touch.</param>
        /// <param name="data">The routed event metadata for this event invocation.</param>
        protected virtual void OnTap(TouchDevice device, Int64 fingerID,
            Double x, Double y, RoutedEventData data)
        {

        }
Exemplo n.º 2
0
        /// <summary>
        /// Invoked by the <see cref="Touch.FingerMotionEvent"/> attached routed event.
        /// </summary>
        /// <param name="device">The touch device.</param>
        /// <param name="fingerID">The identifier of the finger that caused the touch.</param>
        /// <param name="x">The x-coordinate of the touch.</param>
        /// <param name="y">The y-coordinate of the touch.</param>
        /// <param name="dx">The amount of motion along the x-axis.</param>
        /// <param name="dy">The amount of motion along the y-axis.</param>
        /// <param name="pressure">The normalized pressure value of the touch.</param>
        /// <param name="data">The routed event metadata for this event invocation.</param>
        protected virtual void OnFingerMotion(TouchDevice device, Int64 fingerID,
            Double x, Double y, Double dx, Double dy, Single pressure, RoutedEventData data)
        {

        }
Exemplo n.º 3
0
 /// <summary>
 /// Invokes the <see cref="OnTap"/> method.
 /// </summary>
 private static void OnTapProxy(DependencyObject element, TouchDevice device, Int64 fingerID,
     Double x, Double y, RoutedEventData data)
 {
     ((UIElement)element).OnTap(device, fingerID, x, y, data);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Invokes the <see cref="OnFingerMotion"/> method.
 /// </summary>
 private static void OnFingerMotionProxy(DependencyObject element, TouchDevice device, Int64 fingerID,
     Double x, Double y, Double dx, Double dy, Single pressure, RoutedEventData data)
 {
     ((UIElement)element).OnFingerMotion(device, fingerID, x, y, dx, dy, pressure, data);
 }
Exemplo n.º 5
0
 /// <inheritdoc/>
 protected override void OnFingerUp(TouchDevice device, Int64 fingerID, Double x, Double y, Single pressure, RoutedEventData data)
 {
     if (fingerID == 0)
     {
         LinkUtil.DeactivateTextLink(textLayoutCommands, this);
         LinkUtil.UpdateLinkCursor(textLayoutCommands, this, null);
     }
     base.OnFingerUp(device, fingerID, x, y, pressure, data);
 }
Exemplo n.º 6
0
        /// <inheritdoc/>
        protected override void OnFingerMotion(TouchDevice device, Int64 fingerID, Double x, Double y, Double dx, Double dy, Single pressure, RoutedEventData data)
        {
            data.Handled = true;

            base.OnFingerMotion(device, fingerID, x, y, dx, dy, pressure, data);
        }
Exemplo n.º 7
0
 /// <inheritdoc/>
 protected override void OnFingerUp(TouchDevice device, Int64 fingerID, Double x, Double y, Single pressure, ref RoutedEventData data)
 {
     HighlightOpacity = (HighlightOnSelect && IsSelected) || (HighlightOnMouseOver && IsMouseDirectlyOver) ? 1.0 : 0.0;
     base.OnFingerUp(device, fingerID, x, y, pressure, ref data);
 }
Exemplo n.º 8
0
 /// <inheritdoc/>
 protected override void OnFingerMotion(TouchDevice device, Int64 fingerID, Double x, Double y, Double dx, Double dy, Single pressure, ref RoutedEventData data)
 {
     if (!data.Handled && fingerID == 0)
     {
         if (dx != 0 && PART_HScroll != null)
         {
             PART_HScroll.Value -= dx;
         }
         if (dy != 0 && PART_VScroll != null)
         {
             PART_VScroll.Value -= dy;
         }
         data.Handled = true;
     }
     base.OnFingerMotion(device, fingerID, x, y, dx, dy, pressure, ref data);
 }
 /// <summary>
 /// Invoked by the <see cref="Touch.FingerUpEvent"/> attached routed event.
 /// </summary>
 /// <param name="device">The touch device.</param>
 /// <param name="fingerID">The identifier of the finger that caused the touch.</param>
 /// <param name="x">The x-coordinate of the touch.</param>
 /// <param name="y">The y-coordinate of the touch.</param>
 /// <param name="pressure">The normalized pressure value of the touch.</param>
 /// <param name="data">The routed event metadata for this event invocation.</param>
 protected virtual void OnFingerUp(TouchDevice device, Int64 fingerID,
     Double x, Double y, Single pressure, ref RoutedEventData data)
 {
 }
Exemplo n.º 10
0
 /// <inheritdoc/>
 protected override void OnFingerDown(TouchDevice device, Int64 fingerID, Double x, Double y, Single pressure, ref RoutedEventData data)
 {
     HighlightOpacity = 1.0;
     base.OnFingerDown(device, fingerID, x, y, pressure, ref data);
 }
 /// <summary>
 /// Invokes the <see cref="OnFingerUp"/> method.
 /// </summary>
 private static void OnFingerUpProxy(DependencyObject element, TouchDevice device, Int64 fingerID,
     Double x, Double y, Single pressure, ref RoutedEventData data)
 {
     ((UIElement)element).OnFingerUp(device, fingerID, x, y, pressure, ref data);
 }
Exemplo n.º 12
0
 /// <summary>
 /// Raises the FingerMotion attached event for the specified element.
 /// </summary>
 internal static void RaiseFingerMotion(DependencyObject element, TouchDevice device, Int64 fingerID,
     Double x, Double y, Double dx, Double dy, Single pressure, ref RoutedEventData data)
 {
     var temp = EventManager.GetInvocationDelegate<UpfTouchMotionEventHandler>(FingerMotionEvent);
     if (temp != null)
     {
         temp(element, device, fingerID, x, y, dx, dy, pressure, ref data);
     }
 }
Exemplo n.º 13
0
 /// <summary>
 /// Raises the Tap attached event for the specified element.
 /// </summary>
 internal static void RaiseTap(DependencyObject element, TouchDevice device, Int64 fingerID, 
     Double x, Double y, ref RoutedEventData data)
 {
     var temp = EventManager.GetInvocationDelegate<UpfTouchTapEventHandler>(TapEvent);
     if (temp != null)
     {
         temp(element, device, fingerID, x, y, ref data);
     }
 }
Exemplo n.º 14
0
 /// <summary>
 /// Raises the <see cref="E:TwistedLogik.Ultraviolet.UI.Presentation.Input.Touch.Tap"/>
 /// attached event for the specified element.
 /// </summary>
 internal static void RaiseTap(DependencyObject element, TouchDevice device, Int64 fingerID, 
     Double x, Double y, RoutedEventData data)
 {
     var evt = EventManager.GetInvocationDelegate<UpfTouchTapEventHandler>(TapEvent);
     evt?.Invoke(element, device, fingerID, x, y, data);
 }
Exemplo n.º 15
0
 /// <summary>
 /// Raises the <see cref="E:TwistedLogik.Ultraviolet.UI.Presentation.Input.Touch.PreviewFingerUp"/>
 /// attached event for the specified element.
 /// </summary>
 internal static void RaisePreviewFingerUp(DependencyObject element, TouchDevice device, Int64 fingerID,
     Double x, Double y, Single pressure, RoutedEventData data)
 {
     var evt = EventManager.GetInvocationDelegate<UpfTouchEventHandler>(PreviewFingerUpEvent);
     evt?.Invoke(element, device, fingerID, x, y, pressure, data);
 }