TilesEventDispatcher

Surface a screen's TilesManager exposes for routing locally-raised TileEvent/TileGroupEvent instances to the tile(s) that should handle them, and for looking up/patching EventSchemas already registered anywhere in the screen's tile tree by id — the collaborator behind dev.catbit.mosaic.client.ui.sdui.foundation.events.EventRunningScope.tilesEventDispatcher and dev.catbit.mosaic.client.ui.sdui.foundation.tiles.renderer.TileRenderingScope's own dispatchEvent/dispatchGroupEvent calls (via the UIEvent those emit).

Inheritors

Functions

Link copied to clipboard
abstract fun getEventSchema(eventId: String): EventSchema?

Looks up the EventSchema registered under eventId anywhere in the screen's tile tree — the lookup behind TriggerEvent.

Link copied to clipboard
abstract fun onEvent(tileId: String, event: TileEvent): Result<Unit>

Delivers event to the TileHolder whose id equals tileId, via that holder's own onTileEvent override — the routing behind dev.catbit.mosaic.client.ui.sdui.foundation.tiles.renderer.TileRenderingScope.dispatchEvent.

Link copied to clipboard
abstract fun onGroupEvent(event: TileGroupEvent): Result<Unit>

Delivers event to every TileHolder in the whole screen's tree whose handlesGroupEvent returns true for it, via each one's own onTileGroupEvent override — the routing behind dev.catbit.mosaic.client.ui.sdui.foundation.tiles.renderer.TileRenderingScope.dispatchGroupEvent.

Link copied to clipboard
abstract fun updateEventHolder(eventId: String, data: Map<String, Any?>): Result<Unit>

Applies data as a shallow JSON-patch merge onto the event registered under eventId — the mechanism behind UpdateEvents, the event-level equivalent of TilesEditor.updateTile.