# PaneScaffoldHorizontalOrder

Artifact: [androidx.compose.material3.adaptive:adaptive-layout](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder.kt+class:androidx.compose.material3.adaptive.layout.PaneScaffoldHorizontalOrder) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.2.0) Common/All
- Cmn

  ```
  @ExperimentalMaterial3AdaptiveApi
  sealed interface PaneScaffoldHorizontalOrder<Role : PaneScaffoldRole>
  ```
Known direct subclasses [ThreePaneScaffoldHorizontalOrder](https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldHorizontalOrder)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldHorizontalOrder` | Represents the horizontal order of panes in a `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/package-summary#ThreePaneScaffold(androidx.compose.ui.Modifier,androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldHorizontalOrder,kotlin.Function1,kotlin.Function1,androidx.compose.material3.adaptive.layout.PaneExpansionState,kotlin.Function2,kotlin.Function1)` from start to end. |

*** ** * ** ***

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, `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldHorizontalOrder` represents an order of three panes supported by the three pane scaffold implementations like `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ListDetailPaneScaffold.composable#ListDetailPaneScaffold(androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function2,androidx.compose.material3.adaptive.layout.PaneExpansionState)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/SupportingPaneScaffold.composable#SupportingPaneScaffold(androidx.compose.material3.adaptive.layout.PaneScaffoldDirective,androidx.compose.material3.adaptive.layout.ThreePaneScaffoldValue,kotlin.Function1,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Function1,kotlin.Function2,androidx.compose.material3.adaptive.layout.PaneExpansionState)`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/ThreePaneScaffoldHorizontalOrder` |   |

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#forEach(kotlin.Function1)(action: (Role) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#forEach(kotlin.Function1)` for each pane in the order. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#forEachIndexed(kotlin.Function2)(action: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, Role) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#forEachIndexed(kotlin.Function2)` for each pane in the order, with its index. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#forEachIndexedReversed(kotlin.Function2)(action: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, Role) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Performs the given `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#forEachIndexedReversed(kotlin.Function2)` for each pane in the order, with its index, in reverse order. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#indexOf(androidx.compose.material3.adaptive.layout.PaneScaffoldRole)(role: Role)` Returns the index of the given role in the order. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#size()` The number of panes in the order. | Cmn |

## Public functions

### forEach

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.2.0)

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

Performs the given `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#forEach(kotlin.Function1)` for each pane in the order.

### forEachIndexed

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.2.0)

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

Performs the given `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#forEachIndexed(kotlin.Function2)` for each pane in the order, with its index.

### forEachIndexedReversed

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.2.0)

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

Performs the given `https://developer.android.com/reference/kotlin/androidx/compose/material3/adaptive/layout/PaneScaffoldHorizontalOrder#forEachIndexedReversed(kotlin.Function2)` for each pane in the order, with its index, in reverse order.

### indexOf

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.2.0)

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

Returns the index of the given role in the order.

## Public properties

### size

Cmn Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive#1.2.0)

```
val size: Int
```

The number of panes in the order.