This topic provides a summary of each event type. Consult the API documentation for a complete description of each event member and its purpose.
Events implementing IMouseCaptureEvent
.
MouseCaptureEvent
is sent when an element takes the mouse capture.
target
: The element that takes the capture.
MouseCaptureOutEvent
is sent when an element releases or otherwise loses the mouse capture.
target
: The element that loses the capture.
Events implementing IChangeEvent
.
ChangeEvent<T>
is a generic event sent when the value of an element changes. This is typically sent when a control changes. For the InputEvent
control, this event is not sent for every input event in the control, but only when the value changes. This is usually when either the control loses focus, or the Enter
key is pressed.
<T>
target
previousValue
newValue
Events implementing ICommandEvent
.
target
commandName
This event is sent by IMGUI while it determines whether the command will be handled by an element in the panel.
This event is sent by IMGUI when an element in the panel should execute a command.
Events sent during a drag and drop operation.
The drag and drop operation was cancelled. The drop target did not accept the dragged element.
The dragged element moved over a drop target. If the drop target is willing to accept the dragged element, the callback for this event should set DragAndDrop.visualMode
to ensure a DragPerformEvent
is sent when the user releases the mouse button.
The dragged element was dropped on a target that accepted them. The drag and drop operation is now finished.
The dragged element entered a new VisualElement
. In particular, this event is sent when the drag operation begins.
The dragged element exited the current drop target. In particular, this event is sent when the drag operation ends.
Event sent when either the position or the dimensions of an element changes. Events of this type are only sent to the event target. They are not propagated.
target
oldRect
newRect
Events implementing IFocusEvent
.
These events are sent when an element is given or loses keyboard focus. There are two sets of focus events:
FocusOutEvent
and FocusInEvent
are sent along the propagation path just before the focus change occurs.FocusEvent
and BlurEvent
are sent to the event target only, immediately after the focus change.Event sent when an element is about to lose the focus.
target
relatedTarget
Event sent when an element is about to gain the focus.
target
relatedTarget
Event sent after an element lost the focus.
target
relatedTarget
Event sent after an element gained the focus.
target
relatedTarget
Event sent when data is input to a visual element, typically a control. This event differs from ChangeEvent
in that it is sent for every input event in the control, even if the value of the control did not changed.
target
previousData
newData
Events implementing IKeyboardEvent
.
Event sent when the user presses a key on the keyboard.
target
Event sent when the user releases a key on the keyboard.
target
Events implementing IKeyboardEvent
.
While an element is capturing the mouse, mouse events are only be sent to the capturing elements. There is no propagation.
Event sent when the user presses one of the mouse buttons.
target
Event sent when the user releases one of the mouse buttons.
target
Event went when the user moves the mouse.
target
Event sent when the user presses and releases the third mouse button. This event only exists for backward compatibility with IMGUI.
Event sent when the user activates the mouse wheel.
target
Event sent when the mouse enters an window.
target
Event sent when the mouse leaves an window.
target
Event sent when the mouse enters an element or one of its descendant. This event differs from MouseOverEvent
in that this event is sent to each element being entered by the mouse. This event does not propagate.
target
Event sent when the mouse leaves an element or one of its descendant. This event differs from MouseOutEvent
in that this event is sent to each element being exited by the mouse. This event does not propagate.
target
Event sent when the mouse enters an element. This event differs from MouseEnterEvent
in that this event is only sent to the entered element. . This event does not propagate.
target
Event sent when the mouse leaves an element. This event differs from MouseLeaveEvent
in that this event is only sent to the exited element and that it propagates.
target
Event sent by the ContextualMenuManager
when the contextual menu needs to be populated with menu items.
target
Event sent immediately after an element is attached to a IPanel
. Since
setting the panel is recursive, all descendants of the element also
receive the event.
target
Event sent just before an element is detached to a IPanel
. Since
setting the panel is recursive, all descendants of the element also
receive the event.
target
Event sent just before a tooltip is displayed. The handler should set the TooltipEvent.tooltip
string and the TooltipEvent.rect
.
target
Event used to encapsulate IMGUI-specifc events.
When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising. Some 3rd party video providers do not allow video views without targeting cookies. If you are experiencing difficulty viewing a video, you will need to set your cookie preferences for targeting to yes if you wish to view videos from these providers. Unity does not control this.
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.