TileRendererManager

Resolves a TileSchema's concrete class to its registered TileRenderer and actually renders it — the single entry point every tile in a screen's tree goes through, whether it's the root tile itself or a child reached via TileRenderingScope.RenderChild/RenderChildren (both of which delegate back into this same Render through LocalTileRendererManager).

One instance is built app-wide (by MosaicModules), from the merge of every built-in TileDefinition and whatever custom ones were passed via MosaicDependencyInjectionConfig.tileDefinitions — so a custom tile renders through exactly the same path as a built-in one.

Parameters

tileRenderers

every registered TileRenderer, keyed by the TileSchema subclass it renders.

Constructors

Link copied to clipboard
constructor(tileRenderers: Map<KClass<out TileSchema>, TileRenderer<*>>)

Functions

Link copied to clipboard
fun Render(tileSchema: TileSchema, onEvent: (UIEvent) -> Unit)

Renders tileSchema by looking up the TileRenderer registered for its concrete class and invoking its Render, inside a fresh TileRenderingScope built from tileSchema's own id and events plus the given onEvent sink.