UCefView
Loading...
Searching...
No Matches
SCefView

Represents a Slate widget that hosts a CEF browser. More...

#include <SCefView.h>

Classes

struct  FArguments
 Represents the construction arguments of SCefView. More...
 

Public Types

using FOnLoadStateChangedEvent = (*)( const int64& InBrowserId , bool bInIsLoading , bool bInCanGoBack , bool bInCanGoForward )
 The callback type of loading state changed.
 
using FOnLoadStartEvent = (*)( const int64& , const FCefFrameId& , bool , int )
 The callback type of loading starts.
 
using FOnLoadEndEvent = (*)( const int64& InBrowserId , const FCefFrameId& InFrameId , bool bInIsMainFrame , int InHttpStatusCode )
 The callback type of loading ends.
 
using FOnLoadErrorEvent = void(*)( const int64& InBrowserId , const FCefFrameId& InFrameId , bool bInIsMainFrame , int InErrorCode , const FString& InErrorMsg , const FString& InOutFailedUrl , bool& InOutHandled )
 The callback type of loading failed due to error.
 
using FOnDraggableRegionChangedEvent = void(*)( const FVector4& InDraggableRegion , const FVector4& InNonDraggableRegion )
 The callback type of draggable region changed.
 
using FOnAddressChangedEvent = void(*)( const FCefFrameId& InFrameId , const FString& InUrl )
 The callback type of the address changed.
 
using FOnTitleChangedEvent = void(*)( const FString& InTitle )
 The callback type of title changed.
 
using FOnFaviconUrlChangedEvent = void(*)( const TArray<FString>& InUrls )
 The callback type of favicon URL changed.
 
using FOnFullscreenModeChangedEvent = void(*)( bool bInIsFullscreen )
 The callback type of fullscreen mode changed.
 
using FOnStatusMessageEvent = void(*)( const FString& InMessage )
 The callback type of status message changed.
 
using FOnConsoleMessageEvent = void(*)( const FString& InMessage , int32 InLevel )
 The callback type of console message from the web content.
 
using FOnLoadingProgressChangedEvent = void(*)( double InProgress )
 The callback type of loading progress changed.
 
using FOnUrlRequestEvent = void(*)( const int64& InBrowserId , const FCefFrameId& InFrameId , const FString& InQuery )
 The callback type of built-in scheme URL access.
 
using FOnQueryRequestEvent = (*)( const int64& InBrowserId , const FCefFrameId& InFrameId , const int64& InQueryId , const FString& InRequest )
 The callback type of new UCefQuery request.
 
using FOnInvokeMethodEvent = (*)( const int64& InBrowserId , const FCefFrameId& InFrameId , const FString& InMethod , const TArray<TSharedPtr<FJsonValue>>& InArguments )
 The callback type of invoking method request from web content (JavaScript).
 
using FOnReportJavascriptResultEvent = (*)( const int64& InBrowserId , const FCefFrameId& InFrameId , const FString& InContext , const TSharedPtr<FJsonValue>& InResult )
 The callback type of the result of the JavaScript executed with executeJavascriptWithResult returned.
 
using FOnNativeBrowserCreatedEvent = void(*)()
 The callback type of the native browser window created event. This callback does not work for OSR mode.
 

Public Member Functions

 SCefView ()
 Constructor.
 
 ~SCefView ()
 Destructor.
 
void Construct (const FArguments &InArgs)
 Construct function.
 
void SetUrl (const FString &InUrl)
 Sets the URL.
 
void SetSettings (const FCefViewSettings &InSettings)
 Sets the settings.
 
void CreateNativeBrowser (const UCefContext *InCefContext)
 Creates the native browser.
 
void DestroyNativeBrowser ()
 Destroys the native browser.
 
void SetVisibility (TAttribute< EVisibility > InVisibility) override
 Sets the visibility.
 
bool IsDragAndDropEnabled () const
 Gets whether drag and drop is enabled.
 
void AddLocalFolderResource (const FString &InFolderPath, const FString &InTargetUrl, int32 InPriority=0)
 Adds a URL mapping item with a local web resource directory.
 
void AddArchiveFileResource (const FString &InArchivePath, const FString &InTargetUrl, const FString &InPassword="", int32 InPriority=0)
 Adds a URL mapping item with a local archive (.zip) file which contains the web resource.
 
int64 GetBrowserId ()
 Gets the browser ID.
 
void NavigateToUrl (const FString &InTargetUrl)
 Navigates to the URL.
 
