ISlateViewport

Viewport implementation interface that is used by [SViewport](API\Runtime\Slate\Widgets\SViewport) when it needs to draw and processes input.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Rendering/RenderingCommon.h

Include

#include "Rendering/RenderingCommon.h"

Syntax

class ISlateViewport

Remarks

Viewport implementation interface that is used by SViewport when it needs to draw and processes input.

Destructors

Name Description

Public function Virtual

~ISlateViewport()

Functions

Name Description

Public function Virtual Const

bool

 

AllowScaling()

Whether the viewport contents should be scaled or not. Defaults to true.

Public function Const

FIntPoint

 

GetSize()

Returns the size of the viewport

Public function Virtual Const

FVector2D

 

GetSoftwareCursorPosition()

Returns the current position of the software cursor

Public function Const

FSlateShader...

 

GetViewportRenderTargetTexture()

Returns a slate texture used to draw the rendered viewport in Slate.

Public function Virtual

TWeakPtr< SW...

 

GetWidget()

Gets the SWidget associated with this viewport

Public function Virtual

bool

 

HandleNavigation

(
    const uint32 InUserIndex,
    TSharedPtr< SWidget > InDestination
)

Give the viewport an opportunity to override the navigation behavior.

Public function Virtual Const

bool

 

IsSoftwareCursorVisible()

Returns whether the software cursor is currently visible

Public function Virtual Const

bool

 

IsViewportTextureAlphaOnly()

Does the texture returned by GetViewportRenderTargetTexture only have an alpha channel?

Public function Virtual

FReply

 

OnAnalogValueChanged

(
    const FGeometry& MyGeometry,
    const FAnalogInputEvent& InAnalogI...
)

Called when an analog value changes on a button that supports analog

Public function Virtual

FCursorReply

 

OnCursorQuery

(
    const FGeometry& MyGeometry,
    const FPointerEvent& CursorEvent
)

Called when Slate needs to know what the mouse cursor should be.

Public function Virtual

void

 

OnDrawViewport

(
    const FGeometry& AllottedGeometry,
    const FSlateRect& MyCullingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

Called by Slate when the viewport widget is drawn Implementers of this interface can use this method to perform custom per draw functionality.

Public function Virtual

void

 

OnFinishedPointerInput()

Called after all input for this frame is processed.

Public function Virtual

void

 

OnFocusLost

(
    const FFocusEvent& InFocusEvent
)

Called when the viewport loses keyboard focus.

Public function Virtual

FReply

 

OnFocusReceived

(
    const FFocusEvent& InFocusEvent
)

Called when the viewport gains keyboard focus.

Public function Virtual

FReply

 

OnKeyChar

(
    const FGeometry& MyGeometry,
    const FCharacterEvent& InCharacter...
)

Called by Slate when a character key is pressed while the viewport has focus

Public function Virtual

FReply

 

OnKeyDown

(
    const FGeometry& MyGeometry,
    const FKeyEvent& InKeyEvent
)

Called by Slate when a key is pressed inside the viewport

Public function Virtual

FReply

 

OnKeyUp

(
    const FGeometry& MyGeometry,
    const FKeyEvent& InKeyEvent
)

Called by Slate when a key is released inside the viewport

Public function Virtual

TOptional< T...

 

OnMapCursor

(
    const FCursorReply& CursorReply
)

After OnCursorQuery has specified a cursor type the system asks each widget under the mouse to map that cursor to a widget.

Public function Virtual

FReply

 

OnMotionDetected

(
    const FGeometry& MyGeometry,
    const FMotionEvent& InMotionEvent
)

Called when motion is detected (controller or device) e.g. Someone tilts or shakes their controller.

Public function Virtual

FReply

 

OnMouseButtonDoubleClick

(
    const FGeometry& InMyGeometry,
    const FPointerEvent& InMouseEvent
)

Called by Slate when the mouse wheel is used inside the viewport

Public function Virtual

FReply

 

OnMouseButtonDown

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Called by Slate when a mouse button is pressed inside the viewport

Public function Virtual

FReply

 

OnMouseButtonUp

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Called by Slate when a mouse button is released inside the viewport

Public function Virtual

void

 

OnMouseEnter

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Public function Virtual

void

 

OnMouseLeave

(
    const FPointerEvent& MouseEvent
)

Public function Virtual

FReply

 

OnMouseMove

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Called by Slate when a mouse button is released inside the viewport

Public function Virtual

FReply

 

OnMouseWheel

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Called by Slate when the mouse wheel is used inside the viewport

Public function Virtual

FNavigationR...

 

OnNavigation

(
    const FGeometry& MyGeometry,
    const FNavigationEvent& InNavigati...
)

Called when navigation is requested e.g. Left Joystick, Direction Pad, Arrow Keys can generate navigation events.

Public function Virtual Const

FPopupMethod...

 

OnQueryPopupMethod()

Called to figure out whether we can make new windows for popups within this viewport.

Public function Virtual Const

TOptional< b...

 

OnQueryShowFocus

(
    const EFocusCause InFocusCause
)

Called to determine if we should render the focus brush.

Public function Virtual

FReply

 

OnRequestWindowClose()

Called when the top level window associated with the viewport has been requested to close.

Public function Virtual

FReply

 

OnTouchEnded

(
    const FGeometry& MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is ended (finger lifted)

Public function Virtual

FReply

 

OnTouchFirstMove

(
    const FGeometry& MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch has first moved after initial press

Public function Virtual

FReply

 

OnTouchForceChanged

(
    const FGeometry& MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch force changes, but may or may not have moved

Public function Virtual

FReply

 

OnTouchGesture

(
    const FGeometry& MyGeometry,
    const FPointerEvent& InGestureEven...
)

Called on a touchpad gesture event

Public function Virtual

FReply

 

OnTouchMoved

(
    const FGeometry& MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is moved (finger moved)

Public function Virtual

FReply

 

OnTouchStarted

(
    const FGeometry& MyGeometry,
    const FPointerEvent& InTouchEvent
)

Called when a touchpad touch is started (finger down)

Public function Virtual

FReply

 

OnViewportActivated

(
    const FWindowActivateEvent& InActi...
)

Called when the viewports top level window is being Activated

Public function Virtual

void

 

OnViewportClosed()

Called when the viewport has been requested to close.

Public function Virtual

void

 

OnViewportDeactivated

(
    const FWindowActivateEvent& InActi...
)

Called when the viewports top level window is being Deactivated

Public function Const

bool

 

RequiresVsync()

Returns true if the viewport should be vsynced.

Public function Virtual

void

 

Tick

(
    const FGeometry& AllottedGeometry,
    double InCurrentTime,
    float DeltaTime
)

Performs any ticking necessary by this handle

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