2.9.16.0
Coherent GT for UE4
UCoherentUIGTWidget Class Reference
+ Inheritance diagram for UCoherentUIGTWidget:

Public Types

typedef TSharedPtr< TCoherentUIGTViewListener< UCoherentUIGTWidget > > ListenerPtr
 
typedef TSharedPtr< SCoherentUIGTWidgetSCohWidgetPtr
 

Public Member Functions

virtual void ReleaseSlateResources (bool bReleaseChildren) override
 
virtual TSharedRef< SWidget > RebuildWidget () override
 
virtual void SynchronizeProperties () override
 
bool IsReadyToCreateView () const
 
bool IsReadyForBindings () const
 
bool HasRequestedView () const
 
bool IsTransparent () const
 
void ShowPaintRects (bool show)
 
void Redraw () const
 
void Load (const FString &path)
 
void Reload ()
 
bool IsDocumentReady () const
 
void DebugSaveNextFrame ()
 
void BeginDebugFrameSave ()
 
void EndDebugFrameSave ()
 
UTextureRenderTarget2D * GetRenderTexture () const
 
void SetClickThroughAlphaThreshold (float threshold)
 
float GetClickThroughAlphaThreshold () const
 
void SetInputPropagationBehaviour (ECoherentUIGTInputPropagationBehaviour::Type Propagation)
 
ECoherentUIGTInputPropagationBehaviour::Type GetInputPropagationBehaviour () const
 
UCoherentUIGTJSEventCreateJSEvent ()
 
void TriggerJSEvent (const FString &name, UCoherentUIGTJSEvent *eventData) const
 
void CreateDataModelFromObject (const FString &Name, UObject *Model)
 
void CreateDataModelFromStruct (const FString &Name, const TFieldPath< FStructProperty > Arg)
 
void UpdateWholeDataModelFromStruct (const TFieldPath< FStructProperty > Arg) const
 
void UpdateWholeDataModelFromObject (UObject *Model) const
 
void SynchronizeModels () const
 
void SetSoundAttenuation (const FAttenuationSettingsClass &settings)
 
 DECLARE_DELEGATE_RetVal (TUniquePtr< FCohWidgetViewState >, FOnViewStateAdoption)
 
 DECLARE_DELEGATE_OneParam (FOnViewStatePostAdoption, const TUniquePtr< FCohWidgetViewState > &)
 
 DECLARE_DELEGATE_OneParam (FOnViewStatePutForAdoption, TUniquePtr< FCohWidgetViewState > &)
 
Coherent::UIGT::View * GetView () const
 
FCaretRect GetCaretRect () const
 
void SetCaretRect (int x, int y, unsigned width, unsigned height)
 
virtual void BeginDestroy () override
 
virtual bool IsReadyForFinishDestroy () override
 
virtual void FinishDestroy () override
 
 DECLARE_FUNCTION (execCreateDataModelFromStruct)
 
 DECLARE_FUNCTION (execUpdateWholeDataModelFromStruct)
 

Public Attributes

AActor * Owner
 
FUIGTReadyForBindingsSignature ReadyForBindings
 
FUIGTBindingsReleasedSignature BindingsReleased
 
FUIGTFinishLoadSignature FinishLoad
 
FUIGTFailLoadSignature FailLoad
 
FUIGTStartLoadingSignature StartLoading
 
FUIGTNavigateToSignature NavigateTo
 
FUIGTOnJavaScriptEvent JavaScriptEvent
 
FUIGTScriptingReady UIGTScriptingReady
 
FUIGTOnPerformanceAuditSignature OnPerformanceAudit
 
TEnumAsByte< enum TextureFilter > Filter
 
bool bReceiveInput
 
TEnumAsByte< ECoherentUIGTInputPropagationBehaviour::Type > InputPropagationBehaviour
 
bool bReceiveInputWhenTransparent
 
bool bGammaCorrectedMaterial
 
float TickPeriodInMinimizedGame
 
bool AllowPerformanceWarnings
 
float ExecuteJSTimersThresholdMs
 
float UpdateStylesAndLayoutThresholdMs
 
float RecordRenderingCommandsThresholdMs
 
float PaintWarningThresholdMs
 
int32 LayersCountThreshold
 
int32 LayerWidthThreshold
 
int32 LayerHeightThreshold
 
bool bEnableAdditionalDefaultStyles
 
FOnViewStateAdoption OnViewStateAdoption
 
FOnViewStatePostAdoption OnViewStatePostAdoption
 
FOnViewStatePutForAdoption OnViewStatePutForAdoption
 
FString URL
 
float ClickThroughAlphaThreshold
 
bool Transparent
 

Protected Attributes

SCohWidgetPtr CoherentWidget
 

Friends

class TCoherentUIGTViewListener< UCoherentUIGTWidget >
 

Detailed Description

A HTML5 control powered by Coherent GT.

Member Function Documentation

◆ BeginDebugFrameSave()

void UCoherentUIGTWidget::BeginDebugFrameSave ( )

Starts saving render frames to disk

◆ CreateDataModelFromObject()

void UCoherentUIGTWidget::CreateDataModelFromObject ( const FString &  Name,
UObject *  Model 
)

Creates a global variable (data model) in JavaScript from an UObject

◆ CreateDataModelFromStruct()

void UCoherentUIGTWidget::CreateDataModelFromStruct ( const FString &  Name,
const TFieldPath< FStructProperty >  Arg 
)

Creates a global variable (data model) in JavaScript from a UStruct

◆ CreateJSEvent()

UCoherentUIGTJSEvent* UCoherentUIGTWidget::CreateJSEvent ( )

Creates an event that will be executed in JavaScript

◆ DebugSaveNextFrame()

void UCoherentUIGTWidget::DebugSaveNextFrame ( )

Saves next render frame to disk

◆ EndDebugFrameSave()

void UCoherentUIGTWidget::EndDebugFrameSave ( )

Stops saving render frames to disk

◆ GetClickThroughAlphaThreshold()

float UCoherentUIGTWidget::GetClickThroughAlphaThreshold ( ) const

Gets the alpha threshold for click-through queries

◆ GetInputPropagationBehaviour()

ECoherentUIGTInputPropagationBehaviour::Type UCoherentUIGTWidget::GetInputPropagationBehaviour ( ) const

Gets the type of input that the widget will propagate to the game

◆ GetRenderTexture()

UTextureRenderTarget2D* UCoherentUIGTWidget::GetRenderTexture ( ) const

Gives access to the UI Texture

◆ HasRequestedView()

bool UCoherentUIGTWidget::HasRequestedView ( ) const

Tells if a View has been scheduled for creation

◆ IsDocumentReady()

bool UCoherentUIGTWidget::IsDocumentReady ( ) const

Tells if the Document object is ready in JS

◆ IsReadyForBindings()

bool UCoherentUIGTWidget::IsReadyForBindings ( ) const

Tells if the View is ready to be created

◆ IsReadyToCreateView()

bool UCoherentUIGTWidget::IsReadyToCreateView ( ) const

Tells if the View is ready to be created

◆ IsTransparent()

bool UCoherentUIGTWidget::IsTransparent ( ) const

Gets if the View is transparent

◆ Load()

void UCoherentUIGTWidget::Load ( const FString &  path)

Requests a new URL to be loaded in the View

◆ Redraw()

void UCoherentUIGTWidget::Redraw ( ) const

Requests a View to completely re-draw itself

◆ Reload()

void UCoherentUIGTWidget::Reload ( )

Requests the View to reload the current URL

◆ SetClickThroughAlphaThreshold()

void UCoherentUIGTWidget::SetClickThroughAlphaThreshold ( float  threshold)

Click-through queries check the alpha under the mouse. This value defines the threshold when a pixel is categorized on the UI or on the Game

◆ SetInputPropagationBehaviour()

void UCoherentUIGTWidget::SetInputPropagationBehaviour ( ECoherentUIGTInputPropagationBehaviour::Type  Propagation)

Sets the type of input that the widget will propagate to the game

◆ SetSoundAttenuation()

void UCoherentUIGTWidget::SetSoundAttenuation ( const FAttenuationSettingsClass &  settings)

Sets the AttenuationSettings for the Sound Components Note: Sound is 2D by default. It can be changed to 3D if appropriate AttenuationSettings is set. for more details look at Unreal's documentation for AttenuationSettings

◆ ShowPaintRects()

void UCoherentUIGTWidget::ShowPaintRects ( bool  show)

Tells the view to show/hide debug paint rectangles

◆ SynchronizeModels()

void UCoherentUIGTWidget::SynchronizeModels ( ) const

Synchronize all models marked for update.

◆ TriggerJSEvent()

void UCoherentUIGTWidget::TriggerJSEvent ( const FString &  name,
UCoherentUIGTJSEvent eventData 
) const

Triggers an event in JavaScript

◆ UpdateWholeDataModelFromObject()

void UCoherentUIGTWidget::UpdateWholeDataModelFromObject ( UObject *  Model) const

Marks an Object model for update. The UI using this data model will be updated during the next call to SynchronizeModels. For optimum performance, call SynchronizeModels as rarely as possible.

◆ UpdateWholeDataModelFromStruct()

void UCoherentUIGTWidget::UpdateWholeDataModelFromStruct ( const TFieldPath< FStructProperty >  Arg) const

Marks a Struct model for update. The UI using this data model will be updated during the next call to SynchronizeModels. For optimum performance, call SynchronizeModels as rarely as possible.

Member Data Documentation

◆ bEnableAdditionalDefaultStyles

bool UCoherentUIGTWidget::bEnableAdditionalDefaultStyles

If true, in the page will be added additional default styles for scrollbars. Those styles will allow pages outside the user control to look correctly (like websites), but incur a performance penalty.

◆ bGammaCorrectedMaterial

bool UCoherentUIGTWidget::bGammaCorrectedMaterial

Whether this widget's material should be gamma corrected or not. Set to true if the widget is used for HUD. Set to false if it is used for in-game surface.

◆ BindingsReleased

FUIGTBindingsReleasedSignature UCoherentUIGTWidget::BindingsReleased

When fired, the View has released its bindings.

◆ bReceiveInput

bool UCoherentUIGTWidget::bReceiveInput

Indicates whether input is forwarded to this view

◆ bReceiveInputWhenTransparent

bool UCoherentUIGTWidget::bReceiveInputWhenTransparent

When enabled, the View will always receive input, even in transparent areas that otherwise are click-through.

◆ FailLoad

FUIGTFailLoadSignature UCoherentUIGTWidget::FailLoad

Called when the requested page has failed its load for some reason

◆ FinishLoad

FUIGTFinishLoadSignature UCoherentUIGTWidget::FinishLoad

Called when the requested page has been loaded completely

◆ InputPropagationBehaviour

TEnumAsByte<ECoherentUIGTInputPropagationBehaviour::Type> UCoherentUIGTWidget::InputPropagationBehaviour

Indicates the type of input this view forwards to the game

◆ JavaScriptEvent

FUIGTOnJavaScriptEvent UCoherentUIGTWidget::JavaScriptEvent

Called an event for this View is triggered in JavaScript

◆ NavigateTo

FUIGTNavigateToSignature UCoherentUIGTWidget::NavigateTo

Called when View has navigated to a new page

◆ OnPerformanceAudit

FUIGTOnPerformanceAuditSignature UCoherentUIGTWidget::OnPerformanceAudit

Called when a performance audit has completed

◆ OnViewStateAdoption

FOnViewStateAdoption UCoherentUIGTWidget::OnViewStateAdoption

This delegate can be used to set the ViewState, adopted from a previous run via OnViewStatePutForAdoption. It will be executed at the beginning of the Widgets recreation. If a valid unique ptr to the ViewState is given here, it will be reused instead of creating a new one.

◆ OnViewStatePostAdoption

FOnViewStatePostAdoption UCoherentUIGTWidget::OnViewStatePostAdoption

This delegate can be used to handle any required setup or cleanup code after the ViewState was adopted by the Widget via OnViewStateAdoption. If you are using Coherent Binding, this is a good location to add Binding related re-initialization code.

◆ OnViewStatePutForAdoption

FOnViewStatePutForAdoption UCoherentUIGTWidget::OnViewStatePutForAdoption

This delegate can be used to get the ViewState from the Widget. It will be executed at the beginning

of the Widgets BeginDestruction. If the unique ptr to the ViewState is adopted in to the client code and invalidated in the process, the ViewState will be kept and can be later reused via OnViewStateAdoption.

◆ Owner

AActor* UCoherentUIGTWidget::Owner

Gets or sets the Actor containing any LiveViewComponents.

◆ ReadyForBindings

FUIGTReadyForBindingsSignature UCoherentUIGTWidget::ReadyForBindings

When fired, the View is ready for binding events. Any event bound prior to this will be ignored

◆ StartLoading

FUIGTStartLoadingSignature UCoherentUIGTWidget::StartLoading

Called when View has started loading a new page

◆ TickPeriodInMinimizedGame

float UCoherentUIGTWidget::TickPeriodInMinimizedGame

Controls how ofter the widget will be ticking in a minimized game. The Tick period is measured in seconds and if set to 0 or negative value, the widget won't be ticking in a minimized game.

◆ Transparent

bool UCoherentUIGTWidget::Transparent

Indicates whether the View is transparent or composed on white

◆ UIGTScriptingReady

FUIGTScriptingReady UCoherentUIGTWidget::UIGTScriptingReady

Called when the View is ready to accept events

◆ URL

FString UCoherentUIGTWidget::URL

The URL to load when the View is created