Navigation
API > API/Editor > API/Editor/UnrealEd
| Name | FWidget |
| Type | class |
| Header File | /Engine/Source/Editor/UnrealEd/Public/UnrealWidget.h |
| Include Path | #include "UnrealWidget.h" |
Syntax
class FWidget : public FGCObject
Inheritance Hierarchy
- FGCObject → FWidget
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FWidget() |
UnrealWidget.h |
Structs
| Name | Remarks |
|---|---|
| FAbsoluteMovementParams | |
| FThickArcParams |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AXIS_CIRCLE_SIDES | int32 | UnrealWidget.h | |
| AXIS_LENGTH | float | UnrealWidget.h | |
| AXIS_LENGTH_SCALE_OFFSET | float | UnrealWidget.h | |
| INNER_AXIS_CIRCLE_RADIUS | float | UnrealWidget.h | |
| OUTER_AXIS_CIRCLE_RADIUS | float | UnrealWidget.h | |
| ROTATION_TEXT_RADIUS | float | UnrealWidget.h | |
| TRANSLATE_ROTATE_AXIS_CIRCLE_RADIUS | float | UnrealWidget.h | |
| TWOD_AXIS_CIRCLE_RADIUS | float | UnrealWidget.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ArcBallColor | FColor | UnrealWidget.h | ||
| AxisColorX | FLinearColor | UnrealWidget.h | ||
| AxisColorY | FLinearColor | UnrealWidget.h | ||
| AxisColorZ | FLinearColor | UnrealWidget.h | ||
| AxisMaterialX | TObjectPtr< UMaterialInstanceDynamic > | UnrealWidget.h | ||
| AxisMaterialY | TObjectPtr< UMaterialInstanceDynamic > | UnrealWidget.h | ||
| AxisMaterialZ | TObjectPtr< UMaterialInstanceDynamic > | UnrealWidget.h | ||
| bAbsoluteTranslationInitialOffsetCached | bool | Whether Absolute Translation cache position has been captured | UnrealWidget.h | |
| bDefaultVisibility | bool | Default visibility for the widget if an Editor Mode Tool doesn't override it | UnrealWidget.h | |
| bDragging | bool | Whether or not the widget is actively dragging | UnrealWidget.h | |
| bIsOrthoDrawingFullRing | bool | Whether we are drawing the full ring in rotation mode (ortho viewports only) | UnrealWidget.h | |
| bSnapEnabled | bool | Whether or not snapping is enabled for all actors | UnrealWidget.h | |
| CurrentAxis | EAxisList::Type | The axis currently being moused over | UnrealWidget.h | |
| CurrentAxisMaterial | TObjectPtr< UMaterialInstanceDynamic > | UnrealWidget.h | ||
| CurrentColor | FColor | UnrealWidget.h | ||
| CurrentDeltaRotation | float | Current delta rotation applied to the rotation widget | UnrealWidget.h | |
| CustomCoordSystem | FMatrix | An extra matrix to apply to the widget before drawing it (allows for local/custom coordinate systems). | UnrealWidget.h | |
| CustomCoordSystemSpace | ECoordSystem | The space of the custom coord system | UnrealWidget.h | |
| DragStartPos | FVector2D | Drag start position in viewport space | UnrealWidget.h | |
| EditorModeTools | FEditorModeTools * | Any mode tools being used | UnrealWidget.h | |
| GridMaterial | TObjectPtr< UMaterialInterface > | UnrealWidget.h | ||
| HUDInfoPos | FVector2D | Location in the viewport to render the hud string | UnrealWidget.h | |
| HUDString | FString | String to be displayed on top of the viewport | UnrealWidget.h | |
| InitialTranslationOffset | FVector | The initial offset where the widget was first clicked | UnrealWidget.h | |
| InitialTranslationPosition | FVector | The initial position of the widget before it was clicked | UnrealWidget.h | |
| LastDragPos | FVector2D | Last mouse position in viewport space | UnrealWidget.h | |
| OpaquePlaneMaterialXY | TObjectPtr< UMaterialInstanceDynamic > | UnrealWidget.h | ||
| Origin | FVector2D | Viewport space origin location of the widget | UnrealWidget.h | |
| PlaneColorXY | FColor | UnrealWidget.h | ||
| ScreenAxisColor | FLinearColor | UnrealWidget.h | ||
| ScreenSpaceColor | FColor | UnrealWidget.h | ||
| TotalDeltaRotation | float | Total delta rotation applied since the widget was dragged | UnrealWidget.h | |
| TransparentPlaneMaterialXY | TObjectPtr< UMaterialInterface > | Materials and colors to be used when drawing the items for each axis | UnrealWidget.h | |
| XAxisDir | FVector2D | Viewport space direction vectors of the axes on the widget | UnrealWidget.h | |
| YAxisDir | FVector2D | UnrealWidget.h | ||
| ZAxisDir | FVector2D | UnrealWidget.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AbsoluteTranslationConvertMouseMovementToAxisMovement
(
FSceneView* InView, |
Absolute Translation conversion from mouse movement on the screen to widget axis movement/rotation. | UnrealWidget.h | |
void ConvertMouseMovementToAxisMovement
(
FSceneView* InView, |
Converts mouse movement on the screen to widget axis movement/rotation. | UnrealWidget.h | |
void DrawHUD
(
FCanvas* Canvas |
Renders any widget specific HUD text | UnrealWidget.h | |
EAxisList::Type GetAxisToDraw
(
UE::Widget::EWidgetMode WidgetMode |
Gets the axis to draw based on the current widget mode | UnrealWidget.h | |
EAxisList::Type GetCurrentAxis() |
UnrealWidget.h | ||
FVector2D GetOrigin() |
UnrealWidget.h | ||
bool IsDragging() |
Returns whether we are actively dragging | UnrealWidget.h | |
bool IsWidgetDisabled() |
UnrealWidget.h | ||
void Render
(
const FSceneView* View, |
UnrealWidget.h | ||
void ResetDeltaRotation() |
Resets the total delta rotation back to zero | UnrealWidget.h | |
void ResetInitialTranslationOffset() |
Grab the initial offset again first time input is captured | UnrealWidget.h | |
void SetCurrentAxis
(
EAxisList::Type InCurrentAxis |
Sets the axis currently being moused over. | UnrealWidget.h | |
void SetDefaultVisibility
(
bool bInDefaultVisibility |
Sets the default visibility of the widget, if it is not overridden by an active editor mode tool. | UnrealWidget.h | |
void SetDragging
(
const bool InDragging |
Sets if we are currently engaging the widget in dragging | UnrealWidget.h | |
void SetDragStartPosition
(
const FVector2D& Position |
UnrealWidget.h | ||
void SetSnapEnabled
(
const bool InSnapEnabled |
Sets if we are currently engaging the widget in dragging | UnrealWidget.h | |
void SetUsesEditorModeTools
(
FEditorModeTools* InEditorModeTools |
Sets editor mode tools to use in this widget | UnrealWidget.h | |
void UpdateDeltaRotation() |
Updates the delta rotation on the widget | UnrealWidget.h |
Overridden from FGCObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddReferencedObjects
(
FReferenceCollector& Collector |
FGCObject interface: Serializes the widget reference so they dont get garbage collected. | UnrealWidget.h | |
virtual FString GetReferencerName() |
UnrealWidget.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool AllowsAbsoluteRotationMovement
(
UE::Widget::EWidgetMode WidgetMode, |
Only some modes support Absolute Rotation Movement. | UnrealWidget.h | |
static bool AllowsAbsoluteTranslationMovement
(
UE::Widget::EWidgetMode WidgetMode |
Only some modes support Absolute Translation Movement. | UnrealWidget.h | |
static float GetRotationSpeed() |
UnrealWidget.h |