Version: 2018.2
Experimental: this API is experimental and might be changed or removed in the future.

ContextualMenuPopulateEvent

class in UnityEngine.Experimental.UIElements

/

Inherits from:Experimental.UIElements.MouseEventBase_1

Switch to Manual

Description

An event sent when a contextual menu needs to be filled with menu item.

Variables

menuThe menu to populate.

Constructors

ContextualMenuPopulateEventКонструктор.

Protected Functions

InitReset the event members to their initial value.

Static Functions

GetPooledRetrieves an event from the event pool. Use this method to retrieve a mouse event and initialize the event, instead of creating a new mouse event.

Inherited members

Variables

bubblesReturns whether this event type bubbles up in the event propagation path.
capturableReturn whether this event is sent down the event propagation path during the capture phase.
currentTargetThe current target of the event. The current target is the element in the propagation path for which event handlers are currently being executed.
dispatchReturn whether the event is currently being dispatched to visual element. An event can not be redispatched while being dispatched. If you need to recursively redispatch an event, you should use a copy.
flagsFlags for the event.
imguiEventThe IMGUIEvent at the source of this event. This can be null as not all events are generated by IMGUI.
isDefaultPreventedReturn true if the default actions should not be executed for this event.
isImmediatePropagationStoppedReturn true if StopImmediatePropagation() has been called for this event.
isPropagationStoppedReturn true if StopPropagation() has been called for this event.
originalMousePositionThe original mouse position of the IMGUI event, before it is transformed to the local element coordinates.
propagationPhaseThe current propagation phase.
targetThe target for this event. The is the visual element that received the event. Unlike currentTarget, target does not change when the event is sent to elements along the propagation path.
timestampThe time at which the event was created.
altKeyReturn true if the Alt key is pressed.
buttonInteger representing the pressed mouse button: 0 is left, 1 is right, 2 is center.
clickCountNumber of clicks.
commandKeyReturn true if the Windows/Command key is pressed.
ctrlKeyReturn true if the Control key is pressed.
currentTargetThe current target of the event. The current target is the element in the propagation path for which event handlers are currently being executed.
localMousePositionThe mouse position in the current target coordinate system.
modifiersFlag set holding the pressed modifier keys (Alt, Control, Shift, Windows/Command).
mouseDeltaMouse position difference between the last mouse event and this one.
mousePositionThe mouse position in the screen coordinate system.
shiftKeyReturn true if the Shift key is pressed.

Public Functions

DisposeImplementation of IDisposable.
GetEventTypeIdGet the type id for this event instance.
PreventDefaultCall this function to prevent the execution of the default actions for this event.
StopImmediatePropagationImmediately stop the propagation of this event. The event will not be sent to any further event handlers on the current target or on any other element in the propagation path.
StopPropagationStop the propagation of this event. The event will not be sent to any further element in the propagation path. Further event handlers on the current target will be executed.
DisposeImplementation of IDispose.
GetEventTypeIdGet the type id for this event instance.

Static Functions

RegisterEventTypeRegister an event class to the event type system.
GetPooledGet an event from the event pool. Use this function instead of creating new events. Events obtained from this method should be released back to the pool using ReleaseEvent().
ReleasePooledRelease an event obtained from GetPooled().
TypeIdGet the type id for this event instance.
GetPooledGet an event from the event pool and initialize it with the given values. Use this function instead of creating new events. Events obtained from this method should be released back to the pool using ReleaseEvent().