bool BrowserCanGoBack ()
 Checks whether the browser can go back.
 
bool BrowserCanGoForward ()
 Checks whether the browser can go forward.
 
void BrowserGoBack ()
 Requires the browser to go back.
 
void BrowserGoForward ()
 Requires the browser to go forward.
 
bool IsBrowserLoading ()
 Checks whether the browser is loading.
 
void BrowserReload ()
 Requires the browser to reload.
 
void BrowserStopLoad ()
 Requires the browser to stop loading.
 
bool TriggerEventForFrame (const FString &InName, const TArray< TSharedPtr< FJsonValue > > &InArgs, const FCefFrameId &InFrameId)
 Triggers an event for a specific frame.
 
bool TriggerEventForMainFrame (const FString &InName, const TArray< TSharedPtr< FJsonValue > > &InArgs)
 Triggers an event for the main frame.
 
bool BroadcastEvent (const FString &InName, const TArray< TSharedPtr< FJsonValue > > &InArgs)
 Broadcasts an event to all frames.
 
bool ResponseUCefQuery (const int64 InQueryId, const bool bInIsSuccess, const FString &InResponse, const int32 InError)
 Responds to a UCefQuery.
 
bool ExecuteJavascript (const FCefFrameId &InFrameId, const FString &InJavascriptCode, const FString &InTargetUrl)
 Executes JavaScript code in a specific frame.
 
bool ExecuteJavascriptWithResult (const FCefFrameId &InFrameId, const FString &InJavascriptCode, const FString &InTargetUrl, const FString &InExecuteContext)
 Executes JavaScript code in a specific frame and returns the result.
 
bool SetPreference (const FString &InPreferenceName, const FString &InPreferenceValue, FString &OutError)
 Sets a preference.
 
void SetDisablePopupContextMenu (bool bInIsDisable)
 Sets whether to disable the context menu for a pop-up browser.
 
bool IsPopupContextMenuDisabled ()
 Gets whether the context menu is disabled for a pop-up browser.
 
bool HasDevTools ()
 Detects whether this browser has dev-tools opened.
 
void ShowDevTools ()
 Opens the dev-tools dialog.
 
void CloseDevTools ()
 Closes the dev-tools dialog.
 

Static Public Attributes

static const FCefFrameId MainFrameID
 The main frame identity.
 
static const FCefFrameId AllFrameID
 The identifier for all frames.
 

Protected Member Functions

void OnNewBrowser (const FCefFrameId &InSourceFrameId, const FString &InTargetUrl, const FString &InFrameName, ECefWindowOpenDisposition InTargetDisposition, FIntRect &InDesiredRect)
 Called when a new browser is created.
 
bool OnNewPopup (const FCefFrameId &InSourceFrameId, const FString &InTargetUrl, FString &InFrameName, ECefWindowOpenDisposition InTargetDisposition, FIntRect &InDesiredRect, FCefViewSettings &InBrowserSettings, bool &bInDisableJavascriptAccess)
 Gets called before the pop-up browser is created (only for browser created by JavaScript).
 
bool OnRequestCloseFromWeb ()
 The callback type of close request from web.
 
void Tick (const FGeometry &InAllottedGeometry, const double InCurrentTime, const float InDeltaTime) override
 Tick function.
 
FChildren * GetChildren () override
 GetChildren function.
 
void OnArrangeChildren (const FGeometry &InAllottedGeometry, FArrangedChildren &InArrangedChildren) const override
 OnArrangeChildren function.
 
FVector2D ComputeDesiredSize (float InLayoutScaleMultiplier) const override
 ComputeDesiredSize function.
 
int32 OnPaint (const FPaintArgs &InArgs, const FGeometry &InAllottedGeometry, const FSlateRect &InMyCullingRect, FSlateWindowElementList &InOutDrawElements, int32 InLayerId, const FWidgetStyle &InWidgetStyle, bool bInParentEnabled) const override
 OnPaint function.
 
TOptional< TSharedRef< SWidget > > OnMapCursor (const FCursorReply &InCursorReply) const
 OnMapCursor function.
 
bool SupportsKeyboardFocus () const override
 SupportsKeyboardFocus function.
 
FReply OnFocusReceived (const FGeometry &InGeometry, const FFocusEvent &InFocusEvent) override
 OnFocusReceived function.
 
void OnFocusLost (const FFocusEvent &InFocusEvent) override
 OnFocusLost function.
 
FNavigationReply OnNavigation (const FGeometry &InGeometry, const FNavigationEvent &InNavigationEvent) override
 OnNavigation function.
 
