UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FWebBrowserViewport Class Reference

#include <WebBrowserViewport.h>

+ Inheritance diagram for FWebBrowserViewport:

Public Member Functions

 FWebBrowserViewport (TSharedPtr< IWebBrowserWindow > InWebBrowserWindow, bool InIsPopup=false)
 
 ~FWebBrowserViewport ()
 
virtual WEBBROWSER_API FIntPoint GetSize () const override
 
virtual WEBBROWSER_API FSlateShaderResourceGetViewportRenderTargetTexture () const override
 
virtual WEBBROWSER_API void Tick (const FGeometry &AllottedGeometry, double InCurrentTime, float DeltaTime) override
 
virtual WEBBROWSER_API bool RequiresVsync () const override
 
virtual WEBBROWSER_API FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) override
 
virtual WEBBROWSER_API FReply OnMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 
virtual WEBBROWSER_API FReply OnMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 
virtual WEBBROWSER_API void OnMouseEnter (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 
virtual WEBBROWSER_API void OnMouseLeave (const FPointerEvent &MouseEvent) override
 
virtual WEBBROWSER_API FReply OnMouseMove (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 
virtual WEBBROWSER_API FReply OnMouseWheel (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent) override
 
virtual WEBBROWSER_API FReply OnTouchGesture (const FGeometry &MyGeometry, const FPointerEvent &GestureEvent) override
 
virtual WEBBROWSER_API FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent) override
 
virtual WEBBROWSER_API FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 
virtual WEBBROWSER_API FReply OnKeyUp (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent) override
 
virtual WEBBROWSER_API FReply OnKeyChar (const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent) override
 
virtual WEBBROWSER_API FReply OnFocusReceived (const FFocusEvent &InFocusEvent) override
 
virtual WEBBROWSER_API void OnFocusLost (const FFocusEvent &InFocusEvent) override
 
- Public Member Functions inherited from ISlateViewport
virtual ~ISlateViewport ()
 
virtual void OnDrawViewport (const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, class FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled)
 
virtual EPixelFormat GetSceneTargetFormat () const
 
virtual bool IsViewportTextureAlphaOnly () const
 
virtual bool IsStereoscopic3D () const
 
virtual bool UseSeparateRenderTarget () const
 
virtual ESlateViewportDynamicRange GetViewportDynamicRange () const
 
virtual bool AllowScaling () const
 
virtual TOptional< TSharedRef< SWidget > > OnMapCursor (const FCursorReply &CursorReply)
 
virtual bool IsSoftwareCursorVisible () const
 
virtual FVector2D GetSoftwareCursorPosition () const
 
virtual FReply OnAnalogValueChanged (const FGeometry &MyGeometry, const FAnalogInputEvent &InAnalogInputEvent)
 
virtual FReply OnTouchStarted (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual FReply OnTouchMoved (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual FReply OnTouchEnded (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual FReply OnTouchForceChanged (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual FReply OnTouchFirstMove (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 
virtual FReply OnMotionDetected (const FGeometry &MyGeometry, const FMotionEvent &InMotionEvent)
 
virtual TOptional< boolOnQueryShowFocus (const EFocusCause InFocusCause) const
 
virtual void OnFinishedPointerInput ()
 
virtual FPopupMethodReply OnQueryPopupMethod () const
 
virtual FNavigationReply OnNavigation (const FGeometry &MyGeometry, const FNavigationEvent &InNavigationEvent)
 
virtual bool HandleNavigation (const uint32 InUserIndex, TSharedPtr< SWidget > InDestination)
 
virtual FReply OnRequestWindowClose ()
 
virtual void OnViewportClosed ()
 
virtual TWeakPtr< SWidgetGetWidget ()
 
virtual FReply OnViewportActivated (const FWindowActivateEvent &InActivateEvent)
 
virtual void OnViewportDeactivated (const FWindowActivateEvent &InActivateEvent)
 

Detailed Description

A Slate viewport to display a Web Browser Window

Constructor & Destructor Documentation

◆ FWebBrowserViewport()

FWebBrowserViewport::FWebBrowserViewport ( TSharedPtr< IWebBrowserWindow InWebBrowserWindow,
bool  InIsPopup = false 
)
inline

Default Constructor

Parameters
InWebBrowserWindowThe Web Browser Window this viewport will display
InViewportWidgetThe Widget displaying this viewport (needed to capture mouse)
InIsPopupUsed to initialize a viewport for showing browser popup menus instead of the main window.

◆ ~FWebBrowserViewport()

FWebBrowserViewport::~FWebBrowserViewport ( )
inline

Destructor.

Member Function Documentation

◆ GetSize()

FIntPoint FWebBrowserViewport::GetSize ( ) const
overridevirtual

Returns the size of the viewport

Implements ISlateViewport.

◆ GetViewportRenderTargetTexture()

FSlateShaderResource * FWebBrowserViewport::GetViewportRenderTargetTexture ( ) const
overridevirtual

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

Implements ISlateViewport.

◆ OnCursorQuery()

FCursorReply FWebBrowserViewport::OnCursorQuery ( const FGeometry MyGeometry,
const FPointerEvent CursorEvent 
)
overridevirtual

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

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

Reimplemented from ISlateViewport.

◆ OnFocusLost()

void FWebBrowserViewport::OnFocusLost ( const FFocusEvent InFocusEvent)
overridevirtual

Called when the viewport loses keyboard focus.

Parameters
InFocusEventInformation about what caused the viewport to lose focus

Reimplemented from ISlateViewport.

◆ OnFocusReceived()

FReply FWebBrowserViewport::OnFocusReceived ( const FFocusEvent InFocusEvent)
overridevirtual

Called when the viewport gains keyboard focus.

Parameters
InFocusEventInformation about what caused the viewport to gain focus

Reimplemented from ISlateViewport.

◆ OnKeyChar()

FReply FWebBrowserViewport::OnKeyChar ( const FGeometry MyGeometry,
const FCharacterEvent InCharacterEvent 
)
overridevirtual

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

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

Reimplemented from ISlateViewport.

◆ OnKeyDown()

FReply FWebBrowserViewport::OnKeyDown ( const FGeometry MyGeometry,
const FKeyEvent InKeyEvent 
)
overridevirtual

Called by Slate when a key is pressed inside the viewport

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

Reimplemented from ISlateViewport.

◆ OnKeyUp()

FReply FWebBrowserViewport::OnKeyUp ( const FGeometry MyGeometry,
const FKeyEvent InKeyEvent 
)
overridevirtual

Called by Slate when a key is released inside the viewport

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

Reimplemented from ISlateViewport.

◆ OnMouseButtonDoubleClick()

FReply FWebBrowserViewport::OnMouseButtonDoubleClick ( const FGeometry InMyGeometry,
const FPointerEvent InMouseEvent 
)
overridevirtual

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

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

Reimplemented from ISlateViewport.

◆ OnMouseButtonDown()

FReply FWebBrowserViewport::OnMouseButtonDown ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overridevirtual

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

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

Reimplemented from ISlateViewport.

◆ OnMouseButtonUp()

FReply FWebBrowserViewport::OnMouseButtonUp ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overridevirtual

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

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

Reimplemented from ISlateViewport.

◆ OnMouseEnter()

void FWebBrowserViewport::OnMouseEnter ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overridevirtual

Reimplemented from ISlateViewport.

◆ OnMouseLeave()

void FWebBrowserViewport::OnMouseLeave ( const FPointerEvent MouseEvent)
overridevirtual

Reimplemented from ISlateViewport.

◆ OnMouseMove()

FReply FWebBrowserViewport::OnMouseMove ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overridevirtual

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

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

Reimplemented from ISlateViewport.

◆ OnMouseWheel()

FReply FWebBrowserViewport::OnMouseWheel ( const FGeometry MyGeometry,
const FPointerEvent MouseEvent 
)
overridevirtual

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

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

Reimplemented from ISlateViewport.

◆ OnTouchGesture()

FReply FWebBrowserViewport::OnTouchGesture ( const FGeometry MyGeometry,
const FPointerEvent InGestureEvent 
)
overridevirtual

Called on a touchpad gesture event

Parameters
InGestureEventThe touch event generated

Reimplemented from ISlateViewport.

◆ RequiresVsync()

bool FWebBrowserViewport::RequiresVsync ( ) const
overridevirtual

Returns true if the viewport should be vsynced.

Implements ISlateViewport.

◆ Tick()

void FWebBrowserViewport::Tick ( const FGeometry AllottedGeometry,
double  InCurrentTime,
float  DeltaTime 
)
overridevirtual

Performs any ticking necessary by this handle

Reimplemented from ISlateViewport.


The documentation for this class was generated from the following files: