URectangleMarqueeMechanic

Mechanic for a rectangle "marquee" selection.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ModelingComponents

Header

/Engine/Plugins/Runtime/MeshModelingToolset/Source/ModelingComponents/Public/Mechanics/RectangleMarqueeMechanic.h

Include

#include "Mechanics/RectangleMarqueeMechanic.h"

Syntax

UCLASS()
class URectangleMarqueeMechanic :
    public UInteractionMechanic,
    public IClickDragBehaviorTarget

Remarks

Mechanic for a rectangle "marquee" selection. It creates and maintains the 2D rectangle associated with a mouse drag. It does not test against any scene geometry, nor does it maintain any sort of list of selected objects.

When using this mechanic, you should call Render() on it in the tool's Render() call so that it can cache necessary camera state, and DrawHUD() in the tool's DrawHUD() call so that it can draw the box.

Attach to the mechanic's delegates and use the passed rectangle to test against your geometry.

Variables

Name Description

Protected variable

FInputCapturePr...

 

BasePriority

Public variable UProperty

bool

 

bUseExternalClickDragBehavior

If true, then the URectangleMarqueeMechanic will not create an internal UClickDragInputBehavior in Setup(), allowing the client to control the marquee with an external InputBehavior that uses the marquee mechanic as it's IClickDragBehaviorTarget.

Protected variable

FCameraRectangl...

 

CameraRectangle

Protected variable UProperty

TObjectPtr< UCl...

 

ClickDragBehavior

Public variable

OnDragRectangle...

 

OnDragRectangleChanged

Public variable UProperty

double

 

OnDragRectangleChangedDeferredThreshold

If the computation time for a single call to OnDragRectangleChanged ever exceeds this threshold then future calls to this function (in the current drag sequence) will be deferred until the mouse button is released.

Public variable

OnDragRectangle...

 

OnDragRectangleFinished

Public variable

FSimpleMulticas...

 

OnDragRectangleStarted

Called when user starts dragging a new rectangle.

Functions

Name Description

Public function Virtual

void

 

DrawHUD

(
    FCanvas* Canvas,
    IToolsContextRenderAPI* Render...
)

Public function Const

TPair< FInpu...

 

GetPriorityRange()

Gets the current priority range used by behaviors in the mechanic, higher priority to lower.

Public function

bool

 

IsEnabled()

Public function

void

 

SetBasePriority

(
    const FInputCapturePriority& Prior...
)

Sets the base priority so that users can make sure that their own behaviors are higher priority.

Public function

void

 

SetIsEnabled

(
    bool bOn
)

Overridden from UInteractionMechanic

Name Description

Public function Virtual

void

 

Render

(
    IToolsContextRenderAPI* Render...
)

Allow the Mechanic to do any custom drawing (ie via PDI/RHI)

Public function Virtual

void

 

Setup

(
    UInteractiveTool* ParentTool
)

UInteractionMechanic.

Typedefs

Name

Description

OnDragRectangleChangedEvent

Called as the user drags the other corner of the rectangle around.

OnDragRectangleFinishedEvent

Called once the user lets go of the mouse button after dragging out a rectangle.