#include <ViewportControllerList.h>
Inherits AzFramework::ViewportControllerInterface.
Public Member Functions | |
void | Add (ViewportControllerPtr controller) |
void | Remove (ViewportControllerPtr controller) |
Removes a controller from this list. | |
bool | HandleInputChannelEvent (const AzFramework::ViewportControllerInputEvent &event) override |
void | ResetInputChannels () override |
void | UpdateViewport (const AzFramework::ViewportControllerUpdateEvent &event) override |
void | RegisterViewportContext (ViewportId viewport) override |
void | UnregisterViewportContext (ViewportId viewport) override |
Unregisters a Viewport from this list and all associated controllers. | |
AzFramework::ViewportControllerPriority | GetPriority () const override |
bool | IsEnabled () const |
void | SetEnabled (bool enabled) |
virtual bool | HandleInputChannelEvent (const ViewportControllerInputEvent &event) |
virtual void | ResetInputChannels () |
virtual void | UpdateViewport (const ViewportControllerUpdateEvent &event) |
virtual void | RegisterViewportContext (ViewportId viewport)=0 |
virtual void | UnregisterViewportContext (ViewportId viewport)=0 |
virtual ViewportControllerPriority | GetPriority () const |
A list of ViewportControllers that allows priority-ordered dispatch to controllers registered to it. ViewportControllerList itself is-a controller, meaning it controllers can be contained in nested lists.
void AzFramework::ViewportControllerList::Add | ( | ViewportControllerPtr | controller | ) |
Adds a controller to this list at the specified priority. This controller will be notified of all InputChannelEvents not consumed by a higher priority controller via OnInputChannelEvent.
|
inlineoverridevirtual |
All ViewportControllerLists have a priority of Custom to ensure that they receive events at all priorities from any parent controllers.
Reimplemented from AzFramework::ViewportControllerInterface.
|
overridevirtual |
Dispatches an InputChannelEvent to all controllers registered to this list until either a controller returns true to consume the event in OnInputChannelEvent or the controller list is exhausted. InputChannelEvents are sent to controllers in priority order (from the lowest priority value to the highest).
Reimplemented from AzFramework::ViewportControllerInterface.
bool AzFramework::ViewportControllerList::IsEnabled | ( | ) | const |
Returns true if this controller list is enabled, i.e. it is accepting and forwarding input and update events to its children.
|
overridevirtual |
Registers a Viewport to this list. All current and added controllers will be registered with this viewport.
Implements AzFramework::ViewportControllerInterface.
|
overridevirtual |
Dispatches a ResetInputChannels call to all controllers registered to this list. Calls to controllers are made in an undefined order.
Reimplemented from AzFramework::ViewportControllerInterface.
void AzFramework::ViewportControllerList::SetEnabled | ( | bool | enabled | ) |
Set this controller list's enabled state. If a controller list is disabled, it will ignore all input and update events rather than dispatching them to its children.
|
overridevirtual |
Unregisters a Viewport from this list and all associated controllers.
Implements AzFramework::ViewportControllerInterface.
|
overridevirtual |
Dispatches an update tick to all controllers registered to this list. This occurs in reverse priority order (i.e. from the highest priority value to the lowest) so that controllers with the highest registration priority may override the transforms of the controllers with the lowest registration priority.
Reimplemented from AzFramework::ViewportControllerInterface.