FWidget

Windows
MacOS
Linux

Inheritance Hierarchy

FGCObject

FWidget

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/UnrealWidget.h

Include

#include "UnrealWidget.h"

Syntax

class FWidget : public FGCObject

Constructors

Name Description

Public function

FWidget()

Functions

Name Description

Public function

void

 

AbsoluteTranslationConvertMouseMovementToAxisMovement

(
    FSceneView* InView,
    FEditorViewportClient* InViewp...,
    const FVector& InLocation,
    const FVector2D& InMousePosition,
    FVector& OutDrag,
    FRotator& OutRotation,
    FVector& OutScale
)

Absolute Translation conversion from mouse movement on the screen to widget axis movement/rotation.

Public function Static

bool

 

AllowsAbsoluteRotationMovement

(
    EWidgetMode WidgetMode,
    EAxisList::Type InAxisType
)

Only some modes support Absolute Rotation Movement.

Public function Static

bool

 

AllowsAbsoluteTranslationMovement

(
    FWidget::EWidgetMode WidgetMode
)

Only some modes support Absolute Translation Movement.

Public function

void

 

ConvertMouseMovementToAxisMovement

(
    FSceneView* InView,
    FEditorViewportClient* InViewp...,
    bool bInUsedDragModifier,
    FVector& InDiff,
    FVector& OutDrag,
    FRotator& OutRotation,
    FVector& OutScale
)

Converts mouse movement on the screen to widget axis movement/rotation.

Public function

void

 

DrawHUD

(
    FCanvas* Canvas
)

Renders any widget specific HUD text

Public function Const

EAxisList::T...

 

GetAxisToDraw

(
    EWidgetMode WidgetMode
)

Gets the axis to draw based on the current widget mode

Public function Const

EAxisList::T...

 

GetCurrentAxis()

Public function Const

FVector2D

 

GetOrigin()

Public function Static

float

 

GetRotationSpeed()

Public function Const

bool

 

IsDragging()

Returns whether we are actively dragging

Public function Const

bool

 

IsWidgetDisabled()

Public function

void

 

Render

(
    const FSceneView* View,
    FPrimitiveDrawInterface* PDI,
    FEditorViewportClient* Viewpor...
)

Public function

void

 

Render_2D

(
    const FSceneView* View,
    FPrimitiveDrawInterface* PDI,
    FEditorViewportClient* Viewpor...,
    const FVector& InLocation,
    bool bDrawWidget
)

Draws the combined 2D widget.

Draws the 2D widget.

Public function

void

 

Render_Axis

(
    const FSceneView* View,
    FPrimitiveDrawInterface* PDI,
    EAxisList::Type InAxis,
    FMatrix& InMatrix,
    UMaterialInterface* InMaterial,
    const FLinearColor& InColor,
    FVector2D& OutAxisDir,
    const FVector& InScale,
    bool bDrawWidget,
    bool bCubeHead,
    float AxisLengthOffset
)

Draws an arrow head line for a specific axis. Draws an arrow head line for a specific axis.

Public function

void

 

Render_Cube

(
    FPrimitiveDrawInterface* PDI,
    const FMatrix& InMatrix,
    const UMaterialInterface* InMa...,
    const FVector& InScale
)

Draws a cube

Public function

void

 

Render_Rotate

(
    const FSceneView* View,
    FPrimitiveDrawInterface* PDI,
    FEditorViewportClient* Viewpor...,
    const FVector& InLocation,
    bool bDrawWidget
)

Draws the rotation widget.

Public function

void

 

Render_Scale

(
    const FSceneView* View,
    FPrimitiveDrawInterface* PDI,
    FEditorViewportClient* Viewpor...,
    const FVector& InLocation,
    bool bDrawWidget
)

Draws the scaling widget.

Public function

void

 

Render_Translate

(
    const FSceneView* View,
    FPrimitiveDrawInterface* PDI,
    FEditorViewportClient* Viewpor...,
    const FVector& InLocation,
    bool bDrawWidget
)

Draws the translation widget.

Public function

void

 

Render_TranslateRotateZ

(
    const FSceneView* View,
    FPrimitiveDrawInterface* PDI,
    FEditorViewportClient* Viewpor...,
    const FVector& InLocation,
    bool bDrawWidget
)

Draws the Translate & Rotate Z widget.

Public function

void

 

RenderGrid

(
    const FSceneView* View,
    FPrimitiveDrawInterface* PDI,
    FEditorViewportClient* Viewpor...
)

Public function

void

 

ResetDeltaRotation()

Resets the total delta rotation back to zero

Public function

void

 

ResetInitialTranslationOffset()

Grab the initial offset again first time input is captured

Public function

void

 

SetCurrentAxis

(
    EAxisList::Type InCurrentAxis
)

Sets the axis currently being moused over.

Public function

void

 

SetDefaultVisibility

(
    bool bInDefaultVisibility
)

Sets the default visibility of the widget, if it is not overridden by an active editor mode tool.

Public function

void

 

SetDragging

(
    const bool InDragging
)

Sets if we are currently engaging the widget in dragging

Public function

void

 

SetDragStartPosition

(
    const FVector2D& Position
)

Public function

void

 

SetSnapEnabled

(
    const bool InSnapEnabled
)

Sets if we are currently engaging the widget in dragging

Public function

void

 

SetUsesEditorModeTools

(
    FEditorModeTools* InEditorMode...
)

Sets editor mode tools to use in this widget

Public function

void

 

UpdateDeltaRotation()

Updates the delta rotation on the widget

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

FGCObject interface: Serializes the widget reference so they dont get garbage collected.

Public function Virtual Const

FString

 

GetReferencerName()

Use this method to report a name for your referencer.

Enums

Name

Description

Public enum

EWidgetMode

Constants

Name

Description

AXIS_ARROW_SEGMENTS

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss