class

FArcWidgetFactory

Turns a serialized .ui tree into a live Arc widget tree. The widget class name on each node keys a small construction table; named nodes are collected so a game can resolve them for script binding after instantiate.

Module
ArcUI
Header
#include "ArcUI/FArcWidgetFactory.h"
Namespace
Mowo

Properties

TypeNameDescription
static constexpr int32_tMaxUserWidgetDepthHow deep UserWidget composition may nest before the factory refuses. Default 8.

Public functions

ReturnsNameDescription
FBuildResultBuild
FBuildResultBuild
FBuildResultBuild
voidApplyBindingValueWrites one resolved binding value onto a live widget.
std::stringFormatBindingNumber
voidSetImageDecoderProcess-wide image decode hook + GPU texture cache for brush images.
voidClearImageCache
Arcf::Ref<Arcf::IArcRHITexture>GetOrLoadImage
Arcf::Ref<Arcf::IArcRHITexture>GetOrLoadSizedImageOne image exported at several pixel sizes ("<stem>-<N>.png"): picks the smallest export that still covers the on-screen size, because a 512 px source sampled down to 16 px without mips shimmers and a 16 px one stretched up blurs.
voidSetMediaSourceFactoryProcess-wide clip decoder for VideoPlayer nodes, injected by the host for the same reason the image decoder is: playback lives in Game.
boolHasMediaSourceFactory
std::unique_ptr<IArcUIMediaSource>CreateMediaSource
boolIsKnownType
std::vector<std::string>RegisteredTypes
voidSetActiveThemeProcess-wide theme every build falls back to when neither the screen nor the build context names one.
const FArcUITheme&ActiveTheme
Arcf::ArcColorResolveColorTokenToken → colour through the active theme, then the default theme.
FArcUINodeComposeUserWidgetComposes a referenced widget asset's tree with the overrides an embedding UserWidget node supplies: every exposed variable writes its value (or its default) onto the target node named by the referenced asset.
boolResolveRightToLeftResolves a node's flow_direction ("inherit", "ltr", "rtl") against the parent's.
FArcUICanvasSlotMirrorCanvasSlotA canvas slot mirrored about the canvas's vertical centre line, which is what a right-to-left canvas places its children by.

Function details

Build

C++
static FBuildResult Build(const FArcUIAsset& asset)

Build

C++
static FBuildResult Build(const FArcUIAsset& asset, const FArcUIBindingResolver& resolver)

Build

C++
static FBuildResult Build(const FArcUIAsset& asset, const FBuildContext& context)

ApplyBindingValue

C++
static void ApplyBindingValue(const std::string& property, const FArcUIBindingValue& value, const Arcf::TSharedPtr<Arcf::AWidget>& widget)

Writes one resolved binding value onto a live widget. Shared between the build-time application and the screen stack's per-frame binding pump.

FormatBindingNumber

C++
static std::string FormatBindingNumber(double number)

SetImageDecoder

C++
static void SetImageDecoder(FArcUIImageDecoder decoder)

Process-wide image decode hook + GPU texture cache for brush images. The cache must be cleared before the Arc bridge/device shuts down.

ClearImageCache

C++
static void ClearImageCache()

GetOrLoadImage

C++
static Arcf::Ref<Arcf::IArcRHITexture> GetOrLoadImage(const std::string& path)

GetOrLoadSizedImage

C++
static Arcf::Ref<Arcf::IArcRHITexture> GetOrLoadSizedImage(const std::string& stem, const std::vector<int32_t>& exportedSizes, float physicalPixels)

One image exported at several pixel sizes ("<stem>-<N>.png"): picks the smallest export that still covers the on-screen size, because a 512 px source sampled down to 16 px without mips shimmers and a 16 px one stretched up blurs.

SetMediaSourceFactory

C++
static void SetMediaSourceFactory(FArcUIMediaSourceFactory factory)

Process-wide clip decoder for VideoPlayer nodes, injected by the host for the same reason the image decoder is: playback lives in Game. Null (the default) builds every VideoPlayer as a settings-only node.

HasMediaSourceFactory

C++
static bool HasMediaSourceFactory()

CreateMediaSource

C++
static std::unique_ptr<IArcUIMediaSource> CreateMediaSource()

IsKnownType

C++
static bool IsKnownType(const std::string& type)

RegisteredTypes

C++
static std::vector<std::string> RegisteredTypes()

SetActiveTheme

C++
static void SetActiveTheme(const FArcUITheme* theme)

Process-wide theme every build falls back to when neither the screen nor the build context names one. Hosts point this at the project theme; the pointer is borrowed, so the owner must outlive the last build.

ActiveTheme

C++
static const FArcUITheme& ActiveTheme()

ResolveColorToken

C++
static Arcf::ArcColor ResolveColorToken(const std::string& token, const Arcf::ArcColor& fallback)

Token → colour through the active theme, then the default theme. Public because the designer resolves the same tokens for its swatches and its token picker, and the two must never drift apart.

ComposeUserWidget

C++
static FArcUINode ComposeUserWidget(const FArcUINode& instance, const FArcUIAsset& referenced)

Composes a referenced widget asset's tree with the overrides an embedding UserWidget node supplies: every exposed variable writes its value (or its default) onto the target node named by the referenced asset.

ResolveRightToLeft

C++
static bool ResolveRightToLeft(const FArcUINode& node, bool inherited)

Resolves a node's flow_direction ("inherit", "ltr", "rtl") against the parent's.

MirrorCanvasSlot

C++
static FArcUICanvasSlot MirrorCanvasSlot(const FArcUICanvasSlot& slot)

A canvas slot mirrored about the canvas's vertical centre line, which is what a right-to-left canvas places its children by.

Generated from ArcUI/FArcWidgetFactory.h via arcui.json · Nov 4, 2026Version 1.0.0