engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
ISlateViewport类 参考abstract

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

#include <RenderingCommon.h>

+ 类 ISlateViewport 继承关系图:

Public 成员函数

virtual bool AllowScaling () const
 Whether the viewport contents should be scaled or not. 更多...
 
virtual FIntPoint GetSize () const =0
 Returns the size of the viewport

 
virtual FVector2D GetSoftwareCursorPosition () const
 Returns the current position of the software cursor
 
virtual class FSlateShaderResource * GetViewportRenderTargetTexture () const =0
 Returns a slate texture used to draw the rendered viewport in Slate. 更多...
 
virtual TWeakPtr< SWidget > GetWidget ()
 Gets the SWidget associated with this viewport
 
virtual bool HandleNavigation (const uint32 InUserIndex, TSharedPtr< SWidget > InDestination)
 Give the viewport an opportunity to override the navigation behavior. 更多...
 
virtual bool IsSoftwareCursorVisible () const
 Returns whether the software cursor is currently visible
 
virtual bool IsViewportTextureAlphaOnly () const
 Does the texture returned by GetViewportRenderTargetTexture only have an alpha channel?
 
virtual FReply OnAnalogValueChanged (const FGeometry &MyGeometry, const FAnalogInputEvent &InAnalogInputEvent)
 Called when an analog value changes on a button that supports analog 更多...
 
virtual FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent)
 Called when Slate needs to know what the mouse cursor should be. 更多...
 
