class

FMiriGraphicsActionRegistry

Action name -> handler, for every .ui button and widget event whose action is not a built-in verb. One registry serves the packaged game, the editor's play-in-editor session and the test hosts, so a handler registered from a game module behaves the same in all of them.

Module
MiriGraphics
Header
#include "MiriGraphics/FMiriGraphicsActionRegistry.h"
Namespace
Mowo

Handlers are stored as plain function pointers plus an opaque state the REGISTRANT allocated and frees (the template Register below instantiates in the caller's image): a std::function built in a game module and relocated or freed inside this library crosses allocators. An entry is swept with the module that registered it (FModuleAnchor::Here via owner), so a handler is never called into unloaded code.

Main thread only, like the screen stack.

Type aliases

AliasDescription
using FInvokeFn = void (*)(void* state, const FMiriGraphicsActionContext& context)
using FDestroyFn = void (*)(void* state)

Public functions

ReturnsNameDescription
FMiriGraphicsActionRegistry&Get
FMiriGraphicsActionScopeForActiveStackScope of the stack gameplay UI is on right now (the packaged game's, or play-in-editor's during a session; MUIStatics::GetActiveStack).
FMiriGraphicsActionHandleRegisterhandler is invocable as void() or void(const FMiriGraphicsActionContext&).
FMiriGraphicsActionHandleRegisterRawTakes ownership of state even when it refuses the registration (empty action), calling destroy on it.
boolUnregister
boolIsRegistered
size_tRemoveHostDrop everything a host (a play session's stack) registered.
size_tRemoveScreen
size_tRemoveModuleDrop every entry whose registering code lives in the unloading module; run by the module-unload broadcast.
boolDispatchRuns the narrowest handler registered for ctx.Action (or its verb before the first ':', with the rest as Payload).
boolHasAction
size_tCount
boolReportUnhandledLogs "no handler for action" once per action name.

Function details

Get

C++
static FMiriGraphicsActionRegistry& Get()

ForActiveStack

C++
static FMiriGraphicsActionScope ForActiveStack()

Scope of the stack gameplay UI is on right now (the packaged game's, or play-in-editor's during a session; MUIStatics::GetActiveStack). Handlers registered against it are dropped when that session's stack goes away. A null Host scope (no stack yet) is global.

Register

C++
template<typename F> FMiriGraphicsActionHandle Register(const std::string& action, F&& handler, const FMiriGraphicsActionScope& scope = FMiriGraphicsActionScope(), const void* owner = FModuleAnchor::Here())

handler is invocable as void() or void(const FMiriGraphicsActionContext&). Registering the same (action, scope) again replaces the earlier handler (the earlier handle goes inert); a replacement from another module is logged as a warning.

RegisterRaw

C++
FMiriGraphicsActionHandle RegisterRaw(const std::string& action, const FMiriGraphicsActionScope& scope, const void* owner, FInvokeFn invoke, FDestroyFn destroy, void* state)

Takes ownership of state even when it refuses the registration (empty action), calling destroy on it.

Unregister

C++
bool Unregister(uint64_t id)

IsRegistered

C++
bool IsRegistered(uint64_t id) const

RemoveHost

C++
size_t RemoveHost(const void* host)

Drop everything a host (a play session's stack) registered.

RemoveScreen

C++
size_t RemoveScreen(const void* host, const std::string& screen)

RemoveModule

C++
size_t RemoveModule(void* moduleHandle)

Drop every entry whose registering code lives in the unloading module; run by the module-unload broadcast.

Dispatch

C++
bool Dispatch(const FMiriGraphicsActionContext& context)

Runs the narrowest handler registered for ctx.Action (or its verb before the first ':', with the rest as Payload). Returns whether one ran.

HasAction

C++
bool HasAction(const std::string& action, const void* host = nullptr, const std::string& screen = std::string()) const

Count

C++
size_t Count() const

ReportUnhandled

C++
bool ReportUnhandled(const std::string& action)

Logs "no handler for action" once per action name. Returns true on the first report. A later registration of the name makes it report again.

Generated from MiriGraphics/FMiriGraphicsActionRegistry.h via mirigraphics.json · Dec 5, 2026Version 1.1.0