Operating System Simulator Plugin  3.5.1
Unreal Engine plugin that simulates an Operating System Environment
Loading...
Searching...
No Matches
UInternetBrowser Class Reference

Represents a web browser widget that can be embedded in a UMG widget. More...

#include "InternetBrowser.h"

Inheritance diagram for UInternetBrowser:
[legend]
Collaboration diagram for UInternetBrowser:
[legend]

Public Member Functions

 UInternetBrowser (const FObjectInitializer &ObjectInitializer)
 
virtual TSharedRef< SWidget > RebuildWidget () override
 
virtual void ReleaseSlateResources (bool bReleaseChildren) override
 
void InitializeInternetBrowser (const FString InOverrideURL="")
 
bool LoadURL (const FText &URL)
 
void LoadString (FString Contents, FString DummyURL)
 
void ExecuteJavascript (const FString &ScriptText)
 
void AddBookmark (const FBrowserBookmark &InBookmark)
 
void RemoveBookmark (const FBrowserBookmark &InBookmark)
 
TArray< FBrowserBookmarkGetBookmarks () const
 
void SetCookie (const FString &URL, const FBrowserCookie &InCookie, UPARAM(DisplayName="On Cookie Set") FOnCookieSetComplete Delegate)
 
void SetCookieForAll (const FBrowserCookie &InCookie, UPARAM(DisplayName="On Cookie Set") FOnCookieSetComplete Delegate)
 
void DeleteCookie (const FString &URL, const FString &CookieName, UPARAM(DisplayName="On Cookies Deleted") FOnCookieDeleteComplete Delegate)
 
void DeleteAllCookies (UPARAM(DisplayName="On Cookies Deleted") FOnCookieDeleteComplete Delegate)
 
FString GetCookieName (const FBrowserCookie &InCookie) const
 
FText GetTitleText () const
 
FString GetUrl () const
 
FText GetAddressbarUrl () const
 
FString GetBrowserProtocolLink () const
 
TArray< FInternetBrowserHistoryGetHistory () const
 

Static Public Member Functions

static bool IsHistoryValid (const FInternetBrowserHistory &InHistory)
 
static FText GetCleanDomainName (const FText &InURL)
 

Public Attributes

FOnAccessDenied OnAccessDenied
 
FOnBeforePopup OnBeforePopup
 
FOnUrlChanged OnUrlChanged
 
FOnWebBrowserLoadStarted OnLoadStarted
 
FOnWebBrowserLoadCompleted OnLoadCompleted
 
FOnWebBrowserLoadError OnLoadError
 
FOnLoadBrowserURL OnLoadBrowserURL
 

Protected Member Functions

void ReloadWebPage ()
 Reloads the current web page in the internet browser.
 

Detailed Description

Represents a web browser widget that can be embedded in a UMG widget.

Constructor & Destructor Documentation

◆ UInternetBrowser()

UInternetBrowser::UInternetBrowser ( const FObjectInitializer & ObjectInitializer)

Member Function Documentation

◆ AddBookmark()

void UInternetBrowser::AddBookmark ( const FBrowserBookmark & InBookmark)

public UInternetBrowser::AddBookmark Adds the given bookmark to bookmarks array.

Parameters
InBookmark[const FBrowserBookmark&] Bookmark struct.
Here is the call graph for this function:

◆ DeleteAllCookies()

void UInternetBrowser::DeleteAllCookies ( UPARAM(DisplayName="On Cookies Deleted") FOnCookieDeleteComplete Delegate)

public UInternetBrowser::DeleteAllCookies Delete the entire cookie database.

Parameters
Delegate[FOnCookieDeleteComplete] A callback delegate that will be invoked when the deletion is complete passing number of deleted cookies.
Here is the call graph for this function:

◆ DeleteCookie()

void UInternetBrowser::DeleteCookie ( const FString & URL,
const FString & CookieName,
UPARAM(DisplayName="On Cookies Deleted") FOnCookieDeleteComplete Delegate )

public UInternetBrowser::DeleteCookie Deletes the given cookie for the given URL.

Parameters
URL[const FString&] URL to match when searching for cookie to remove.
CookieName[const FString&] The name of the cookie to delete. If left unspecified, all cookies will be removed.
Delegate[FOnCookieDeleteComplete] A callback delegate that will be invoked when the deletion is complete passing number of deleted cookies.
Here is the caller graph for this function:

◆ ExecuteJavascript()

void UInternetBrowser::ExecuteJavascript ( const FString & ScriptText)

public UInternetBrowser::ExecuteJavascript Execute javascript on the current window

Parameters
ScriptText[const FString&] Javascript to execute.

◆ GetAddressbarUrl()

FText UInternetBrowser::GetAddressbarUrl ( ) const

public UInternetBrowser::GetAddressbarUrl const Gets the URL that appears in the address bar, this may not be the URL that is currently loaded in the frame.

Returns
[FText] URL that appears in the address bar

◆ GetBookmarks()

TArray< FBrowserBookmark > UInternetBrowser::GetBookmarks ( ) const
inline

public UInternetBrowser::GetBookmarks const Returns all the bookmarks.

Returns
[TArray<FBrowserBookmark>] Bookmarks array.
Here is the caller graph for this function:

◆ GetBrowserProtocolLink()

FString UInternetBrowser::GetBrowserProtocolLink ( ) const

public UInternetBrowser::GetBrowserProtocolLink const Gets the protocol link for this browser. Similar to chrome://

See:

BrowserIdentifier variable.
Returns
[FString] Returns browser protocol link.

◆ GetCleanDomainName()

FText UInternetBrowser::GetCleanDomainName ( const FText & InURL)
static

public static UInternetBrowser::GetCleanDomainName Returns a clean domain name from given url. For example: www.google.com if you pass https://www.google.com/search?q=test

