AzNavRail

The Synthetic Tongue (AzNavRailScope)

This document outlines the API surface of AzNavRailScope. This interface defines the DSL used to configure the rail, whether manually or via the generated code.

The Live Dictatorship (v7.25)

The v7.25 KSP Processor injects reactive logic. When using @Az annotations with property bindings (e.g., textProperty = "myTitle"), the generated code no longer passes hardcoded literals. Instead, it accesses your AzActivity instance directly.

Because these properties are ideally mutableStateOf, the entire AzGraph will recompose automatically when your Activity state changes.

Configuration & Theme

azConfig

Controls behavioral and geometrical mechanics.

fun azConfig(
    dockingSide: AzDockingSide = AzDockingSide.LEFT,
    packButtons: Boolean = false,
    noMenu: Boolean = false,
    vibrate: Boolean = false,
    displayAppName: Boolean = false,
    activeClassifiers: Set<String> = emptySet(),
    usePhysicalDocking: Boolean = false,
    expandedWidth: Dp = 130.dp,
    collapsedWidth: Dp = 80.dp,
    showFooter: Boolean = true
)

azTheme

Controls the visual style of the rail.

fun azTheme(
    activeColor: Color = Color.Unspecified,
    defaultShape: AzButtonShape = AzButtonShape.CIRCLE,
    headerIconShape: AzHeaderIconShape = AzHeaderIconShape.CIRCLE
)

azAdvanced

Controls system overrides, loading states, and floating window bindings.

fun azAdvanced(
    isLoading: Boolean = false,
    helpEnabled: Boolean = false,
    onDismissHelp: (() -> Unit)? = null,
    overlayService: Class<out android.app.Service>? = null,
    onUndock: (() -> Unit)? = null,
    enableRailDragging: Boolean = false,
    onRailDrag: ((Float, Float) -> Unit)? = null,
    onOverlayDrag: ((Float, Float) -> Unit)? = null,
    onItemGloballyPositioned: ((String, Rect) -> Unit)? = null,
    helpList: Map<String, Any> = emptyMap()
)

Hidden Menu Builders (for azRailRelocItem)

Item Builders

The following functions are used to define the rail structure.