class
CArcStyle
Owns the registered style sets and tracks the active one
- Module
- Arc
- Header
#include "Arc/Style/CArcStyle.h"- Namespace
Arcf
Public functions
| Returns | Name | Description |
|---|---|---|
CArcStyle& | Get | |
void | Initialize | |
void | RegisterStyleSet | |
void | SetActiveStyleSet | |
const CArcStyleSet& | GetActiveStyleSet | Falls back to the built-in dark theme when no set is registered, so widgets can resolve style defaults before Initialize() runs |
const CArcStyleSet* | FindStyleSet | |
ArcColor | GetColor | |
std::vector<std::string> | GetStyleSetNames | |
uint32_t | AddStyleSetChangedListener | Fires whenever the active style set changes identity or content: SetActiveStyleSet, and RegisterStyleSet when it replaces the active set (the style hot-reload path). |
void | RemoveStyleSetChangedListener | |
void | Shutdown | Drops 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() constFalls 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) constGetColor
C++
ArcColor GetColor(const std::string& key) constGetStyleSetNames
C++
std::vector<std::string> GetStyleSetNames() constAddStyleSetChangedListener
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