StackScope

sealed class StackScope : UiScope(source)

Callback-lifetime scope for emitting and configuring direct stack children.

Instances are created only by the library and are valid on their constructing thread while the stack callback runs.

Functions

Link copied to clipboard
fun Modifier.align(alignment: Alignment): Modifier

Appends a two-axis placement override to this modifier chain.

Link copied to clipboard
fun UiScope.Button(label: UiText, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one fixed-height profile-backed pointer button.

fun UiScope.Button(label: String, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one literal fixed-height profile-backed pointer button.

Link copied to clipboard
fun UiScope.Checkbox(label: UiText, state: CheckboxState, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one Minecraft-profile Checkbox backed by caller-owned state.

fun UiScope.Checkbox(label: String, state: CheckboxState, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Literal-label overload of Checkbox.

Link copied to clipboard
fun UiScope.Column(modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, spacing: Int = 0, verticalArrangement: Arrangement = Arrangement.Start, horizontalAlignment: HorizontalAlignment = HorizontalAlignment.Start, content: ColumnScope.() -> Unit)

Emits one column container with the descriptions produced by its callback.

Link copied to clipboard
fun <T : Any> UiScope.CycleButton(state: CycleButtonState<T>, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, label: (T) -> UiText = { value -> UiText.Literal(state.formatKnownMember(value)) })

Emits one finite-option Minecraft-profile CycleButton.

Link copied to clipboard
fun element(element: Element)

Emits one immutable element description. The element is retained by this callback-lifetime scope without being copied, wrapped, registered, or dispatched by component type. The call must run on the scope's constructing thread while its enclosing callback is active.

Link copied to clipboard
fun UiScope.Grid(columns: Int, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, horizontalSpacing: Int = 0, verticalSpacing: Int = 0, contentAlignment: Alignment = Alignment.TopStart, content: GridScope.() -> Unit)

Emits one fixed-column grid with the descriptions produced by its callback.

Link copied to clipboard
fun UiScope.Image(source: ImageSource, size: IntSize? = null, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one immutable nearest-sampled image component.

fun UiScope.Image(source: ImageSource, sourceRegion: IntRect, size: IntSize = IntSize(sourceRegion.width, sourceRegion.height), modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one immutable nearest-sampled source region from an image.

Link copied to clipboard
fun UiScope.LoadingIndicator(size: IntSize = IntSize(10, 4), modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits the active Minecraft profile's discrete loading animation.

Link copied to clipboard
fun UiScope.PlayerHead(source: PlayerSkinSource = PlayerSkinSource.CurrentPlayer, size: Int = 24, showHat: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, loadingContent: UiScope.() -> Unit? = null, failureContent: UiScope.() -> Unit? = null)

Emits one square layered player head.

Link copied to clipboard
fun UiScope.ProgressBar(progress: Double, size: IntSize = IntSize(100, 12), modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one determinate Minecraft-profile progress bar.

Link copied to clipboard
fun UiScope.Row(modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, spacing: Int = 0, horizontalArrangement: Arrangement = Arrangement.Start, verticalAlignment: VerticalAlignment = VerticalAlignment.Top, content: RowScope.() -> Unit)

Emits one row container with the descriptions produced by its callback.

Link copied to clipboard
fun UiScope.ScrollArea(state: ScrollState, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, scrollRate: Int = 9, content: UiScope.() -> Unit)

Emits one profile-backed scroll viewport containing exactly one root.

Link copied to clipboard
fun UiScope.Scrollbar(state: ScrollState, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one independently placed profile-backed vertical scrollbar linked to state.

Link copied to clipboard
fun <T : Any, K : Any> UiScope.SelectionList(items: List<T>, keyOf: (T) -> K, state: SelectionListState<K>, viewportSize: IntSize, rowHeight: Int, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, scrollRate: Int = 10, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)

Emits a selectable fixed-row virtual list backed by an immutable in-memory snapshot.

Link copied to clipboard
fun UiScope.Slider(label: UiText, state: SliderState, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one horizontal Minecraft-profile Slider backed by caller-owned state.

fun UiScope.Slider(label: String, state: SliderState, width: Int = 150, enabled: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Literal-label overload of Slider.

Link copied to clipboard
fun UiScope.Slot(bind: SlotBinding? = null, highlightable: Boolean = true, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.() -> Unit? = null)

Emits one 18 by 18 inventory slot with an optional item root or synchronized binding.

Link copied to clipboard
fun UiScope.Spacer(modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one empty spacer component.

Link copied to clipboard
fun UiScope.Stack(modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, contentAlignment: Alignment = Alignment.TopStart, content: StackScope.() -> Unit)

Emits one overlay stack with the descriptions produced by its callback.

Link copied to clipboard
fun UiScope.Tab(label: UiText, selected: Boolean, width: Int = 150, enabled: Boolean = true, indicator: TabSelectionIndicator = TabSelectionIndicator.Underline, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one externally controlled tab.

fun UiScope.Tab(label: String, selected: Boolean, width: Int = 150, enabled: Boolean = true, indicator: TabSelectionIndicator = TabSelectionIndicator.Underline, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Literal overload of Tab with the same ownership and failure contract.

Link copied to clipboard
fun UiScope.Text(text: UiText, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one single-line profile-backed text component.

fun UiScope.Text(text: String, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one literal single-line profile-backed text component.

Link copied to clipboard
fun UiScope.TextField(state: TextFieldState, enabled: Boolean = true, textStyle: TextStyle = TextStyle.TextField, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one 200 by 20 single-line text field.

fun UiScope.TextField(state: TextFieldState, size: IntSize, enabled: Boolean = true, textStyle: TextStyle = TextStyle.TextField, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)

Emits one explicitly sized single-line text field.

Link copied to clipboard
fun <T : Any, K : Any> UiScope.VirtualList(items: List<T>, keyOf: (T) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)

Emits a fixed-row virtual viewport backed by an immutable in-memory list.

fun <T : Any, K : Any> UiScope.VirtualList(itemCount: () -> Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int?? = null, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)

Emits a fixed-row virtual viewport backed by a caller-owned dynamic indexed source.

fun <T : Any, K : Any> UiScope.VirtualList(itemCount: Int, itemAt: (Int) -> T, keyAt: (Int) -> K, state: VirtualListState<K>, viewportSize: IntSize, rowHeight: Int, indexOfKey: (K) -> Int? = { target -> (0 until itemCount).firstOrNull { index -> keyAt(index) == target } }, scrollRate: Int = 10, canLoadLeading: Boolean = false, canLoadTrailing: Boolean = false, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null, content: UiScope.(T) -> Unit)

Emits a fixed-row virtual viewport backed by a known finite indexed source.