virtual void OnDrawViewport (const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, class FSlateWindowElementList &OutDrawElements, 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. 更多...
 
virtual void OnFinishedPointerInput ()
 Called after all input for this frame is processed.
 
virtual void OnFocusLost (const FFocusEvent &InFocusEvent)
 Called when the viewport loses keyboard focus. 更多...
 
virtual FReply OnFocusReceived (const FFocusEvent &InFocusEvent)
 Called when the viewport gains keyboard focus. 更多...
 
virtual FReply OnKeyChar (const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent)
 Called by Slate when a character key is pressed while the viewport has focus 更多...
 
virtual FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called by Slate when a key is pressed inside the viewport 更多...
 
virtual FReply OnKeyUp (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called by Slate when a key is released inside the viewport 更多...
 
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. 更多...
 
virtual FReply OnMotionDetected (const FGeometry &MyGeometry, const FMotionEvent &InMotionEvent)
 Called when motion is detected (controller or device) e.g. 更多...
 
virtual FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent)
 Called by Slate when the mouse wheel is used inside the viewport 更多...
 
virtual FReply OnMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called by Slate when a mouse button is pressed inside the viewport 更多...
 
virtual FReply OnMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called by Slate when a mouse button is released inside the viewport 更多...
 
virtual FReply OnMouseMove (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called by Slate when a mouse button is released inside the viewport 更多...
 
virtual FReply OnMouseWheel (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called by Slate when the mouse wheel is used inside the viewport 更多...
 
virtual FNavigationReply OnNavigation (const FGeometry &MyGeometry, const FNavigationEvent &InNavigationEvent)
 Called when navigation is requested e.g. 更多...
 
virtual FPopupMethodReply OnQueryPopupMethod () const
 Called to figure out whether we can make new windows for popups within this viewport. 更多...
 
virtual TOptional< bool > OnQueryShowFocus (const EFocusCause InFocusCause) const
 Called to determine if we should render the focus brush. 更多...
 
virtual FReply OnRequestWindowClose ()
 Called when the top level window associated with the viewport has been requested to close. 更多...
 
virtual FReply OnTouchEnded (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is ended (finger lifted) 更多...
 
virtual FReply OnTouchFirstMove (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch has first moved after initial press 更多...
 
virtual FReply OnTouchForceChanged (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch force changes, but may or may not have moved 更多...
 
virtual FReply OnTouchGesture (const FGeometry &MyGeometry, const FPointerEvent &InGestureEvent)
 Called on a touchpad gesture event 更多...
 
virtual FReply OnTouchMoved (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is moved (finger moved) 更多...
 
virtual FReply OnTouchStarted (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is started (finger down) 更多...
 
virtual FReply OnViewportActivated (const FWindowActivateEvent &InActivateEvent)
 Called when the viewports top level window is being Activated
 
virtual void OnViewportClosed ()
 Called when the viewport has been requested to close.
 
virtual void OnViewportDeactivated (const FWindowActivateEvent &InActivateEvent)
 Called when the viewports top level window is being Deactivated
 
virtual bool RequiresVsync () const =0
 Returns true if the viewport should be vsynced.
 
virtual void Tick (const FGeometry &AllottedGeometry, double InCurrentTime, float DeltaTime)
 Performs any ticking necessary by this handle

 

详细描述

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


成员函数说明

◆ AllowScaling()

virtual bool ISlateViewport::AllowScaling ( ) const
inlinevirtual

Whether the viewport contents should be scaled or not.

Defaults to true.

◆ GetViewportRenderTargetTexture()

virtual class FSlateShaderResource * ISlateViewport::GetViewportRenderTargetTexture ( ) const
pure virtual

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


在 FSceneViewport, FMovieViewport , 以及 FWebBrowserViewport 内被实现.

◆ HandleNavigation()

virtual bool ISlateViewport::HandleNavigation ( const uint32  InUserIndex,
TSharedPtr< SWidget >  InDestination 
)
inlinevirtual

Give the viewport an opportunity to override the navigation behavior.

This is called after all the navigation event bubbling is complete and we know a destination.

参数
InDestinationThe destination widget
返回
whether we handled the navigation

被 FSceneViewport 重载.

◆ OnAnalogValueChanged()

virtual FReply ISlateViewport::OnAnalogValueChanged ( const FGeometry &  MyGeometry,
const FAnalogInputEvent &  InAnalogInputEvent 
)
inlinevirtual

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

参数
MyGeometryThe Geometry of the widget receiving the event
InAnalogInputEventAnalog input event
返回
Returns whether the event was handled, along with other possible actions

被 FSceneViewport 重载.

◆ OnCursorQuery()

virtual FCursorReply ISlateViewport::OnCursorQuery ( const FGeometry &  MyGeometry,
const FPointerEvent &  CursorEvent 
)
inlinevirtual

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

返回
FCursorReply::Unhandled() if the event is not handled; FCursorReply::Cursor() otherwise.

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnDrawViewport()

virtual void ISlateViewport::OnDrawViewport ( const FGeometry &  AllottedGeometry,
const FSlateRect &  MyCullingRect,
class FSlateWindowElementList &  OutDrawElements,
int32  LayerId,
const FWidgetStyle &  InWidgetStyle,
bool  bParentEnabled 
)
inlinevirtual

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

This is only called if the widget is visible

参数
AllottedGeometryThe geometry of the viewport widget

被 FSceneViewport 重载.

◆ OnFocusLost()

virtual void ISlateViewport::OnFocusLost ( const FFocusEvent &  InFocusEvent)
inlinevirtual

Called when the viewport loses keyboard focus.


参数
InFocusEventInformation about what caused the viewport to lose focus

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnFocusReceived()

virtual FReply ISlateViewport::OnFocusReceived ( const FFocusEvent &  InFocusEvent)
inlinevirtual

Called when the viewport gains keyboard focus.


参数
InFocusEventInformation about what caused the viewport to gain focus

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnKeyChar()

virtual FReply ISlateViewport::OnKeyChar ( const FGeometry &  MyGeometry,
const FCharacterEvent &  InCharacterEvent 
)
inlinevirtual

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

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the character that was pressed
返回
Whether the event was handled along with possible requests for the system to take action.

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnKeyDown()

virtual FReply ISlateViewport::OnKeyDown ( const FGeometry &  MyGeometry,
const FKeyEvent &  InKeyEvent 
)
inlinevirtual

Called by Slate when a key is pressed inside the viewport

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the key event
返回
Whether the event was handled along with possible requests for the system to take action.

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnKeyUp()

virtual FReply ISlateViewport::OnKeyUp ( const FGeometry &  MyGeometry,
const FKeyEvent &  InKeyEvent 
)
inlinevirtual

Called by Slate when a key is released inside the viewport

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the key event
返回
Whether the event was handled along with possible requests for the system to take action.

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnMapCursor()

virtual TOptional< TSharedRef< SWidget > > ISlateViewport::OnMapCursor ( const FCursorReply &  CursorReply)
inlinevirtual

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

This event is bubbled.

返回
TOptional<TSharedRef<SWidget>>() if you don't have a mapping otherwise return the Widget to show.

被 FSceneViewport 重载.

◆ OnMotionDetected()

virtual FReply ISlateViewport::OnMotionDetected ( const FGeometry &  MyGeometry,
const FMotionEvent &  InMotionEvent 
)
inlinevirtual

Called when motion is detected (controller or device) e.g.

Someone tilts or shakes their controller.

参数
InMotionEventThe motion event generated

被 FSceneViewport 重载.

◆ OnMouseButtonDoubleClick()

virtual FReply ISlateViewport::OnMouseButtonDoubleClick ( const FGeometry &  InMyGeometry,
const FPointerEvent &  InMouseEvent 
)
inlinevirtual

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

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the mouse event
返回
Whether the event was handled along with possible requests for the system to take action.

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnMouseButtonDown()

virtual FReply ISlateViewport::OnMouseButtonDown ( const FGeometry &  MyGeometry,
const FPointerEvent &  MouseEvent 
)
inlinevirtual

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

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the mouse event
返回
Whether the event was handled along with possible requests for the system to take action.

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnMouseButtonUp()

virtual FReply ISlateViewport::OnMouseButtonUp ( const FGeometry &  MyGeometry,
const FPointerEvent &  MouseEvent 
)
inlinevirtual

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

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the mouse event
返回
Whether the event was handled along with possible requests for the system to take action.

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnMouseMove()

virtual FReply ISlateViewport::OnMouseMove ( const FGeometry &  MyGeometry,
const FPointerEvent &  MouseEvent 
)
inlinevirtual

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

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the mouse event
返回
Whether the event was handled along with possible requests for the system to take action.

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnMouseWheel()

virtual FReply ISlateViewport::OnMouseWheel ( const FGeometry &  MyGeometry,
const FPointerEvent &  MouseEvent 
)
inlinevirtual

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

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the mouse event
返回
Whether the event was handled along with possible requests for the system to take action.

被 FSceneViewport , 以及 FWebBrowserViewport 重载.

◆ OnNavigation()

virtual FNavigationReply ISlateViewport::OnNavigation ( const FGeometry &  MyGeometry,
const FNavigationEvent &  InNavigationEvent 
)
inlinevirtual

Called when navigation is requested e.g.

Left Joystick, Direction Pad, Arrow Keys can generate navigation events.

参数
InNavigationEventThe navigation event generated

◆ OnQueryPopupMethod()

virtual FPopupMethodReply ISlateViewport::OnQueryPopupMethod ( ) const
inlinevirtual

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

Making windows allows us to have popups that go outside the parent window, but cannot be used in fullscreen and do not have per-pixel alpha.

被 FSceneViewport 重载.

◆ OnQueryShowFocus()

virtual TOptional< bool > ISlateViewport::OnQueryShowFocus ( const EFocusCause  InFocusCause) const
inlinevirtual

Called to determine if we should render the focus brush.

参数
InFocusCauseThe cause of focus

被 FSceneViewport 重载.

◆ OnRequestWindowClose()

virtual FReply ISlateViewport::OnRequestWindowClose ( )
inlinevirtual

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

At this point, the viewport has not been closed and the operation may be canceled. This may not called from PIE, Editor Windows, on consoles, or before the game ends from other methods. This is only when the platform specific window is closed.

返回
FReply::Handled if the close event was consumed (and the window should remain open).

被 FSceneViewport 重载.

◆ OnTouchEnded()

virtual FReply ISlateViewport::OnTouchEnded ( const FGeometry &  MyGeometry,
const FPointerEvent &  InTouchEvent 
)
inlinevirtual

Called when a touchpad touch is ended (finger lifted)

参数
ControllerEventThe controller event generated

被 FSceneViewport 重载.

◆ OnTouchFirstMove()

virtual FReply ISlateViewport::OnTouchFirstMove ( const FGeometry &  MyGeometry,
const FPointerEvent &  InTouchEvent 
)
inlinevirtual

Called when a touchpad touch has first moved after initial press

参数
ControllerEventThe controller event generated

被 FSceneViewport 重载.

◆ OnTouchForceChanged()

virtual FReply ISlateViewport::OnTouchForceChanged ( const FGeometry &  MyGeometry,
const FPointerEvent &  InTouchEvent 
)
inlinevirtual

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

参数
ControllerEventThe controller event generated

被 FSceneViewport 重载.

◆ OnTouchGesture()

virtual FReply ISlateViewport::OnTouchGesture ( const FGeometry &  MyGeometry,
const FPointerEvent &  InGestureEvent 
)
inlinevirtual

Called on a touchpad gesture event

参数
InGestureEventThe touch event generated

被 FSceneViewport 重载.

◆ OnTouchMoved()

virtual FReply ISlateViewport::OnTouchMoved ( const FGeometry &  MyGeometry,
const FPointerEvent &  InTouchEvent 
)
inlinevirtual

Called when a touchpad touch is moved (finger moved)

参数
ControllerEventThe controller event generated

被 FSceneViewport 重载.

◆ OnTouchStarted()

virtual FReply ISlateViewport::OnTouchStarted ( const FGeometry &  MyGeometry,
const FPointerEvent &  InTouchEvent 
)
inlinevirtual

Called when a touchpad touch is started (finger down)

参数
ControllerEventThe controller event generated

被 FSceneViewport 重载.


该类的文档由以下文件生成: