Public Types | |
typedef TArray< TWeakObjectPtr< UCohtmlBaseComponent > > | WeakCohtmlComponentsArray |
Public Member Functions | |
void | SetSoundAttenuation (const FSoundAttenuationSettings &Settings) |
void | RegisterForEvent (UPARAM(DisplayName="JavaScript Event Name") FString JSEventName, UPARAM(DisplayName="Event") FCohtmlJSEventBPCallback Delegate) |
virtual void | Resize (int32 width, int32 height) |
virtual void | ResizeRenderTarget (int32 width, int32 height) |
bool | IsReadyToCreateView () const |
bool | IsReadyForBindings () const |
bool | HasRequestedView () const |
void | ShowPaintRects (bool show) |
void | Load (const FString &path) |
void | Reload () |
void | DebugSaveNextFrame () |
void | BeginDebugFrameSave () |
void | EndDebugFrameSave () |
void | EnableDelayedUpdate (bool bEnabled) |
void | EnableRendering (bool bEnabled) |
UCohtmlJSEvent * | CreateJSEvent () |
void | TriggerJSEvent (const FString &name, UCohtmlJSEvent *eventData) const |
void | CreateDataModelFromObject (const FString &Name, UObject *Model) |
void | RemoveDataModelFromObject (UObject *Model) |
void | CreateDataModelFromStruct (const FString &Name, const TFieldPath< FStructProperty > Arg) |
void | UpdateWholeDataModelFromStruct (const TFieldPath< FStructProperty > Struct) const |
void | RemoveDataModelFromStruct (const TFieldPath< FStructProperty > Struct) const |
void | UpdateWholeDataModelFromObject (UObject *Model) const |
void | SynchronizeModels () const |
void | PreloadTextureSync (const FString &AssetPath) |
void | PreloadTextureAsync (const FString &AssetPath) |
void | AddPreloadedTexture (UTexture2D *Texture) |
bool | RemovePreloadedTextureFromPath (const FString &AssetPath) |
bool | RemovePreloadedTexture (UTexture2D *Texture) |
void | RemoveAllPreloadedTextures () |
virtual bool | EnsureMeshData (ECohtmlComponentMeshInit MeshInitialization=ECohtmlComponentMeshInit::LazyInit) |
virtual void | InitializeComponent () override |
virtual void | BeginDestroy () override |
virtual bool | IsReadyForFinishDestroy () override |
virtual void | FinishDestroy () override |
virtual bool | GetMeshes (TArray< TWeakObjectPtr< UStaticMeshComponent >> &WeakMeshes) const |
virtual void | TickComponent (float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override |
cohtml::View * | GetView () const |
cohtml::ViewRenderer * | GetViewRenderer () const |
FCohtmlGesturePolicy * | GetGesturePolicy () |
FCohtmlViewWrapper * | GetViewWrapper () const |
const FCohtmlCaretRect & | GetCaretRect () const |
void | SetCaretRect (int x, int y, unsigned width, unsigned height) |
virtual int32 | GetUserIndex () |
void | SetInputFocusToUI () |
void | RestoreInputFocusFromUI (bool bForceFocusToGame=false) |
cohtml::ECohtmlPageLoadState | GetCurrentPageState () const |
DECLARE_FUNCTION (execCreateDataModelFromStruct) | |
DECLARE_FUNCTION (execUpdateWholeDataModelFromStruct) | |
DECLARE_FUNCTION (execRemoveDataModelFromStruct) | |
Static Public Member Functions | |
static void | CreateSystemIfNecessary (UWorld *World) |
static class ACohtmlSystem * | GetSystemActor (UWorld *World) |
static WeakCohtmlComponentsArray::TIterator | GetUCohtmlBaseComponentIterator (UWorld *world) |
Public Attributes | |
FCohtmlReadyForBindingsSignature | ReadyForBindings |
FCohtmlBindingsReleasedSignature | BindingsReleased |
FCohtmlScriptingReady | ScriptingReady |
TArray< UTexture2D * > | PreloadedTextures |
bool | bEnableComplexCSSSupport |
UTextureRenderTarget2D * | Texture |
TEnumAsByte< enum TextureFilter > | Filter |
bool | bReceiveInput |
bool | bDelayedUpdate |
bool | bUseWideColorTextures |
TArray< FCohtmlMeshData > | MeshData |
TArray< CohtmlDelegateFunctorWrapper > | JSEventCallbackWrappers |
EMouseCursor::Type | CurrentMouseCursor |
Friends | |
class | TCohtmlViewListener< UCohtmlBaseComponent > |
void UCohtmlBaseComponent::AddPreloadedTexture | ( | UTexture2D * | Texture | ) |
Adds an already loaded Texture to the PreloadedTextures collection. This is useful for ensuring that the requests for UE4 textures will be working over already loaded assets, leading to fast response times.
void UCohtmlBaseComponent::BeginDebugFrameSave | ( | ) |
Starts saving render frames to disk
void UCohtmlBaseComponent::CreateDataModelFromObject | ( | const FString & | Name, |
UObject * | Model | ||
) |
Creates a global variable (data model) in JavaScript from an UObject
void UCohtmlBaseComponent::CreateDataModelFromStruct | ( | const FString & | Name, |
const TFieldPath< FStructProperty > | Arg | ||
) |
Creates a global variable (data model) in JavaScript from a UStruct
UCohtmlJSEvent* UCohtmlBaseComponent::CreateJSEvent | ( | ) |
Creates an event that will be executed in JavaScript
void UCohtmlBaseComponent::DebugSaveNextFrame | ( | ) |
Saves next render frame to disk
void UCohtmlBaseComponent::EnableDelayedUpdate | ( | bool | bEnabled | ) |
Delays UI updates until after cameras are updated. Read the section in the FAQ page of the documentation before using
void UCohtmlBaseComponent::EnableRendering | ( | bool | bEnabled | ) |
Enables or disables the recording of rendering commands for the view. Enabled by default.
void UCohtmlBaseComponent::EndDebugFrameSave | ( | ) |
Stops saving render frames to disk
|
virtual |
Used for specifying when the mesh needs to be ready to receive input. If left unspecified, the mesh will be loaded lazily, which means it will take between 2-4 frames for the render thread to have it available. If set to "Immediate", the render state will be flagged as dirty and the mesh will be loaded either on the same frame or at most the next. Note: Call manually right after a component's creation to guarantee that all input will be handled in the first frames.
bool UCohtmlBaseComponent::HasRequestedView | ( | ) | const |
Tells if a View has been scheduled for creation
bool UCohtmlBaseComponent::IsReadyForBindings | ( | ) | const |
Tells if the View is ready to be created
bool UCohtmlBaseComponent::IsReadyToCreateView | ( | ) | const |
Tells if the View is ready to be created
void UCohtmlBaseComponent::Load | ( | const FString & | path | ) |
Requests a new URL to be loaded in the View
void UCohtmlBaseComponent::PreloadTextureAsync | ( | const FString & | AssetPath | ) |
Loads a Texture Asynchronously from asset Path. Once loaded, the Texture will be added to the PreloadedTextures collection. This is useful for ensuring that the requests for UE4 textures will be working over already loaded assets, leading to fast response times.
void UCohtmlBaseComponent::PreloadTextureSync | ( | const FString & | AssetPath | ) |
Loads a Texture Synchronously (BLOCKING the main thread) from asset Path. Once loaded, the Texture will be added to the PreloadedTextures collection. This is useful for ensuring that the requests for UE4 textures will be working over already loaded assets, leading to fast response times.
void UCohtmlBaseComponent::RegisterForEvent | ( | UPARAM(DisplayName="JavaScript Event Name") FString | JSEventName, |
UPARAM(DisplayName="Event") FCohtmlJSEventBPCallback | Delegate | ||
) |
You can use this to bind a Blueprint event to an arbitrary JavaScript event. The Blueprint event must have no parameters.
void UCohtmlBaseComponent::Reload | ( | ) |
Requests the View to reload the current URL
void UCohtmlBaseComponent::RemoveAllPreloadedTextures | ( | ) |
Removes all Textures from the PreloadedTextures collection. This can be used when you no longer need any of the textures inside the collection to be kept loaded, for example after changing URL and View is fully loaded. Note: Upon destruction of the CohtmlBaseComponent, PreloadedTextures collection will be cleared automatically, so calling this method isn't mandatory.
void UCohtmlBaseComponent::RemoveDataModelFromObject | ( | UObject * | Model | ) |
Removes a global variable (data model) in JavaScript from a UObject
void UCohtmlBaseComponent::RemoveDataModelFromStruct | ( | const TFieldPath< FStructProperty > | Struct | ) | const |
Removes a global variable (data model) in JavaScript from a UStruct
bool UCohtmlBaseComponent::RemovePreloadedTexture | ( | UTexture2D * | Texture | ) |
Removes a Texture from the PreloadedTextures collection. This can be used when you no longer need a specific texture inside the collection to be kept loaded, for example after changing URL and View is fully loaded. Note: The removal of elements is an operation with linear complexity, consider using RemoveAllPreloadedTextures instead. Note: Upon destruction of the CohtmlBaseComponent, PreloadedTextures collection will be cleared automatically, so calling this method isn't mandatory.
bool UCohtmlBaseComponent::RemovePreloadedTextureFromPath | ( | const FString & | AssetPath | ) |
Removes a Texture from the PreloadedTextures collection. This can be used when you no longer need a specific texture inside the collection to be kept loaded, for example after changing URL and View is fully loaded. Note: The removal of elements is an operation with linear complexity, consider using RemoveAllPreloadedTextures instead. Note: Upon destruction of the CohtmlBaseComponent, PreloadedTextures collection will be cleared automatically, so calling this method isn't mandatory.
|
virtual |
Resizes the View
Reimplemented in UCohtmlComponent, and UCohtmlHUD.
|
virtual |
Resizes the texture where the View is drawn
void UCohtmlBaseComponent::SetSoundAttenuation | ( | const FSoundAttenuationSettings & | 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
void UCohtmlBaseComponent::ShowPaintRects | ( | bool | show | ) |
Tells the view to show/hide debug paint rectangles
void UCohtmlBaseComponent::SynchronizeModels | ( | ) | const |
Synchronize all models marked for update.
void UCohtmlBaseComponent::TriggerJSEvent | ( | const FString & | name, |
UCohtmlJSEvent * | eventData | ||
) | const |
Triggers an event in JavaScript
void UCohtmlBaseComponent::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. (e.g. once per frame)
void UCohtmlBaseComponent::UpdateWholeDataModelFromStruct | ( | const TFieldPath< FStructProperty > | Struct | ) | 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. (e.g. once per frame)
bool UCohtmlBaseComponent::bDelayedUpdate |
Changes this component's tick group to TG_PostUpdateWork and sends bindings before drawing. For more information refer to the FAQ section of the documentation.
bool UCohtmlBaseComponent::bEnableComplexCSSSupport |
Whether to enable support for complex CSS selectors (e.g. div > p, div ~ p)
FCohtmlBindingsReleasedSignature UCohtmlBaseComponent::BindingsReleased |
When fired, the View has released its bindings.
bool UCohtmlBaseComponent::bReceiveInput |
Indicates whether input is forwarded to this view
bool UCohtmlBaseComponent::bUseWideColorTextures |
Use 16 bit textures as intermidiate render targets for rendering the UI.
TArray<UTexture2D*> UCohtmlBaseComponent::PreloadedTextures |
PreloadedTextures collection, keeping the Textures loaded and ready for use. Ideally, the Textures are to be loaded ahead of time and kept in this collection for ensuring that the requests for UE4 textures will be working over already loaded assets, leading to fast response times.
FCohtmlReadyForBindingsSignature UCohtmlBaseComponent::ReadyForBindings |
When fired, the View is ready for binding events. Any event bound prior to this will be ignored
FCohtmlScriptingReady UCohtmlBaseComponent::ScriptingReady |
Called when the View is ready to accept events
UTextureRenderTarget2D* UCohtmlBaseComponent::Texture |
Gives access to the UI Texture