🌈 Create new beautiful Compose Gradients with our new wesite ->
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
public class PaneScaffoldDirective(
    public val maxHorizontalPartitions: Int,
    public val horizontalPartitionSpacerSize: Dp,
    public val maxVerticalPartitions: Int,
    public val verticalPartitionSpacerSize: Dp,
    public val defaultPanePreferredWidth: Dp,
    public val defaultPanePreferredHeight: Dp,
    public val excludedBounds: List<Rect>,
    public 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
public 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,
    )
    public 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.

Members

Companion

Source set: Common
public companion object

Properties

Default

Source set: Common
public val Default: PaneScaffoldDirective =
            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.

Content updated: