Navigation
API > API/Runtime > API/Runtime/SlateCore
Viewport implementation interface that is used by SViewport when it needs to draw and processes input.
| Name | ISlateViewport |
| Type | class |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Rendering/RenderingCommon.h |
| Include Path | #include "Rendering/RenderingCommon.h" |
Syntax
class ISlateViewport
Derived Classes
ISlateViewport derived class hierarchy
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~ISlateViewport() |
Rendering/RenderingCommon.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool AllowScaling() |
Whether the viewport contents should be scaled or not. Defaults to true. | Rendering/RenderingCommon.h | |
virtual EPixelFormat GetSceneTargetFormat() |
Returns format for the scene of this viewport, only valid if this viewport actually has a scene, else PF_Unknown. | Rendering/RenderingCommon.h | |
FIntPoint GetSize() |
Returns the size of the viewport | Rendering/RenderingCommon.h | |
virtual FVector2D GetSoftwareCursorPosition() |
Returns the current position of the software cursor | Rendering/RenderingCommon.h | |
virtual ESlateViewportDynamicRange GetViewportDynamicRange() |
Does the texture contain SDR/HDR information | Rendering/RenderingCommon.h | |
FSlateShaderResource * GetViewportRenderTargetTexture() |
Returns a slate texture used to draw the rendered viewport in Slate. | Rendering/RenderingCommon.h | |
| Gets the SWidget associated with this viewport | Rendering/RenderingCommon.h | ||
virtual bool HandleNavigation
(
const uint32 InUserIndex, |
Give the viewport an opportunity to override the navigation behavior. | Rendering/RenderingCommon.h | |
virtual bool IsSoftwareCursorVisible() |
Returns whether the software cursor is currently visible | Rendering/RenderingCommon.h | |
virtual bool IsStereoscopic3D() |
Does the texture returned by GetViewportRenderTargetTexture represent a stereoscopic 3D target? | Rendering/RenderingCommon.h | |
virtual bool IsViewportTextureAlphaOnly() |
Does the texture returned by GetViewportRenderTargetTexture only have an alpha channel? | Rendering/RenderingCommon.h | |
virtual FReply OnAnalogValueChanged
(
const FGeometry& MyGeometry, |
Called when an analog value changes on a button that supports analog | Rendering/RenderingCommon.h | |
virtual FCursorReply OnCursorQuery
(
const FGeometry& MyGeometry, |
Called when Slate needs to know what the mouse cursor should be. | Rendering/RenderingCommon.h | |
virtual void OnDrawViewport
(
const FGeometry& AllottedGeometry, |
Called by Slate when the viewport widget is drawn Implementers of this interface can use this method to perform custom per draw functionality. | Rendering/RenderingCommon.h | |
virtual void OnFinishedPointerInput() |
Called after all input for this frame is processed. | Rendering/RenderingCommon.h | |
virtual void OnFocusLost
(
const FFocusEvent& InFocusEvent |
Called when the viewport loses keyboard focus. | Rendering/RenderingCommon.h | |
virtual FReply OnFocusReceived
(
const FFocusEvent& InFocusEvent |
Called when the viewport gains keyboard focus. | Rendering/RenderingCommon.h | |
virtual FReply OnKeyChar
(
const FGeometry& MyGeometry, |
Called by Slate when a character key is pressed while the viewport has focus | Rendering/RenderingCommon.h | |
| Called by Slate when a key is pressed inside the viewport | Rendering/RenderingCommon.h | ||
| Called by Slate when a key is released inside the viewport | Rendering/RenderingCommon.h | ||
virtual TOptional< TSharedRef< SWidget > > 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. | Rendering/RenderingCommon.h | |
virtual FReply OnMotionDetected
(
const FGeometry& MyGeometry, |
Called when motion is detected (controller or device) e.g. Someone tilts or shakes their controller. | Rendering/RenderingCommon.h | |
virtual FReply OnMouseButtonDoubleClick
(
const FGeometry& InMyGeometry, |
Called by Slate when the mouse wheel is used inside the viewport | Rendering/RenderingCommon.h | |
virtual FReply OnMouseButtonDown
(
const FGeometry& MyGeometry, |
Called by Slate when a mouse button is pressed inside the viewport | Rendering/RenderingCommon.h | |
virtual FReply OnMouseButtonUp
(
const FGeometry& MyGeometry, |
Called by Slate when a mouse button is released inside the viewport | Rendering/RenderingCommon.h | |
virtual void OnMouseEnter
(
const FGeometry& MyGeometry, |
Rendering/RenderingCommon.h | ||
virtual void OnMouseLeave
(
const FPointerEvent& MouseEvent |
Rendering/RenderingCommon.h | ||
virtual FReply OnMouseMove
(
const FGeometry& MyGeometry, |
Called by Slate when a mouse button is released inside the viewport | Rendering/RenderingCommon.h | |
virtual FReply OnMouseWheel
(
const FGeometry& MyGeometry, |
Called by Slate when the mouse wheel is used inside the viewport | Rendering/RenderingCommon.h | |
virtual FNavigationReply OnNavigation
(
const FGeometry& MyGeometry, |
Called when navigation is requested e.g. Left Joystick, Direction Pad, Arrow Keys can generate navigation events. | Rendering/RenderingCommon.h | |
virtual FPopupMethodReply OnQueryPopupMethod () |
Called to figure out whether we can make new windows for popups within this viewport. | Rendering/RenderingCommon.h | |
virtual TOptional< bool > OnQueryShowFocus
(
const EFocusCause InFocusCause |
Called to determine if we should render the focus brush. | Rendering/RenderingCommon.h | |
virtual FReply OnRequestWindowClose () |
Called when the top level window associated with the viewport has been requested to close. | Rendering/RenderingCommon.h | |
virtual FReply OnTouchEnded
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is ended (finger lifted) | Rendering/RenderingCommon.h | |
virtual FReply OnTouchFirstMove
(
const FGeometry& MyGeometry, |
Called when a touchpad touch has first moved after initial press | Rendering/RenderingCommon.h | |
virtual FReply OnTouchForceChanged
(
const FGeometry& MyGeometry, |
Called when a touchpad touch force changes, but may or may not have moved | Rendering/RenderingCommon.h | |
virtual FReply OnTouchGesture
(
const FGeometry& MyGeometry, |
Called on a touchpad gesture event | Rendering/RenderingCommon.h | |
virtual FReply OnTouchMoved
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is moved (finger moved) | Rendering/RenderingCommon.h | |
virtual FReply OnTouchStarted
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is started (finger down) | Rendering/RenderingCommon.h | |
virtual FReply OnViewportActivated
(
const FWindowActivateEvent& InActivateEvent |
Called when the viewports top level window is being Activated | Rendering/RenderingCommon.h | |
virtual void OnViewportClosed() |
Called when the viewport has been requested to close. | Rendering/RenderingCommon.h | |
virtual void OnViewportDeactivated
(
const FWindowActivateEvent& InActivateEvent |
Called when the viewports top level window is being Deactivated | Rendering/RenderingCommon.h | |
bool RequiresVsync() |
Returns true if the viewport should be vsynced. | Rendering/RenderingCommon.h | |
virtual void Tick
(
const FGeometry& AllottedGeometry, |
Performs any ticking necessary by this handle | Rendering/RenderingCommon.h | |
virtual bool UseSeparateRenderTarget() |
Is the viewport expected to render to GetViewportRenderTargetTexture? Or to the swapchain? | Rendering/RenderingCommon.h |