void OnMouseEnter (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 OnMouseEnter function.
 
void OnMouseLeave (const FPointerEvent &InMouseEvent) override
 OnMouseLeave function.
 
FReply OnMouseMove (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 OnMouseMove function.
 
FReply OnPreviewMouseButtonDown (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 OnPreviewMouseButtonDown function.
 
FReply OnMouseButtonDown (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 OnMouseButtonDown function.
 
FReply OnMouseButtonUp (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 OnMouseButtonUp function.
 
FReply OnMouseButtonDoubleClick (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 OnMouseButtonDoubleClick function.
 
FReply OnMouseWheel (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 OnMouseWheel function.
 
FReply OnPreviewKeyDown (const FGeometry &InGeometry, const FKeyEvent &InKeyEvent) override
 OnPreviewKeyDown function.
 
FReply OnKeyDown (const FGeometry &InGeometry, const FKeyEvent &InKeyEvent) override
 OnKeyDown function.
 
FReply OnKeyChar (const FGeometry &InGeometry, const FCharacterEvent &InCharacterEvent) override
 OnKeyChar function.
 
FReply OnKeyUp (const FGeometry &InGeometry, const FKeyEvent &InKeyEvent) override
 OnKeyUp function.
 

Protected Attributes

FOnLoadStateChangedEvent OnLoadStateChanged
 On load state changed event.
 
FOnLoadStartEvent OnLoadStart
 On load start event.
 
FOnLoadEndEvent OnLoadEnd
 On load end event.
 
FOnLoadErrorEvent OnLoadError
 On load error event.
 
FOnDraggableRegionChangedEvent OnDraggableRegionChanged
 On draggable region changed event.
 
FOnAddressChangedEvent OnAddressChanged
 On address changed event.
 
FOnTitleChangedEvent OnTitleChanged
 On title changed event.
 
FOnFaviconUrlChangedEvent OnFaviconUrlChanged
 On favicon URL changed event.
 
FOnFullscreenModeChangedEvent OnFullscreenModeChanged
 On fullscreen mode changed event.
 
FOnStatusMessageEvent OnStatusMessage
 On status message event.
 
FOnConsoleMessageEvent OnConsoleMessage
 On console message event.
 
FOnLoadingProgressChangedEvent OnLoadingProgressChanged
 On loading progress changed event.
 
FOnUrlRequestEvent OnUrlRequest
 On URL request event.
 
FOnQueryRequestEvent OnQueryRequest
 On query request event.
 
FOnInvokeMethodEvent OnInvokeMethod
 On invoke method event.
 
FOnReportJavascriptResultEvent OnReportJavascriptResult
 On report JavaScript result event.
 
FOnNativeBrowserCreatedEvent OnNativeBrowserCreated
 On native browser created event.
 
FSingleWidgetChildrenWithSlot JSDialogContainerSlot
 JSDialogContainerSlot.
 

Detailed Description

Represents a Slate widget that hosts a CEF browser.

Member Typedef Documentation

◆ FOnAddressChangedEvent

using SCefView::FOnAddressChangedEvent = void(*)( const FCefFrameId& InFrameId , const FString& InUrl )

The callback type of the address changed.

Parameters
InFrameIdThe frame ID.
InUrlThe address.

◆ FOnConsoleMessageEvent

using SCefView::FOnConsoleMessageEvent = void(*)( const FString& InMessage , int32 InLevel )

The callback type of console message from the web content.

Parameters
InMessageThe message.
InLevelThe level.

◆ FOnDraggableRegionChangedEvent

using SCefView::FOnDraggableRegionChangedEvent = void(*)( const FVector4& InDraggableRegion , const FVector4& InNonDraggableRegion )

The callback type of draggable region changed.

Parameters
InDraggableRegionThe new draggable region.
InNonDraggableRegionThe new non-draggable region.

◆ FOnFaviconUrlChangedEvent

using SCefView::FOnFaviconUrlChangedEvent = void(*)( const TArray<FString>& InUrls )

The callback type of favicon URL changed.

Parameters
InUrlsThe URLs.

◆ FOnFullscreenModeChangedEvent

using SCefView::FOnFullscreenModeChangedEvent = void(*)( bool bInIsFullscreen )

The callback type of fullscreen mode changed.

Parameters
bInIsFullscreenThe current fullscreen mode.

◆ FOnInvokeMethodEvent

using SCefView::FOnInvokeMethodEvent = (*)( const int64& InBrowserId , const FCefFrameId& InFrameId , const FString& InMethod , const TArray<TSharedPtr<FJsonValue>>& InArguments )

The callback type of invoking method request from web content (JavaScript).

Parameters
InBrowserIdThe browser ID.
InFrameIdThe frame ID.
InMethodThe method name.
InArgumentsThe arguments list.

◆ FOnLoadEndEvent

using SCefView::FOnLoadEndEvent = (*)( const int64& InBrowserId , const FCefFrameId& InFrameId , bool bInIsMainFrame , int InHttpStatusCode )

The callback type of loading ends.

Parameters
InBrowserIdIndicates the browser ID.
InFrameIdIndicates the frame ID.
bInIsMainFrameIndicates whether this is the main frame.
InHttpStatusCodeThe HTTP status code.

◆ FOnLoadErrorEvent

using SCefView::FOnLoadErrorEvent = void(*)( const int64& InBrowserId , const FCefFrameId& InFrameId , bool bInIsMainFrame , int InErrorCode , const FString& InErrorMsg , const FString& InOutFailedUrl , bool& InOutHandled )

The callback type of loading failed due to error.

Parameters
InBrowserIdIndicates the browser ID.
InFrameIdIndicates the frame ID.
bInIsMainFrameIndicates whether this is the main frame.
InErrorCodeThe error code.
InErrorMsgThe error message.
InFailedUrlThe URL that caused the failure.
InOutHandledWhether this error was handled or not.

◆ FOnLoadingProgressChangedEvent

using SCefView::FOnLoadingProgressChangedEvent = void(*)( double InProgress )

The callback type of loading progress changed.

Parameters
InProgressCurrent progress.

◆ FOnLoadStartEvent

using SCefView::FOnLoadStartEvent = (*)( const int64& , const FCefFrameId& , bool , int )

The callback type of loading starts.

Parameters
InBrowserIdIndicates the browser ID.
InFrameIdIndicates the frame ID.
bInIsMainFrameIndicates whether this is the main frame.
InTransitionTypeTransition type.

◆ FOnLoadStateChangedEvent

using SCefView::FOnLoadStateChangedEvent = (*)( const int64& InBrowserId , bool bInIsLoading , bool bInCanGoBack , bool bInCanGoForward )

The callback type of loading state changed.

Parameters
InBrowserIdIndicates the browser ID.
bInIsLoadingIndicates the browser is loading.
bInCanGoBackIndicates the browser can go back.
bInCanGoForwardIndicates the browser can go forward.

◆ FOnNativeBrowserCreatedEvent

The callback type of the native browser window created event. This callback does not work for OSR mode.

◆ FOnQueryRequestEvent

using SCefView::FOnQueryRequestEvent = (*)( const int64& InBrowserId , const FCefFrameId& InFrameId , const int64& InQueryId , const FString& InRequest )

The callback type of new UCefQuery request.

Parameters
InBrowserIdThe browser ID.
InFrameIdThe frame ID.
InQueryIdThe query ID.
InRequestThe query request.

◆ FOnReportJavascriptResultEvent

using SCefView::FOnReportJavascriptResultEvent = (*)( const int64& InBrowserId , const FCefFrameId& InFrameId , const FString& InContext , const TSharedPtr<FJsonValue>& InResult )

The callback type of the result of the JavaScript executed with executeJavascriptWithResult returned.

Parameters
InBrowserIdThe browser ID.
InFrameIdThe frame ID.
InContextThe context.
InResultThe result.

◆ FOnStatusMessageEvent

using SCefView::FOnStatusMessageEvent = void(*)( const FString& InMessage )

The callback type of status message changed.

Parameters
InMessageThe status message.

◆ FOnTitleChangedEvent

using SCefView::FOnTitleChangedEvent = void(*)( const FString& InTitle )

The callback type of title changed.

Parameters
InTitleThe title.

◆ FOnUrlRequestEvent

using SCefView::FOnUrlRequestEvent = void(*)( const int64& InBrowserId , const FCefFrameId& InFrameId , const FString& InQuery )

The callback type of built-in scheme URL access.

Parameters
InBrowserIdThe browser ID.
InFrameIdThe frame ID.
InQueryThe full URL.

Constructor & Destructor Documentation

◆ SCefView()

SCefView::SCefView ( )

Constructor.

◆ ~SCefView()

SCefView::~SCefView ( )

Destructor.

Member Function Documentation

◆ AddArchiveFileResource()

void SCefView::AddArchiveFileResource ( const FString & InArchivePath,
const FString & InTargetUrl,
const FString & InPassword = "",
int32 InPriority = 0 )

Adds a URL mapping item with a local archive (.zip) file which contains the web resource.

Parameters
InArchivePathThe path to the local archive file.
InTargetUrlThe URL to be mapped to.
InPasswordThe password of the archive.
InPriorityThe priority.

◆ AddLocalFolderResource()

void SCefView::AddLocalFolderResource ( const FString & InFolderPath,
const FString & InTargetUrl,
int32 InPriority = 0 )

Adds a URL mapping item with a local web resource directory.

Parameters
InFolderPathThe path to the local resource directory.
InTargetUrlThe URL to be mapped to.
InPriorityThe priority.

◆ BroadcastEvent()

bool SCefView::BroadcastEvent ( const FString & InName,
const TArray< TSharedPtr< FJsonValue > > & InArgs )

Broadcasts an event to all frames.

Parameters
InNameThe name of the event.
InArgsThe arguments to pass to the event.
Returns
True if the event was broadcast successfully; otherwise, false.

◆ BrowserCanGoBack()

bool SCefView::BrowserCanGoBack ( )

Checks whether the browser can go back.

Returns
True if it can; otherwise, false.

◆ BrowserCanGoForward()

bool SCefView::BrowserCanGoForward ( )

Checks whether the browser can go forward.

Returns
True if it can; otherwise, false.

◆ BrowserGoBack()

void SCefView::BrowserGoBack ( )

Requires the browser to go back.

◆ BrowserGoForward()

void SCefView::BrowserGoForward ( )

Requires the browser to go forward.

◆ BrowserReload()

void SCefView::BrowserReload ( )

Requires the browser to reload.

◆ BrowserStopLoad()

void SCefView::BrowserStopLoad ( )

Requires the browser to stop loading.

◆ CloseDevTools()

void SCefView::CloseDevTools ( )

Closes the dev-tools dialog.

◆ ComputeDesiredSize()

FVector2D SCefView::ComputeDesiredSize ( float InLayoutScaleMultiplier) const
overrideprotected

ComputeDesiredSize function.

Parameters
InLayoutScaleMultiplierThe layout scale multiplier.
Returns
The desired size.

◆ Construct()

void SCefView::Construct ( const FArguments & InArgs)

Construct function.

Parameters
InArgsThe arguments.

◆ CreateNativeBrowser()

void SCefView::CreateNativeBrowser ( const UCefContext * InCefContext)

Creates the native browser.

Parameters
InCefContextThe CEF context.

◆ DestroyNativeBrowser()

void SCefView::DestroyNativeBrowser ( )

Destroys the native browser.

◆ ExecuteJavascript()

bool SCefView::ExecuteJavascript ( const FCefFrameId & InFrameId,
const FString & InJavascriptCode,
const FString & InTargetUrl )

Executes JavaScript code in a specific frame.

Parameters
InFrameIdThe ID of the frame to execute the code in.
InJavascriptCodeThe JavaScript code to execute.
InTargetUrlThe URL to associate with the code.
Returns
True if the code was executed successfully; otherwise, false.

◆ ExecuteJavascriptWithResult()

bool SCefView::ExecuteJavascriptWithResult ( const FCefFrameId & InFrameId,
const FString & InJavascriptCode,
const FString & InTargetUrl,
const FString & InExecuteContext )

Executes JavaScript code in a specific frame and returns the result.

Parameters
InFrameIdThe ID of the frame to execute the code in.
InJavascriptCodeThe JavaScript code to execute.
InTargetUrlThe URL to associate with the code.
InExecuteContextThe context in which to execute the code.
Returns
True if the code was executed successfully; otherwise, false.

◆ GetBrowserId()

int64 SCefView::GetBrowserId ( )

Gets the browser ID.

Returns
The browser ID.

◆ GetChildren()

FChildren * SCefView::GetChildren ( )
overrideprotected

GetChildren function.

Returns
The children.

◆ HasDevTools()

bool SCefView::HasDevTools ( )

Detects whether this browser has dev-tools opened.

Returns
True if already opened; otherwise, false.

◆ IsBrowserLoading()

bool SCefView::IsBrowserLoading ( )

Checks whether the browser is loading.

Returns
True if it is loading; otherwise, false.

◆ IsDragAndDropEnabled()

bool SCefView::IsDragAndDropEnabled ( ) const

Gets whether drag and drop is enabled.

Returns
True to enable; otherwise, false.

◆ IsPopupContextMenuDisabled()

bool SCefView::IsPopupContextMenuDisabled ( )

Gets whether the context menu is disabled for a pop-up browser.

Returns
True to disable; otherwise, false.

◆ NavigateToUrl()

void SCefView::NavigateToUrl ( const FString & InTargetUrl)

Navigates to the URL.

Parameters
InTargetUrlThe URL.

◆ OnArrangeChildren()

void SCefView::OnArrangeChildren ( const FGeometry & InAllottedGeometry,
FArrangedChildren & InArrangedChildren ) const
overrideprotected

OnArrangeChildren function.

Parameters
InAllottedGeometryThe allotted geometry.
InArrangedChildrenThe arranged children.

◆ OnFocusLost()

void SCefView::OnFocusLost ( const FFocusEvent & InFocusEvent)
overrideprotected

OnFocusLost function.

Parameters
InFocusEventThe focus event.

◆ OnFocusReceived()

FReply SCefView::OnFocusReceived ( const FGeometry & InGeometry,
const FFocusEvent & InFocusEvent )
overrideprotected

OnFocusReceived function.

Parameters
InGeometryThe geometry.
InFocusEventThe focus event.
Returns
The reply.

◆ OnKeyChar()

FReply SCefView::OnKeyChar ( const FGeometry & InGeometry,
const FCharacterEvent & InCharacterEvent )
overrideprotected

OnKeyChar function.

Parameters
InGeometryThe geometry.
InCharacterEventThe character event.
Returns
The reply.

◆ OnKeyDown()

FReply SCefView::OnKeyDown ( const FGeometry & InGeometry,
const FKeyEvent & InKeyEvent )
overrideprotected

OnKeyDown function.

Parameters
InGeometryThe geometry.
InKeyEventThe key event.
Returns
The reply.

◆ OnKeyUp()

FReply SCefView::OnKeyUp ( const FGeometry & InGeometry,
const FKeyEvent & InKeyEvent )
overrideprotected

OnKeyUp function.

Parameters
InGeometryThe geometry.
InKeyEventThe key event.
Returns
The reply.

◆ OnMapCursor()

TOptional< TSharedRef< SWidget > > SCefView::OnMapCursor ( const FCursorReply & InCursorReply) const
protected

OnMapCursor function.

Parameters
InCursorReplyThe cursor reply.
Returns
The mapped cursor.

◆ OnMouseButtonDoubleClick()

FReply SCefView::OnMouseButtonDoubleClick ( const FGeometry & InGeometry,
const FPointerEvent & InMouseEvent )
overrideprotected

OnMouseButtonDoubleClick function.

Parameters
InGeometryThe geometry.
InMouseEventThe mouse event.
Returns
The reply.

◆ OnMouseButtonDown()

FReply SCefView::OnMouseButtonDown ( const FGeometry & InGeometry,
const FPointerEvent & InMouseEvent )
overrideprotected

OnMouseButtonDown function.

Parameters
InGeometryThe geometry.
InMouseEventThe mouse event.
Returns
The reply.

◆ OnMouseButtonUp()

FReply SCefView::OnMouseButtonUp ( const FGeometry & InGeometry,
const FPointerEvent & InMouseEvent )
overrideprotected

OnMouseButtonUp function.

Parameters
InGeometryThe geometry.
InMouseEventThe mouse event.
Returns
The reply.

◆ OnMouseEnter()

void SCefView::OnMouseEnter ( const FGeometry & InGeometry,
const FPointerEvent & InMouseEvent )
overrideprotected

OnMouseEnter function.

Parameters
InGeometryThe geometry.
InMouseEventThe mouse event.

◆ OnMouseLeave()

void SCefView::OnMouseLeave ( const FPointerEvent & InMouseEvent)
overrideprotected

OnMouseLeave function.

Parameters
InMouseEventThe mouse event.

◆ OnMouseMove()

FReply SCefView::OnMouseMove ( const FGeometry & InGeometry,
const FPointerEvent & InMouseEvent )
overrideprotected

OnMouseMove function.

Parameters
InGeometryThe geometry.
InMouseEventThe mouse event.
Returns
The reply.

◆ OnMouseWheel()

FReply SCefView::OnMouseWheel ( const FGeometry & InGeometry,
const FPointerEvent & InMouseEvent )
overrideprotected

OnMouseWheel function.

Parameters
InGeometryThe geometry.
InMouseEventThe mouse event.
Returns
The reply.

◆ OnNavigation()

FNavigationReply SCefView::OnNavigation ( const FGeometry & InGeometry,
const FNavigationEvent & InNavigationEvent )
overrideprotected

OnNavigation function.

Parameters
InGeometryThe geometry.
InNavigationEventThe navigation event.
Returns
The navigation reply.

◆ OnNewBrowser()

void SCefView::OnNewBrowser ( const FCefFrameId & InSourceFrameId,
const FString & InTargetUrl,
const FString & InFrameName,
ECefWindowOpenDisposition InTargetDisposition,
FIntRect & InDesiredRect )
protected

Called when a new browser is created.

Parameters
InSourceFrameIdThe ID of the frame that created the new browser.
InTargetUrlThe URL of the new browser.
InFrameNameThe name of the new browser.
InTargetDispositionThe disposition of the new browser.
InDesiredRectThe desired rectangle of the new browser.

◆ OnNewPopup()

bool SCefView::OnNewPopup ( const FCefFrameId & InSourceFrameId,
const FString & InTargetUrl,
FString & InFrameName,
ECefWindowOpenDisposition InTargetDisposition,
FIntRect & InDesiredRect,
FCefViewSettings & InBrowserSettings,
bool & bInDisableJavascriptAccess )
protected

Gets called before the pop-up browser is created (only for browser created by JavaScript).

Parameters
InSourceFrameIdThe source frame ID.
InTargetUrlThe target URL.
InFrameNameThe target name.
InTargetDispositionTarget window open method.
InDesiredRectRect to be used for the popup.
InBrowserSettingsSettings to be used for the popup.
bInDisableJavascriptAccessWhether to disable JavaScript access.
Returns
True to cancel the popup; false to allow.

◆ OnPaint()

int32 SCefView::OnPaint ( const FPaintArgs & InArgs,
const FGeometry & InAllottedGeometry,
const FSlateRect & InMyCullingRect,
FSlateWindowElementList & InOutDrawElements,
int32 InLayerId,
const FWidgetStyle & InWidgetStyle,
bool bInParentEnabled ) const
overrideprotected

OnPaint function.

Parameters
InArgsThe paint arguments.
InAllottedGeometryThe allotted geometry.
InMyCullingRectThe my culling rectangle.
InOutDrawElementsThe out draw elements.
InLayerIdThe layer ID.
InWidgetStyleThe widget style.
bInParentEnabledWhether the parent is enabled.
Returns
The layer ID.

◆ OnPreviewKeyDown()

FReply SCefView::OnPreviewKeyDown ( const FGeometry & InGeometry,
const FKeyEvent & InKeyEvent )
overrideprotected

OnPreviewKeyDown function.

Parameters
InGeometryThe geometry.
InKeyEventThe key event.
Returns
The reply.

◆ OnPreviewMouseButtonDown()

FReply SCefView::OnPreviewMouseButtonDown ( const FGeometry & InGeometry,
const FPointerEvent & InMouseEvent )
overrideprotected

OnPreviewMouseButtonDown function.

Parameters
InGeometryThe geometry.
InMouseEventThe mouse event.
Returns
The reply.

◆ OnRequestCloseFromWeb()

bool SCefView::OnRequestCloseFromWeb ( )
protected

The callback type of close request from web.

Returns
True to allow the close, false to cancel the close.

◆ ResponseUCefQuery()

bool SCefView::ResponseUCefQuery ( const int64 InQueryId,
const bool bInIsSuccess,
const FString & InResponse,
const int32 InError )

Responds to a UCefQuery.

Parameters
InQueryIdThe ID of the query to respond to.
bInIsSuccessWhether the query was successful.
InResponseThe response to the query.
InErrorThe error code, if any.
Returns
True if the response was sent successfully; otherwise, false.

◆ SetDisablePopupContextMenu()

void SCefView::SetDisablePopupContextMenu ( bool bInIsDisable)

Sets whether to disable the context menu for a pop-up browser.

Parameters
bInIsDisableTrue to disable; otherwise, false.

◆ SetPreference()

bool SCefView::SetPreference ( const FString & InPreferenceName,
const FString & InPreferenceValue,
FString & OutError )

Sets a preference.

Parameters
InPreferenceNameThe name of the preference to set.
InPreferenceValueThe value to set the preference to.
OutErrorAn error message, if any.
Returns
True if the preference was set successfully; otherwise, false.

◆ SetSettings()

void SCefView::SetSettings ( const FCefViewSettings & InSettings)

Sets the settings.

Parameters
InSettingsThe settings.

◆ SetUrl()

void SCefView::SetUrl ( const FString & InUrl)

Sets the URL.

Parameters
InUrlThe URL.

◆ SetVisibility()

void SCefView::SetVisibility ( TAttribute< EVisibility > InVisibility)
override

Sets the visibility.

Parameters
InVisibilityThe visibility.

◆ ShowDevTools()

void SCefView::ShowDevTools ( )

Opens the dev-tools dialog.

◆ SupportsKeyboardFocus()

bool SCefView::SupportsKeyboardFocus ( ) const
overrideprotected

SupportsKeyboardFocus function.

Returns
Whether the widget supports keyboard focus.

◆ Tick()

void SCefView::Tick ( const FGeometry & InAllottedGeometry,
const double InCurrentTime,
const float InDeltaTime )
overrideprotected

Tick function.

Parameters
InAllottedGeometryThe allotted geometry.
InCurrentTimeThe current time.
InDeltaTimeThe delta time.

◆ TriggerEventForFrame()

bool SCefView::TriggerEventForFrame ( const FString & InName,
const TArray< TSharedPtr< FJsonValue > > & InArgs,
const FCefFrameId & InFrameId )

Triggers an event for a specific frame.

Parameters
InNameThe name of the event.
InArgsThe arguments to pass to the event.
InFrameIdThe frame ID to trigger the event on.
Returns
True if the event was triggered successfully; otherwise, false.

◆ TriggerEventForMainFrame()

bool SCefView::TriggerEventForMainFrame ( const FString & InName,
const TArray< TSharedPtr< FJsonValue > > & InArgs )

Triggers an event for the main frame.

Parameters
InNameThe name of the event.
InArgsThe arguments to pass to the event.
Returns
True if the event was triggered successfully; otherwise, false.

Member Data Documentation

◆ AllFrameID

const FCefFrameId SCefView::AllFrameID
static

The identifier for all frames.

◆ JSDialogContainerSlot

FSingleWidgetChildrenWithSlot SCefView::JSDialogContainerSlot
protected

JSDialogContainerSlot.

◆ MainFrameID

const FCefFrameId SCefView::MainFrameID
static

The main frame identity.

◆ OnAddressChanged

FOnAddressChangedEvent SCefView::OnAddressChanged
protected

On address changed event.

◆ OnConsoleMessage

FOnConsoleMessageEvent SCefView::OnConsoleMessage
protected

On console message event.

◆ OnDraggableRegionChanged

FOnDraggableRegionChangedEvent SCefView::OnDraggableRegionChanged
protected

On draggable region changed event.

◆ OnFaviconUrlChanged

FOnFaviconUrlChangedEvent SCefView::OnFaviconUrlChanged
protected

On favicon URL changed event.

◆ OnFullscreenModeChanged

FOnFullscreenModeChangedEvent SCefView::OnFullscreenModeChanged
protected

On fullscreen mode changed event.

◆ OnInvokeMethod

FOnInvokeMethodEvent SCefView::OnInvokeMethod
protected

On invoke method event.

◆ OnLoadEnd

FOnLoadEndEvent SCefView::OnLoadEnd
protected

On load end event.

◆ OnLoadError

FOnLoadErrorEvent SCefView::OnLoadError
protected

On load error event.

◆ OnLoadingProgressChanged

FOnLoadingProgressChangedEvent SCefView::OnLoadingProgressChanged
protected

On loading progress changed event.

◆ OnLoadStart

FOnLoadStartEvent SCefView::OnLoadStart
protected

On load start event.

◆ OnLoadStateChanged

FOnLoadStateChangedEvent SCefView::OnLoadStateChanged
protected

On load state changed event.

◆ OnNativeBrowserCreated

FOnNativeBrowserCreatedEvent SCefView::OnNativeBrowserCreated
protected

On native browser created event.

◆ OnQueryRequest

FOnQueryRequestEvent SCefView::OnQueryRequest
protected

On query request event.

◆ OnReportJavascriptResult

FOnReportJavascriptResultEvent SCefView::OnReportJavascriptResult
protected

On report JavaScript result event.

◆ OnStatusMessage

FOnStatusMessageEvent SCefView::OnStatusMessage
protected

On status message event.

◆ OnTitleChanged

FOnTitleChangedEvent SCefView::OnTitleChanged
protected

On title changed event.

◆ OnUrlRequest

FOnUrlRequestEvent SCefView::OnUrlRequest
protected

On URL request event.