Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Widgets
Inheritance Hierarchy
References
| Module | Slate |
| Header | /Engine/Source/Runtime/Slate/Public/Widgets/SViewport.h |
| Include | #include "Widgets/SViewport.h" |
Syntax
class SViewport : public SCompoundWidget
Variables
| Type | Name | Description | |
|---|---|---|---|
| TWeakPtr< ISlateViewport > | ViewportInterface | Interface to the rendering and I/O implementation of the viewport. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
SViewport () |
Default constructor. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Construct
(
const FArguments& InArgs |
Construct the widget. | |
| void | EnableStereoRendering
(
const bool bInEnableStereoRendering |
Sets whether stereo rendering is allowed for this viewport. Advanced use only | |
| EActiveTimerReturnType | EnsureTick
(
double InCurrentTime, |
Empty active timer meant to ensure a tick/paint pass while this viewport is active | |
| const TSharedPtr< SWidget > | GetContent () |
||
| TSharedPtr< ICustomHitTestPath > | |||
| bool | |||
| TWeakPtr< ISlateViewport > | Sets the interface to be used by this viewport for rendering and I/O | ||
| bool | |||
| FReply | OnViewportActivated
(
const FWindowActivateEvent& InActivateEvent |
A delegate called when the viewports top level window is activated | |
| void | OnViewportDeactivated
(
const FWindowActivateEvent& InActivateEvent |
A delegate called when the viewports top level window is deactivated | |
| void | OnWindowClosed
(
const TSharedRef< SWindow >& InWindowBeingClosed |
A delegate called when the viewports top level window is being closed | |
| void | SetActive
(
bool bActive |
Sets whether this viewport is active. | |
| void | SetContent
(
TSharedPtr< SWidget > InContent |
Sets the content for this widget | |
| void | SetCustomHitTestPath
(
TSharedPtr< ICustomHitTestPath > CustomHitTestPath |
||
| void | SetIgnoreTextureAlpha
(
const bool bInIgnoreTextureAlpha |
If true, the viewport's texture alpha is ignored when performing blending. | |
| void | SetRenderDirectlyToWindow
(
const bool bInRenderDirectlyToWindow |
Sets whether this viewport can render directly to the back buffer. Advanced use only | |
| void | SetViewportInterface
(
TSharedRef< ISlateViewport > InViewportInterface |
Sets the interface to be used by this viewport for rendering and I/O | |
| bool |
Overridden from SWidget
| Type | Name | Description | |
|---|---|---|---|
| FVector2D | ComputeDesiredSize
(
float |
Computes the ideal size necessary to display this widget. | |
| FReply | OnAnalogValueChanged
(
const FGeometry& MyGeometry, |
Called when an analog value changes on a button that supports analog | |
| void | OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Compute the Geometry of all the children and add populate the ArrangedChildren list with their values. | |
| FCursorReply | OnCursorQuery
(
const FGeometry& MyGeometry, |
The system asks each widget under the mouse to provide a cursor. This event is bubbled. | |
| void | All the pointer (mouse, touch, stylus, etc.) events from this frame have been routed. | ||
| void | OnFocusLost
(
const FFocusEvent& InFocusEvent |
Called when this widget loses focus. This event does not bubble. | |
| FReply | OnFocusReceived
(
const FGeometry& MyGeometry, |
KEY INPUT Called when focus is given to this widget. This event does not bubble. | |
| FReply | OnKeyChar
(
const FGeometry& MyGeometry, |
Called after a character is entered while this widget has keyboard focus | |
| FReply | Called after a key is pressed when this widget has focus (this event bubbles if not handled) | ||
| FReply | Called after a key is released when this widget has focus | ||
| 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 when a mouse button is double clicked. Override this in derived classes. | |
| FReply | OnMouseButtonDown
(
const FGeometry& MyGeometry, |
MOUSE INPUT The system calls this method to notify the widget that a mouse button was pressed within it. | |
| FReply | OnMouseButtonUp
(
const FGeometry& MyGeometry, |
The system calls this method to notify the widget that a mouse button was release within it. | |
| void | OnMouseEnter
(
const FGeometry& MyGeometry, |
The system will use this event to notify a widget that the cursor has entered it. | |
| void | OnMouseLeave
(
const FPointerEvent& MouseEvent |
The system will use this event to notify a widget that the cursor has left it. | |
| FReply | OnMouseMove
(
const FGeometry& MyGeometry, |
The system calls this method to notify the widget that a mouse moved within it. | |
| FReply | OnMouseWheel
(
const FGeometry& MyGeometry, |
Called when the mouse wheel is spun. This event is bubbled. | |
| FNavigationReply | OnNavigation
(
const FGeometry& MyGeometry, |
Called when navigation is requested e.g. Left Joystick, Direction Pad, Arrow Keys can generate navigation events. | |
| int32 | OnPaint
(
const FPaintArgs& Args, |
The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. | |
| FPopupMethodReply | Popups can manifest in a NEW OS WINDOW or via an OVERLAY in an existing window. | ||
| TOptional< bool > | OnQueryShowFocus
(
const EFocusCause InFocusCause |
Called to determine if we should render the focus brush. | |
| FReply | OnTouchEnded
(
const FGeometry& MyGeometry, |
Called when a touchpad touch is ended (finger lifted) | |
| FReply | OnTouchFirstMove
(
const FGeometry& MyGeometry, |
Called when a touchpad touch first moves after TouchStarted | |
| FReply | OnTouchForceChanged
(
const FGeometry& MyGeometry, |
Called when a touchpad touch force changes | |
| FReply | OnTouchGesture
(
const FGeometry& MyGeometry, |
TOUCH and GESTURES Called when the user performs a gesture on trackpad. This event is bubbled. | |
| 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) | |
| bool | SViewport wants keyboard focus | ||
| void | Ticks this widget with Geometry. | ||
| TOptional< FVirtualPointerPosition > | TranslateMouseCoordinateForCustomHitTestChild
(
const SWidget& ChildWidget, |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FArguments |