using System;
using System.Collections.Generic;
using UnityEngine.Events;
using UnityEngine.EventSystems;
namespace UnityEngine.XR.Interaction.Toolkit.UI
{
public abstract partial class UIInputModule
{
///
/// Calls the methods in its invocation list after the input module collects a list of type , but before the results are used.
/// Note that not all fields of the event data are still valid or up to date at this point in the UI event processing.
/// This event can be used to read, modify, or reorder results.
/// After the event, the first result in the list with a non-null GameObject will be used.
///
public event Action> finalizeRaycastResults;
///
/// This occurs when a UI pointer enters an element.
///
public event Action pointerEnter;
///
/// This occurs when a UI pointer exits an element.
///
public event Action pointerExit;
///
/// This occurs when a select button down occurs while a UI pointer is hovering an element.
/// This event is executed using ExecuteEvents.ExecuteHierarchy when sent to the target element.
///
public event Action pointerDown;
///
/// This occurs when a select button up occurs while a UI pointer is hovering an element.
///
public event Action pointerUp;
///
/// This occurs when a select button click occurs while a UI pointer is hovering an element.
///
public event Action pointerClick;
#if UNITY_2021_1_OR_NEWER || PACKAGE_DOCS_GENERATION
///
/// This occurs while a UI pointer is moving over elements.
///
///
/// This may induce performance penalties due to the frequency in which this event gets called
/// and should be used with that consideration in mind.
/// Only invoked in Unity 2021.1 and newer.
///
public event Action pointerMove;
#endif
///
/// This occurs when a potential drag occurs on an element.
///
public event Action initializePotentialDrag;
///
/// This occurs when a drag first occurs on an element.
///
public event Action beginDrag;
///
/// This occurs every frame while dragging an element.
///
public event Action drag;
///
/// This occurs on the last frame an element is dragged.
///
public event Action endDrag;
///
/// This occurs when a dragged element is dropped on a drop handler.
///
public event Action drop;
///
/// This occurs when an element is scrolled
/// This event is executed using ExecuteEvents.ExecuteHierarchy when sent to the target element.
///
public event Action scroll;
///
/// This occurs on update for the currently selected object.
///
public event Action updateSelected;
///
/// This occurs when the move axis is activated.
///
public event Action move;
///
/// This occurs when the submit button is pressed.
///
public event Action submit;
///
/// This occurs when the cancel button is pressed.
///
public event Action cancel;
}
#region Hover
///
/// that Unity invokes when an Interactor initiates hovering over a new UI element.
///
[Serializable]
public sealed class UIHoverEnterEvent : UnityEvent
{
}
///
/// that Unity invokes when an Interactor ends hovering over a UI element.
///
[Serializable]
public sealed class UIHoverExitEvent : UnityEvent
{
}
///
/// Arguments passed to the that Unity invokes when an Interactor is hovering over a UI element.
///
public class UIHoverEventArgs
{
///
/// The that is hovering.
///
public IUIInteractor interactorObject { get; set; }
///
/// The corresponding to the controller or hand
/// interacting with the UI element that is being hovered over.
///
public TrackedDeviceModel deviceModel { get; set; }
///
/// The UI element that is being hovered over.
///
public GameObject uiObject { get; set; }
}
#endregion
}