Parameters
InURL[const FText&] URL to get
Returns
[FText] Proper domain name.

◆ GetCookieName()

FString UInternetBrowser::GetCookieName ( const FBrowserCookie & InCookie) const
inline

public UInternetBrowser::GetCookieName const Gets the name of the given cookie.

Parameters
InCookie[const FBrowserCookie&] Cookie to get the name from.
Returns
[FString] Name of the cookie.

◆ GetHistory()

TArray< FInternetBrowserHistory > UInternetBrowser::GetHistory ( ) const

public UInternetBrowser::GetHistory const Returns array of FWebHistory. This array contains all the web pages the user has visited if History is enabled.

Returns
[TArray<FWebHistory>] History array.
Here is the call graph for this function:

◆ GetTitleText()

FText UInternetBrowser::GetTitleText ( ) const

public UInternetBrowser::GetTitleText const Gets the title of the loaded URL.

Returns
[FText] Title for the loaded URL.

◆ GetUrl()

FString UInternetBrowser::GetUrl ( ) const

public UInternetBrowser::GetUrl const Returns the currently loaded URL.

Returns
[FString] Currently loaded URL.

◆ InitializeInternetBrowser()

void UInternetBrowser::InitializeInternetBrowser ( const FString InOverrideURL = "")

public UInternetBrowser::InitializeInternetBrowser Assign delegates to back, forward, reload buttons and address bar. Make sure you assign them first. Load initial URL.

Parameters
InOverrideURL[const FText]
Here is the call graph for this function:

◆ IsHistoryValid()

static bool UInternetBrowser::IsHistoryValid ( const FInternetBrowserHistory & InHistory)
inlinestatic

public static UInternetBrowser::IsHistoryValid Checks if the given history is a valid entry.

Parameters
InHistory[const FInternetBrowserHistory&] History struct to check.

◆ LoadString()

void UInternetBrowser::LoadString ( FString Contents,
FString DummyURL )

public UInternetBrowser::LoadString Load a string as data to create a web page.

Parameters
Contents[FString] HTML string to load.
DummyURL[FString] Dummy URL for the page.

◆ LoadURL()

bool UInternetBrowser::LoadURL ( const FText & URL)

public UInternetBrowser::LoadURL Loads the given URL with support for internal browser URLs. Automatically adds https:// protocol if not present. So if you pass google.com to URL, it will be converted to https://google.com

Parameters
URL[const FText &] URL to load. Adds https:// protocol if not present.
Returns
[bool] True if URL is loaded.
Here is the caller graph for this function:

◆ RebuildWidget()

TSharedRef< SWidget > UInternetBrowser::RebuildWidget ( )
overridevirtual
Here is the call graph for this function:

◆ ReleaseSlateResources()

void UInternetBrowser::ReleaseSlateResources ( bool bReleaseChildren)
overridevirtual

◆ ReloadWebPage()

void UInternetBrowser::ReloadWebPage ( )
protected

Reloads the current web page in the internet browser.

This method checks if the web browser widget is valid. If it is, it checks if the web browser widget is currently loading a page using the IsLoading() function. If the web browser widget is loading a page, the StopLoad() function is called to stop the loading. If the web browser widget is not loading a page, the Reload() function is called to reload the current web page.

Here is the caller graph for this function:

◆ RemoveBookmark()

void UInternetBrowser::RemoveBookmark ( const FBrowserBookmark & InBookmark)

public UInternetBrowser::RemoveBookmark Removes the given bookmark.

Parameters
InBookmark[const FBrowserBookmark&] Bookmark struct.
Here is the call graph for this function:

◆ SetCookie()

void UInternetBrowser::SetCookie ( const FString & URL,
const FBrowserCookie & InCookie,
UPARAM(DisplayName="On Cookie Set") FOnCookieSetComplete Delegate )

public UInternetBrowser::SetCookie Sets a cookie for given URL. This function expects each attribute to be well-formed. It will check for disallowed characters (e.g. the ';' character is disallowed within the cookie Value field) and fail without setting the cookie if such characters are found.

Parameters
URL[const FString&] URL to match when searching for cookie to set.
InCookie[const FBrowserCookie &] Cookie to set.
Delegate[FOnCookieSetComplete] A callback delegate that will be invoked when the set is complete passing success bool.
Here is the caller graph for this function:

◆ SetCookieForAll()

void UInternetBrowser::SetCookieForAll ( const FBrowserCookie & InCookie,
UPARAM(DisplayName="On Cookie Set") FOnCookieSetComplete Delegate )

public UInternetBrowser::SetCookieForAll Sets a cookie for all URLs. This function expects each attribute to be well-formed. It will check for disallowed characters (e.g. the ';' character is disallowed within the cookie Value field) and fail without setting the cookie if such characters are found.

Parameters
InCookie[const FBrowserCookie&] Cookie to set.
Delegate[FOnCookieSetComplete] A callback delegate that will be invoked when the set is complete passing success bool.
Here is the call graph for this function:

Member Data Documentation

◆ OnAccessDenied

FOnAccessDenied UInternetBrowser::OnAccessDenied

◆ OnBeforePopup

FOnBeforePopup UInternetBrowser::OnBeforePopup

◆ OnLoadBrowserURL

FOnLoadBrowserURL UInternetBrowser::OnLoadBrowserURL

◆ OnLoadCompleted

FOnWebBrowserLoadCompleted UInternetBrowser::OnLoadCompleted

◆ OnLoadError

FOnWebBrowserLoadError UInternetBrowser::OnLoadError

◆ OnLoadStarted

FOnWebBrowserLoadStarted UInternetBrowser::OnLoadStarted

◆ OnUrlChanged

FOnUrlChanged UInternetBrowser::OnUrlChanged

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