Quartz UI ↗
Browse docs
On this page
Private preview · 0.57.0-devView Markdown

QuartzUIShellComponent: declaration reference

0.57.0-dev · beta source documentation. Native, Blueprint, Editor and rendering examples are source-reviewed, not executed in Unreal during this scan. See validation and limits.

Pinned source (source: Source/QuartzUIRuntime/Public/QuartzUIShellComponent.h) · integration recipe · practical guide

FQuartzUIShellReady

Public delegate. The shell has completed document loading and the matching contract handshake.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIShellComponent recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Add QuartzUI Shell; call Start UI Shell when using Manual startup. Observes subsystem shell; host destruction detaches observation.

Avoid: Creating additional browser widgets for the same canonical shell. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIShellComponent.h#L13)

FQuartzUIShellFailed

Public delegate. Shell startup or runtime failure. Shell is null when startup failed before view creation.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIShellComponent recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Add QuartzUI Shell; call Start UI Shell when using Manual startup. Observes subsystem shell; host destruction detaches observation.

Avoid: Creating additional browser widgets for the same canonical shell. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIShellComponent.h#L18)

FQuartzUIShellStopped

Public delegate. The previously canonical shell has completed its explicit close lifecycle.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIShellComponent recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Add QuartzUI Shell; call Start UI Shell when using Manual startup. Observes subsystem shell; host destruction detaches observation.

Avoid: Creating additional browser widgets for the same canonical shell. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIShellComponent.h#L24)

UQuartzUIShellComponent

Public type. Reusable exact-player adapter for the subsystem-owned retained QuartzUI shell. Component destruction only releases delegate bindings; it never owns or implicitly closes the browser document.

Prerequisites / integration: Exact local player and configured app; Slate/UMG dependencies for native presentation work. Use the QuartzUIShellComponent recipe in the host module QuartzUIRuntime.

Minimal example / lifecycle: Add QuartzUI Shell; call Start UI Shell when using Manual startup. Observes subsystem shell; host destruction detaches observation.

Avoid: Creating additional browser widgets for the same canonical shell. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: Source/QuartzUIRuntime/Public/QuartzUIShellComponent.h#L34)

Complete header

Source snapshot, not an additional example. Unreal annotations distinguish exposed Blueprint nodes from native-only/private methods.

#pragma once

#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "QuartzUIView.h"

#include "QuartzUIShellComponent.generated.h"

class ULocalPlayer;
class UQuartzUISubsystem;

/** The shell has completed document loading and the matching contract handshake. */
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
	FQuartzUIShellReady,
	UQuartzUIView*, Shell);

/** Shell startup or runtime failure. Shell is null when startup failed before view creation. */
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(
	FQuartzUIShellFailed,
	UQuartzUIView*, Shell,
	FString, FailureReason);

/** The previously canonical shell has completed its explicit close lifecycle. */
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(
	FQuartzUIShellStopped,
	UQuartzUIView*, Shell);

/**
 * Reusable exact-player adapter for the subsystem-owned retained QuartzUI shell.
 * Component destruction only releases delegate bindings; it never owns or
 * implicitly closes the browser document.
 */
UCLASS(Blueprintable, ClassGroup = (QuartzUI), meta = (BlueprintSpawnableComponent, DisplayName = "QuartzUI Shell"))
class QUARTZUIRUNTIME_API UQuartzUIShellComponent : public UActorComponent
{
	GENERATED_BODY()

public:
	UQuartzUIShellComponent();

	/** Starts or reuses the exact local player's configured shell. */
	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Shell", meta = (DisplayName = "Start UI Shell"))
	bool StartShell();

	/** Explicitly closes the exact local player's canonical shell. */
	UFUNCTION(BlueprintCallable, Category = "QuartzUI|Shell", meta = (DisplayName = "Stop UI Shell"))
	bool StopShell();

	UFUNCTION(BlueprintPure, Category = "QuartzUI|Shell", meta = (DisplayName = "Get UI Shell"))
	UQuartzUIView* GetShell() const;

	UFUNCTION(BlueprintPure, Category = "QuartzUI|Shell", meta = (DisplayName = "Is UI Ready"))
	bool IsShellReady() const;

	UFUNCTION(BlueprintPure, Category = "QuartzUI|Shell", meta = (DisplayName = "Get UI Shell Failure"))
	FString GetShellFailure() const;

	/** Exact player resolved from a PlayerController, HUD, pawn, or bounded owner chain. */
	UFUNCTION(BlueprintPure, Category = "QuartzUI|Shell")
	ULocalPlayer* GetShellLocalPlayer() const;

	UPROPERTY(BlueprintAssignable, Category = "QuartzUI|Shell")
	FQuartzUIShellReady OnShellReady;

	UPROPERTY(BlueprintAssignable, Category = "QuartzUI|Shell")
	FQuartzUIShellFailed OnShellFailed;

	UPROPERTY(BlueprintAssignable, Category = "QuartzUI|Shell")
	FQuartzUIShellStopped OnShellStopped;

	/** Named, explicitly registered action forwarded by the canonical shell view. */
	UPROPERTY(BlueprintAssignable, Category = "QuartzUI|Actions")
	FQuartzUIActionReceived OnAction;

protected:
	virtual void BeginPlay() override;
	virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;

private:
	UQuartzUISubsystem* GetQuartzUISubsystem() const;
	void BindToShell(UQuartzUIView* Shell);
	void UnbindFromShell();

	UFUNCTION()
	void HandleShellStateChanged(EQuartzUIViewState PreviousState, EQuartzUIViewState NewState);

	UFUNCTION()
	void HandleShellAction(FName ActionName);

	UPROPERTY(Transient)
	TObjectPtr<UQuartzUIView> BoundShell;
};