<div class='sourceset sourceset-common'>Common</div>

```kotlin
sealed interface PaneScaffoldHorizontalOrder<Role : PaneScaffoldRole>
```

Represents the horizontal order of panes in a pane scaffold. An implementation of this interface
is supposed to represent an 1-to-1 mapping between all the possible pane roles supported by the
associated pane scaffold, and those panes' index in the order. For example,
[ThreePaneScaffoldHorizontalOrder](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/classes/ThreePaneScaffoldHorizontalOrder) represents an order of three panes supported by the three pane
scaffold implementations like [ListDetailPaneScaffold](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/composable-functions/ListDetailPaneScaffold) and [SupportingPaneScaffold](/jetpack-compose/androidx.compose.material3.adaptive/adaptive-layout/composable-functions/SupportingPaneScaffold).

## Properties

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val size: Int
```

The number of panes in the order.

## Functions

<h2 id="indexof-role">indexOf</h2>

```kotlin
fun indexOf(role: Role): Int
```

Returns the index of the given role in the order.

<hr class="docs-overload-divider">

<h2 id="foreach-action">forEach</h2>

```kotlin
fun forEach(action: (Role) -> Unit)
```

Performs the given [action](/jetpack-compose/androidx.compose.remote/remote-creation-compose/interfaces/Action) for each pane in the order.

<hr class="docs-overload-divider">

<h2 id="foreachindexed-action">forEachIndexed</h2>

```kotlin
fun forEachIndexed(action: (Int, Role) -> Unit)
```

Performs the given [action](/jetpack-compose/androidx.compose.remote/remote-creation-compose/interfaces/Action) for each pane in the order, with its index.

<hr class="docs-overload-divider">

<h2 id="foreachindexedreversed-action">forEachIndexedReversed</h2>

```kotlin
fun forEachIndexedReversed(action: (Int, Role) -> Unit)
```

Performs the given [action](/jetpack-compose/androidx.compose.remote/remote-creation-compose/interfaces/Action) for each pane in the order, with its index, in reverse order.