Start native apps faster with the Composables CLI ->
Class

PaneScaffoldDirective

Top-level directives about how a pane scaffold should be arranged and spaced, like how many partitions the layout can be split into and what should be the gutter size.

Source set: Common
class PaneScaffoldDirective(
    val maxHorizontalPartitions: Int,
    val horizontalPartitionSpacerSize: Dp,
    val maxVerticalPartitions: Int,
    val verticalPartitionSpacerSize: Dp,
    val defaultPanePreferredWidth: Dp,
    val defaultPanePreferredHeight: Dp,
    val excludedBounds: List<Rect>,
    @get:JvmName("shouldAutoFocusCurrentDestination") val shouldAutoFocusCurrentDestination: Boolean,
)

Top-level directives about how a pane scaffold should be arranged and spaced, like how many partitions the layout can be split into and what should be the gutter size.

Functions

copy

Source set: Common
fun copy(
        maxHorizontalPartitions: Int = this.maxHorizontalPartitions,
        horizontalPartitionSpacerSize: Dp = this.horizontalPartitionSpacerSize,
        maxVerticalPartitions: Int = this.maxVerticalPartitions,
        verticalPartitionSpacerSize: Dp = this.verticalPartitionSpacerSize,
        defaultPanePreferredWidth: Dp = this.defaultPanePreferredWidth,
        excludedBounds: List<Rect> = this.excludedBounds,
        defaultPanePreferredHeight: Dp = this.defaultPanePreferredHeight,
    ): PaneScaffoldDirective

Returns a new copy of PaneScaffoldDirective with specified fields overwritten. Use this method to create a custom PaneScaffoldDirective from the default instance or the result of calculatePaneScaffoldDirective.

Parameters

maxHorizontalPartitions the max number of partitions along the horizontal axis the layout can be split into.
horizontalPartitionSpacerSize Size of the spacers between horizontal partitions. It's equivalent to the left/right margins the horizontal partitions.
maxVerticalPartitions the max number of partitions along the vertical axis the layout can be split into.
verticalPartitionSpacerSize Size of the spacers between vertical partitions. It's equivalent to the top/bottom margins of the vertical partitions.
defaultPanePreferredWidth Default preferred width of panes that will be used by the scaffold if there's no PaneScaffoldScope.preferredWidth provided with a pane.
excludedBounds the bounds of all areas in the window that the layout needs to avoid displaying anything upon it. Usually these bounds represent where physical hinges are.
defaultPanePreferredHeight Default preferred height of panes that will be used by the scaffold if there's no PaneScaffoldScope.preferredHeight provided with a pane.

copy

Source set: Common
@Deprecated(
        "Maintained for binary compatibility. Use version with defaultPanePreferredHeight instead.",
        level = DeprecationLevel.HIDDEN,
    )
    fun copy(
        maxHorizontalPartitions: Int = this.maxHorizontalPartitions,
        horizontalPartitionSpacerSize: Dp = this.horizontalPartitionSpacerSize,
        maxVerticalPartitions: Int = this.maxVerticalPartitions,
        verticalPartitionSpacerSize: Dp = this.verticalPartitionSpacerSize,
        defaultPanePreferredWidth: Dp = this.defaultPanePreferredWidth,
        excludedBounds: List<Rect> = this.excludedBounds,
    ): PaneScaffoldDirective

Returns a new copy of PaneScaffoldDirective with specified fields overwritten. Use this method to create a custom PaneScaffoldDirective from the default instance or the result of calculatePaneScaffoldDirective.

Parameters

maxHorizontalPartitions the max number of partitions along the horizontal axis the layout can be split into.
horizontalPartitionSpacerSize Size of the spacers between horizontal partitions. It's equivalent to the left/right margins the horizontal partitions.
maxVerticalPartitions the max number of partitions along the vertical axis the layout can be split into.
verticalPartitionSpacerSize Size of the spacers between vertical partitions. It's equivalent to the top/bottom margins of the vertical partitions.
defaultPanePreferredWidth Default preferred width of panes that will be used by the scaffold if there's no PaneScaffoldScope.preferredWidth provided with a pane.
excludedBounds the bounds of all areas in the window that the layout needs to avoid displaying anything upon it. Usually these bounds represent where physical hinges are.

equals

Source set: Common
override fun equals(other: Any?): Boolean

hashCode

Source set: Common
override fun hashCode(): Int

toString

Source set: Common
override fun toString(): String

Members

Companion

Source set: Common
companion object

Properties

Default

Source set: Common
val Default =
            PaneScaffoldDirective(
                maxHorizontalPartitions = 1,
                horizontalPartitionSpacerSize = 0.dp,
                maxVerticalPartitions = 1,
                verticalPartitionSpacerSize = 0.dp,
                defaultPanePreferredWidth = DefaultPreferredWidth,
                defaultPanePreferredHeight = DefaultPreferredHeight,
                excludedBounds = emptyList(),
            )

A default instance of PaneScaffoldDirective that suggests a single-pane layout that occupies the full window. To create a customized PaneScaffoldDirective, you can use PaneScaffoldDirective.copy on the default instance to create a copy with custom values.