Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Slate
Inheritance Hierarchy
- FViewportFrame
- FViewport
- ISlateViewport
- IViewportRenderTargetProvider
- FSceneViewport
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/Slate/SceneViewport.h |
| Include | #include "Slate/SceneViewport.h" |
Syntax
class FSceneViewport :
public FViewportFrame,
public FViewport,
public ISlateViewport,
public IViewportRenderTargetProvider
Remarks
A viewport for use with SlateSViewport widgets.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FSceneViewport
(
FViewportClient* InViewportClient, |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| TSharedPtr< SWindow > | FindWindow () |
||
| const FGeometry & | Get the cached viewport geometry. | ||
| bool | |||
| TWeakPtr< SViewport > | |||
| bool | HasFixedSize () |
Does the viewport has a fixed size | |
| void | OnPlayWorldViewportSwapped
(
const FSceneViewport& OtherViewport |
Performs a resize when in swapping viewports while viewing the play world. | |
| void | PaintDebugCanvas
(
const FGeometry& AllottedGeometry, |
Adds a draw element for the debug canvas. | |
| void | SetDebugCanvas
(
TSharedPtr< class SDebugCanvas > InDebugCanvas |
Sets the debug canvas used to display FCanvas on top of this viewport | |
| void | SetFixedViewportSize
(
uint32 NewSizeX, |
||
| void | SetGammaOverride
(
const float InGammaOverride |
Set an optional display gamma to use for this viewport | |
| void | SetOnSceneViewportResizeDel
(
FOnSceneViewportResize InOnSceneViewportResize |
Sets the Viewport resize delegate. | |
| void | SetPlayInEditorGetsMouseControl
(
const bool bGetsMouseControl |
Sets whether a PIE viewport takes mouse control on startup. | |
| void | SetPlayInEditorIsSimulate
(
const bool bIsSimulate |
||
| void | SetRenderTargetTextureRenderThread
(
FTexture2DRHIRef& RT |
||
| void | SetViewportSize
(
uint32 NewSizeX, |
||
| void | SwapStatCommands
(
const FSceneViewport& OtherViewport |
Swaps the active stats with another viewports |
Overridden from FViewportFrame
| Type | Name | Description | |
|---|---|---|---|
| FViewport * | GetViewport () |
FViewportFrame interface | |
| void | ResizeFrame
(
uint32 NewSizeX, |
Called to resize the actual window where this viewport resides |
Overridden from FViewport
| Type | Name | Description | |
|---|---|---|---|
| void | BeginRenderFrame
(
FRHICommandListImmediate& RHICmdList |
Called when a frame starts to render | |
| void | CaptureMouse
(
bool bCapture |
||
| void | Invalidates the viewport's cached hit proxies at the end of the frame. | ||
| void | EndRenderFrame
(
FRHICommandListImmediate& RHICmdList, |
Called when a frame is done rendering | |
| void | EnqueueBeginRenderFrame
(
const bool bShouldPresent |
Called before BeginRenderFrame is enqueued | |
| void | EnqueueEndRenderFrame
(
const bool bLockToVsync, |
Ends a rendering frame. Called from the game thread. | |
| FCanvas * | |||
| void | GetMousePos
(
FIntPoint& MousePosition, |
Sets MousePosition to the current mouse position | |
| int32 | GetMouseX () |
||
| int32 | GetMouseY () |
||
| FIntPoint | Returns dimensions of RenderTarget texture. Can be called on a game thread. | ||
| FViewportFrame * | Retrieves the interface to the viewport's frame, if it has one. | ||
| void * | GetWindow () |
||
| bool | HasFocus () |
||
| bool | New MouseCapture/MouseLock API. | ||
| void | Called when the viewport should be invalidated and redrawn | ||
| bool | Returns true if the mouse cursor is currently visible | ||
| bool | |||
| bool | |||
| bool | Should return true, if stereo rendering is allowed in this viewport | ||
| bool | Returns the state of the provided key. | ||
| void | LockMouseToViewport
(
bool bLock |
||
| void | MoveWindow
(
int32 NewPosX, |
FViewport interface | |
| void | ProcessInput
(
float DeltaTime |
Additional input processing that happens every frame | |
| void | SetMouse
(
int32 X, |
Not implemented | |
| void | Sets PreCapture coordinates from the current position of the slate cursor. | ||
| void | SetRequiresVsync
(
bool bShouldVsync |
Indicate that the viewport should be block for vsync. | |
| void | SetSoftwareCursorPosition
(
FVector2D Position |
||
| bool | SetUserFocus
(
bool bFocus |
Captures or uncaptures the joystick | |
| void | ShowCursor
(
bool bVisible |
||
| void | ShowSoftwareCursor
(
bool bVisible |
||
| void | UpdateViewportRHI
(
bool bDestroyed, |
Updates the viewport RHI with a new size and fullscreen flag | |
| FIntPoint | ViewportToVirtualDesktopPixel
(
FVector2D ViewportCoordinate |
Transforms a coordinate in the local space of this viewport into a virtual desktop pixel. | |
| FVector2D | VirtualDesktopPixelToViewport
(
FIntPoint VirtualDesktopPointPx |
Transforms a virtual desktop pixel (the origin is in the primary screen's top left corner) to the local space of this viewport |
Overridden from FRenderTarget
| Type | Name | Description | |
|---|---|---|---|
| EDisplayColorGamut | |||
| float | |||
| EDisplayOutputFormat | |||
| const FTexture2DRHIRef & | Gets the proper RenderTarget based on the current thread | ||
| bool |
Overridden from ISlateViewport
| Type | Name | Description | |
|---|---|---|---|
| FIntPoint | GetSize () |
Returns the size of the viewport | |
| FVector2D | Returns the current position of the software cursor | ||
| FSlateShaderResource * | ISlateViewport interface | ||
| TWeakPtr< SWidget > | GetWidget () |
Gets the SWidget associated with this viewport | |
| bool | HandleNavigation
(
const uint32 InUserIndex, |
Give the viewport an opportunity to override the navigation behavior. | |
| FReply | OnAnalogValueChanged
(
const FGeometry& MyGeometry, |
Called when an analog value changes on a button that supports analog | |
| FCursorReply | OnCursorQuery
(
const FGeometry& MyGeometry, |
Called when Slate needs to know what the mouse cursor should be. | |
| 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. | |
| void | Called after all input for this frame is processed. | ||
| void | OnFocusLost
(
const FFocusEvent& InFocusEvent |
Called when the viewport loses keyboard focus. | |
| FReply | OnFocusReceived
(
const FFocusEvent& InFocusEvent |
Called when the viewport gains keyboard focus. | |
| FReply | OnKeyChar
(
const FGeometry& MyGeometry, |
Called by Slate when a character key is pressed while the viewport has focus | |
| FReply | Called by Slate when a key is pressed inside the viewport | ||
| FReply | Called by Slate when a key is released inside the viewport | ||
| 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. | |
| FReply | OnMotionDetected
(
const FGeometry& MyGeometry, |
Called when motion is detected (controller or device) e.g. Someone tilts or shakes their controller. | |
| FReply | OnMouseButtonDoubleClick
(
const FGeometry& InMyGeometry, |
Called by Slate when the mouse wheel is used inside the viewport | |
| FReply | OnMouseButtonDown
(
const FGeometry& MyGeometry, |
Called by Slate when a mouse button is pressed inside the viewport | |
| FReply | OnMouseButtonUp
(
const FGeometry& MyGeometry, |
Called by Slate when a mouse button is released inside the viewport | |
| void | OnMouseEnter
(
const FGeometry& MyGeometry, |
||
| void | OnMouseLeave
(
const FPointerEvent& MouseEvent |
||
| FReply | OnMouseMove
(
const FGeometry& MyGeometry, |
Called by Slate when a mouse button is released inside the viewport | |
| FReply | OnMouseWheel
(
const FGeometry& MyGeometry, |
Called by Slate when the mouse wheel is used inside the viewport | |
| FPopupMethodReply | Called to figure out whether we can make new windows for popups within this viewport. | ||
| TOptional< bool > | OnQueryShowFocus
(
const EFocusCause InFocusCause |
Called to determine if we should render the focus brush. | |
| FReply | Called when the top level window associated with the viewport has been requested to close. | ||
| FReply | OnTouchEnded
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is ended (finger lifted) | |
| FReply | OnTouchFirstMove
(
const FGeometry& MyGeometry, |
Called when a touchpad touch has first moved after initial press | |
| FReply | OnTouchForceChanged
(
const FGeometry& MyGeometry, |
Called when a touchpad touch force changes, but may or may not have moved | |
| FReply | OnTouchGesture
(
const FGeometry& MyGeometry, |
Called on a touchpad gesture event | |
| FReply | OnTouchMoved
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is moved (finger moved) | |
| FReply | OnTouchStarted
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is started (finger down) | |
| FReply | OnViewportActivated
(
const FWindowActivateEvent& InActivateEvent |
Called when the viewports top level window is being Activated | |
| void | Called when the viewport has been requested to close. | ||
| void | OnViewportDeactivated
(
const FWindowActivateEvent& InActivateEvent |
Called when the viewports top level window is being Deactivated | |
| bool | Returns true if the viewport should be vsynced. | ||
| void | Ticks the viewport |
Overridden from IViewportRenderTargetProvider
| Type | Name | Description | |
|---|---|---|---|
| FSlateShaderResource * |