Manages user interactions (mouse and keyboard events) by registering and unregistering listeners with the state. The manager provides proper handling of user interaction events by reassigning events to the active tool, providing logic for exclusive listeners, and reverting back to defaults when tools are closed.
Determines whether a listener associated with a specific event and tool can execute.
The name of the interaction event.
The name of the tool associated with the event.
Returns true if the listener can execute; otherwise, returns false.
Registers a listener for the specified interaction event. If the listener is exclusive, it removes pre-existing exclusive listeners for the same event before registering the new one. Ensures that duplicate listeners are not registered.
The event name to register the listener for.
Indicates whether the listener is exclusive to the event. Exclusive listeners override other listeners for the same event.
The name of the tool registering the listener.
Returns true if the listener was successfully registered, false if the listener was already registered.
Unregisters all listeners associated with a specific tool.
The name of the tool for which all event listeners should be unregistered.
Unregisters a listener for a specific interaction event and tool by removing it from the state.
The name of the interaction event to unregister.
The name of the tool associated with the event listener to be unregistered.
Static