#include <EditorBoxSelect.h>
Public Member Functions | |
bool | Active () const |
Return if a box select action is currently taking place. | |
bool | HandleMouseInteraction (const ViewportInteraction::MouseInteractionEvent &mouseInteraction) |
void | Display2d (const AzFramework::ViewportInfo &viewportInfo, AzFramework::DebugDisplayRequests &debugDisplay) |
Responsible for drawing the 2d box representing the selection in screen space. | |
void | DisplayScene (const AzFramework::ViewportInfo &viewportInfo, AzFramework::DebugDisplayRequests &debugDisplay) |
Custom drawing behavior to happen during a box select. | |
void | InstallLeftMouseDown (const AZStd::function< void(const ViewportInteraction::MouseInteractionEvent &mouseInteraction)> &leftMouseDown) |
Set the left mouse down callback. | |
void | InstallMouseMove (const AZStd::function< void(const ViewportInteraction::MouseInteractionEvent &mouseInteraction)> &mouseMove) |
Set the mouse move callback. | |
void | InstallLeftMouseUp (const AZStd::function< void()> &leftMouseUp) |
Set the left mouse up callback. | |
void | InstallDisplayScene (const AZStd::function< void(const AzFramework::ViewportInfo &viewportInfo, AzFramework::DebugDisplayRequests &debugDisplay)> &displayScene) |
Set the display scene callback. | |
const AZStd::optional< QRect > & | BoxRegion () const |
ViewportInteraction::KeyboardModifiers | PreviousModifiers () const |
Return the active modifiers from the previous frame. | |
Utility to provide box select (click and drag) support for viewport types. Users can override the mouse event callbacks and display scene function to customize behavior.
|
inline |
Return the box select region. If a box selection is being made, return the current rectangle representing the area. If there is currently no active box select, then the Maybe type will be empty (there will be no region/area).
bool AzToolsFramework::EditorBoxSelect::HandleMouseInteraction | ( | const ViewportInteraction::MouseInteractionEvent & | mouseInteraction | ) |
Update the box select for various mouse events. Call HandleMouseInteraction from type/system implementing MouseViewportRequests interface.