net.kernelpanicsoft.archie.gui.layer¶
Types¶
Layer¶
A self-contained UI layer with its own independent LayoutNode tree and Composition.
LayerStackManager¶
class LayerStackManager(parentComposition: CompositionContext, screenLocals: @Composable
(content: @Composable
() -> Unit) -> Unit)
Manages an ordered stack of Layers for a single screen.
ModalScope¶
interface ModalScope
Receiver scope for modal layer content, exposing a way to close the modal.
ModalTransitionSpec¶
data class ModalTransitionSpec(
val durationMillis: Duration = 180.milliseconds,
val easing: Easing = Easings.OutCubic,
val enterOffsetY: Int = 8,
val maxBackdropAlpha: Int = 132
)
Transition defaults applied to every modal pushed through LayerStackManager.modal.
Properties¶
LocalLayerDepth¶
val LocalLayerDepth: ProvidableCompositionLocal<Int>
The depth index of the currently composed layer (base layer is 0).
LocalLayerManager¶
val LocalLayerManager: ProvidableCompositionLocal<LayerStackManager>
Provides the nearest LayerStackManager to composables inside a net.kernelpanicsoft.archie.gui.ComposeScreen or net.kernelpanicsoft.archie.gui.ComposeContainerScreen.
LocalLayerManagerOrNull¶
val LocalLayerManagerOrNull: ProvidableCompositionLocal<LayerStackManager?>
Like LocalLayerManager, but null instead of throwing when there's no LayerStackManager in scope - for code that wants to opportunistically interact with one (e.g. net.kernelpanicsoft.archie.gui.theme.Theme publishing LayerStackManager.rootTheme) without requiring every caller to run inside a net.kernelpanicsoft.archie.gui.ComposeScreen.