class

CArcStyle

Owns the registered style sets and tracks the active one

Module
Arc
Header
#include "Arc/Style/CArcStyle.h"
Namespace
Arcf

Public functions

ReturnsNameDescription
CArcStyle&Get
voidInitialize
voidRegisterStyleSet
voidSetActiveStyleSet
const CArcStyleSet&GetActiveStyleSetFalls back to the built-in dark theme when no set is registered, so widgets can resolve style defaults before Initialize() runs
const CArcStyleSet*FindStyleSet
ArcColorGetColor
std::vector<std::string>GetStyleSetNames
uint32_tAddStyleSetChangedListenerFires whenever the active style set changes identity or content: SetActiveStyleSet, and RegisterStyleSet when it replaces the active set (the style hot-reload path).
voidRemoveStyleSetChangedListener
voidShutdownDrops every registered set (and their brush texture refs) plus all listeners.

Function details

Get

C++
static CArcStyle& Get()

Initialize

C++
void Initialize()

RegisterStyleSet

C++
void RegisterStyleSet(const std::string& name, CArcStyleSet&& styleSet)

SetActiveStyleSet

C++
void SetActiveStyleSet(const std::string& name)

GetActiveStyleSet

C++
const CArcStyleSet& GetActiveStyleSet() const

Falls back to the built-in dark theme when no set is registered, so widgets can resolve style defaults before Initialize() runs

FindStyleSet

C++
const CArcStyleSet* FindStyleSet(const std::string& name) const

GetColor

C++
ArcColor GetColor(const std::string& key) const

GetStyleSetNames

C++
std::vector<std::string> GetStyleSetNames() const

AddStyleSetChangedListener

C++
uint32_t AddStyleSetChangedListener(std::function<void()> callback)

Fires whenever the active style set changes identity or content: SetActiveStyleSet, and RegisterStyleSet when it replaces the active set (the style hot-reload path). Listeners must invalidate anything that cached a style-derived value — colors resolve per paint, but metrics feed the desired-size cache.

RemoveStyleSetChangedListener

C++
void RemoveStyleSetChangedListener(uint32_t handle)

Shutdown

C++
void Shutdown()

Drops every registered set (and their brush texture refs) plus all listeners. Must run before the RHI device is destroyed.

Generated from Arc/Style/CArcStyle.h via arc.json · Nov 5, 2026Version 1.0.0