# androidx.compose.ui.node

Common/AllAndroid/JVM

## Interfaces

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/CompositionLocalConsumerModifierNode` | Implementing this interface allows your `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` subclass to read `https://developer.android.com/reference/kotlin/androidx/compose/runtime/CompositionLocal` via the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.CompositionLocalConsumerModifierNode).currentValueOf(androidx.compose.runtime.CompositionLocal)` function. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode` | Represents a `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` which can be a delegate of another `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.RegistrationHandle` |   | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that draws into the space of the layout. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/GlobalPositionAwareModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` whose `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/GlobalPositionAwareModifierNode#onGloballyPositioned(androidx.compose.ui.layout.LayoutCoordinates)` is called with the final LayoutCoordinates of the Layout when the global position of the content may have changed. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/InteroperableComposeUiNode` | This interface allows the layout inspector to access inspect instances of Views that are associated with a Compose UI node. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutAwareModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` which receives various callbacks in response to local changes in layout. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that changes how its wrapped content is measured and laid out. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/MeasuredSizeAwareModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` which receives a callback with the layout's measured size. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ObserverModifierNode` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node`s that implement ObserverNode can provide their own implementation of `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ObserverModifierNode#onObservedReadsChanged()` that will be called in response to changes to snapshot objects read within an `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.Modifier.Node).observeReads(kotlin.Function0)` block. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ParentDataModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that provides data to the parent `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Layout.composable#Layout(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.ui.layout.MeasurePolicy)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that receives `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerInputChange`s, interprets them, and consumes the aspects of the changes that it is react to such that other `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode`s don't also react to them. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/RootForTest` | The marker interface to be implemented by the root backing the composition. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/RootForTest.UncaughtExceptionHandler` | An optional error handler that can be set to catch exceptions thrown during the layout, draw, and teardown phases of the associated composition. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/SemanticsModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that adds semantics key/value for use in testing, accessibility, and similar use cases. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode` | Allows `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` classes to traverse up/down the Node tree for classes of the same type or for a particular key (traverseKey). | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/UnplacedAwareModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` which receives a callback when the layout node is not placed anymore. | Cmn |

## Classes

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatingNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` which is able to delegate work to other `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` instances. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DpTouchBoundsExpansion` | Describes the expansion of a `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode`'s touch bounds along each edges using `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` for units. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ModifierNodeElement` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element` which manages an instance of a particular `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` implementation. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/Ref` | Value holder general purpose class. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TouchBoundsExpansion` | Describes the expansion of a `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode`'s touch bounds along each edges. | Cmn |

## Objects

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode.Companion` |   | Cmn |

## Annotations

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/InternalCoreApi` | **This annotation is deprecated.** Use androidx.compose.ui.InternalComposeUiApi annotation instead | Cmn |

## Enums

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode.Companion.TraverseDescendantsAction` | Tree traversal actions for the traverseDescendantsIf related functions: | Cmn |

## Top-level functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DpTouchBoundsExpansion` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#DpTouchBoundsExpansion(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)(start: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, top: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, end: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, bottom: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp)` Creates a `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#DpTouchBoundsExpansion(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)` that's aware of `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TouchBoundsExpansion` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#TouchBoundsExpansion(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)(start: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, end: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Creates a `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#TouchBoundsExpansion(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)` that's aware of `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection`. | Cmn |

## Extension functions summary

|---|---|---|
| `T` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/compose/ui/node/CompositionLocalConsumerModifierNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.CompositionLocalConsumerModifierNode).currentValueOf(androidx.compose.runtime.CompositionLocal)( local: https://developer.android.com/reference/kotlin/androidx/compose/runtime/CompositionLocal<T> )` Returns the current value of `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.CompositionLocalConsumerModifierNode).currentValueOf(androidx.compose.runtime.CompositionLocal)` at the position in the composition hierarchy of this modifier's attached layout node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).dispatchDraw(androidx.compose.ui.graphics.drawscope.ContentDrawScope)(scope: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/drawscope/ContentDrawScope)` If the node implements `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode`, then this will just call `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode#(androidx.compose.ui.graphics.drawscope.ContentDrawScope).draw()`. if it does NOT implement `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode`, it will dispatch draw recursively to any of its direct delegates which DO implement `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).dispatchOnScrollChanged(androidx.compose.ui.geometry.Offset)(delta: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Call this function whenever a scroll chang happened in the LayoutNode that this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode` is attached to to let the underlying platform know that a scroll event happened in this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutNode`. | Cmn |
| `T?` | `<T : https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode> T.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).findNearestAncestor()()` Finds the nearest ancestor of the same class and key. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).findNearestAncestor(kotlin.Any)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Finds the nearest traversable ancestor with a matching `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).findNearestAncestor(kotlin.Any)`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/BeyondBoundsLayout?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).findNearestBeyondBoundsLayoutAncestor()()` Call this function to find the nearest `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/BeyondBoundsLayout` to the current node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DrawModifierNode).invalidateDraw()()` Invalidates this modifier's draw layer, ensuring that a draw pass will be run on the next frame. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).invalidateDrawForSubtree()()` Invalidates draw for the entire subtree of this node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutModifierNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.LayoutModifierNode).invalidateLayer()()` This will invalidate the current node's layer, and ensure that the layer is redrawn for the next frame. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutModifierNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.LayoutModifierNode).invalidateMeasurement()()` This invalidates the current node's measure result, and ensures that a re-measurement (the measurement block rerun) of this node will happen for the next frame. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).invalidateMeasurementForSubtree()()` Invalidates measurements for the entire subtree of this node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ParentDataModifierNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.ParentDataModifierNode).invalidateParentData()()` This invalidates the current node's parent data, and ensures that layouts that utilize it will be scheduled to relayout for the next frame. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutModifierNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.LayoutModifierNode).invalidatePlacement()()` This will invalidate the current node's placement result, and ensure that relayout (the placement block rerun) of this node will happen for the next frame . | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/SemanticsModifierNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.SemanticsModifierNode).invalidateSemantics()()` Invalidate semantics associated with this node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).invalidateSubtree()()` Invalidates the subtree of this layout, including layout, drawing, parent data, etc. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node & https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ObserverModifierNode> T.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.Modifier.Node).observeReads(kotlin.Function0)(block: () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)` Use this function to observe snapshot reads for any target within the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.Modifier.Node).observeReads(kotlin.Function0)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutModifierNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.LayoutModifierNode).remeasureSync()()` Performs the node remeasuring synchronously even if the node was not marked as needs remeasure before. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).requestAutofill()()` Requests autofill for the LayoutNode that this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode` is attached to. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).requireDensity()()` Returns the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` of the LayoutNode that this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode` is attached to. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsContext` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).requireGraphicsContext()()` Returns the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsContext` of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/Owner` | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).requireLayoutCoordinates()()` Returns the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` of this node. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).requireLayoutDirection()()` Returns the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` of the LayoutNode that this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode` is attached to. | Cmn |
| `https://developer.android.com/reference/android/view/View.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).requireView()()` The Android `https://developer.android.com/reference/android/view/View.html` hosting the composition. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode> T.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseAncestors(kotlin.Function1)(block: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseAncestors(kotlin.Function1)` for all ancestors of the same class and key. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseAncestors(kotlin.Any,kotlin.Function1)( key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, block: (https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseAncestors(kotlin.Any,kotlin.Function1)` for all ancestors with a matching `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseAncestors(kotlin.Any,kotlin.Function1)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode> T.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseChildren(kotlin.Function1)(block: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseChildren(kotlin.Function1)` for all direct children of the node that are of the same class. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseChildren(kotlin.Any,kotlin.Function1)( key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, block: (https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseChildren(kotlin.Any,kotlin.Function1)` for all direct children of the node with a matching `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseChildren(kotlin.Any,kotlin.Function1)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `<T : https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode> T.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseDescendants(kotlin.Function1)( block: (T) -> https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode.Companion.TraverseDescendantsAction )` Conditionally executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseDescendants(kotlin.Function1)` for each descendant of the same class. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseDescendants(kotlin.Any,kotlin.Function1)( key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, block: (https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode) -> https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode.Companion.TraverseDescendantsAction )` Conditionally executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseDescendants(kotlin.Any,kotlin.Function1)` for each descendant with a matching `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseDescendants(kotlin.Any,kotlin.Function1)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutModifierNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.LayoutModifierNode).updateLayerBlock(kotlin.Function1)(layerBlock: (https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?)` Updates the layer block of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutModifierNode`. | Cmn |

## Top-level functions

### DpTouchBoundsExpansion

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/TouchBoundsExpansion.kt+function:DpTouchBoundsExpansion) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun DpTouchBoundsExpansion(
    start: Dp = 0.dp,
    top: Dp = 0.dp,
    end: Dp = 0.dp,
    bottom: Dp = 0.dp
): DpTouchBoundsExpansion
```

Creates a `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#DpTouchBoundsExpansion(androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)` that's aware of `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection`. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DpTouchBoundsExpansion#start()` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DpTouchBoundsExpansion#end()` for more details about `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection`.

The `start`, `top`, `end` and `bottom` represent the distance that the touch bounds is expanded along the corresponding edge.

### TouchBoundsExpansion

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/TouchBoundsExpansion.kt+function:TouchBoundsExpansion) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.8.0)

```
fun TouchBoundsExpansion(start: Int = 0, top: Int = 0, end: Int = 0, bottom: Int = 0): TouchBoundsExpansion
```

Creates a `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#TouchBoundsExpansion(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)` that's aware of `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection`. See `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TouchBoundsExpansion#start()` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TouchBoundsExpansion#end()` for more details about `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection`.

The `start`, `top`, `end` and `bottom` represent the amount of pixels that the touch bounds is expanded along the corresponding edge. Each value must be in the range of 0 to 32767 (inclusive).

## Extension functions

### CompositionLocalConsumerModifierNode.currentValueOf

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/CompositionLocalConsumerModifierNode.kt+function:currentValueOf) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0)

```
fun <T : Any?> CompositionLocalConsumerModifierNode.currentValueOf(
    local: CompositionLocal<T>
): T
```

Returns the current value of `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.CompositionLocalConsumerModifierNode).currentValueOf(androidx.compose.runtime.CompositionLocal)` at the position in the composition hierarchy of this modifier's attached layout node.

Unlike `https://developer.android.com/reference/kotlin/androidx/compose/runtime/CompositionLocal#current()`, reads via this function are not automatically tracked by Compose. Modifiers are not able to recompose in the same way that a Composable can, and therefore can't receive updates arbitrarily for a CompositionLocal.

Because CompositionLocals may change arbitrarily, it is strongly recommended to ensure that the composition local is observed instead of being read once. If you call `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.CompositionLocalConsumerModifierNode).currentValueOf(androidx.compose.runtime.CompositionLocal)` inside of a modifier callback like `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutModifierNode#(androidx.compose.ui.layout.MeasureScope).measure(androidx.compose.ui.layout.Measurable,androidx.compose.ui.unit.Constraints)` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode#(androidx.compose.ui.graphics.drawscope.ContentDrawScope).draw()`, then Compose will track the CompositionLocal read. This happens automatically, because these Compose UI phases take place in a snapshot observer that tracks which states are read. If the value of the CompositionLocal changes, and it was read inside of the measure or draw phase, then that phase will automatically be invalidated.

For all other reads of a CompositionLocal, this function will **not** notify you when the value of the local changes. `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` classes that also implement `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ObserverModifierNode` may observe CompositionLocals arbitrarily by performing the lookup in an `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.Modifier.Node).observeReads(kotlin.Function0)` block. To continue observing values of the CompositionLocal, it must be read again in an `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.Modifier.Node).observeReads(kotlin.Function0)` block during or after the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ObserverModifierNode#onObservedReadsChanged()` callback is invoked. See below for an example of how to implement this observation pattern.

```kotlin
import androidx.compose.runtime.compositionLocalOf
import androidx.compose.ui.Modifier
import androidx.compose.ui.node.CompositionLocalConsumerModifierNode
import androidx.compose.ui.node.ObserverModifierNode
import androidx.compose.ui.node.currentValueOf
import androidx.compose.ui.node.observeReads

val LocalValue = compositionLocalOf { "abc123" }
class ValueObserverModifierNode :
    Modifier.Node(), CompositionLocalConsumerModifierNode, ObserverModifierNode {
    private var observedValue: String? = null

    override fun onAttach() {
        onObservedReadsChanged()
    }

    override fun onDetach() {
        observedValue = null
    }

    override fun onObservedReadsChanged() {
        observeReads {
            observedValue = currentValueOf(LocalValue)
            // Do something with the new value
        }
    }
}
```

This function will fail with an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` if you attempt to read a CompositionLocal before the node is `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node#onAttach()` or after the node is `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node#onDetach()`.

| Parameters |
|---|---|
| `local: https://developer.android.com/reference/kotlin/androidx/compose/runtime/CompositionLocal<T>` | The CompositionLocal to get the current value of |

| Returns |
|---|---|
| `T` | The value provided by the nearest `https://developer.android.com/reference/kotlin/androidx/compose/runtime/CompositionLocalProvider.composable#CompositionLocalProvider(kotlin.Array,kotlin.Function0)` component that invokes, directly or indirectly, the composable function that this modifier is attached to. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.CompositionLocalConsumerModifierNode).currentValueOf(androidx.compose.runtime.CompositionLocal)` was never provided, its default value will be returned instead. |

### DelegatableNode.dispatchDraw

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DrawModifierNode.kt+function:dispatchDraw) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun DelegatableNode.dispatchDraw(scope: ContentDrawScope): Unit
```

If the node implements `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode`, then this will just call `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode#(androidx.compose.ui.graphics.drawscope.ContentDrawScope).draw()`. if it does NOT implement `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode`, it will dispatch draw recursively to any of its direct delegates which DO implement `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode`

This can be useful when there is a DelegatingNode which wants to ensure all draw calls are executed of any delegates, but the implementation of the node may not have knowledge of which delegates actually implement `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode`.

### DelegatableNode.dispatchOnScrollChanged

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.kt+function:dispatchOnScrollChanged) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun DelegatableNode.dispatchOnScrollChanged(delta: Offset): Unit
```

Call this function whenever a scroll chang happened in the LayoutNode that this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode` is attached to to let the underlying platform know that a scroll event happened in this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutNode`.

On Android this will trigger a ViewTreeObserver onScrollChanged callback.

| Parameters |
|---|---|
| `delta: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The scroll delta that was consumed by this node. |

### T.findNearestAncestor

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/TraversableNode.kt+function:findNearestAncestor) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.0)

```
fun <T : TraversableNode> T.findNearestAncestor(): T?
```

Finds the nearest ancestor of the same class and key.

### DelegatableNode.findNearestAncestor

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/TraversableNode.kt+function:findNearestAncestor) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.0)

```
fun DelegatableNode.findNearestAncestor(key: Any?): TraversableNode?
```

Finds the nearest traversable ancestor with a matching `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).findNearestAncestor(kotlin.Any)`.

### DelegatableNode.findNearestBeyondBoundsLayoutAncestor

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.kt+function:findNearestBeyondBoundsLayoutAncestor) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun DelegatableNode.findNearestBeyondBoundsLayoutAncestor(): BeyondBoundsLayout?
```

Call this function to find the nearest `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/BeyondBoundsLayout` to the current node.

### DrawModifierNode.invalidateDraw

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DrawModifierNode.kt+function:invalidateDraw) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.0)

```
fun DrawModifierNode.invalidateDraw(): Unit
```

Invalidates this modifier's draw layer, ensuring that a draw pass will be run on the next frame.

### DelegatableNode.invalidateDrawForSubtree

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.kt+function:invalidateDrawForSubtree) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun DelegatableNode.invalidateDrawForSubtree(): Unit
```

Invalidates draw for the entire subtree of this node.

Note that `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DrawModifierNode).invalidateDraw()` is preferable in most cases, however it is only guaranteed to invalidate draw for that specific node, and it is possible that draw nodes that are underneath it could be cached and thus their draw methods will not get re-executed. Use this API if you need to ensure that draw is called for all draw nodes below this one. This might be necessary in certain situations where you are updating some data which you know descendant nodes use, but you are not relaying on automatic snapshot observation through `https://developer.android.com/reference/kotlin/androidx/compose/runtime/MutableState`.

Calling this method can be a relatively expensive operation as it will cause the entire subtree to redraw instead of just parts that are otherwise invalidated. `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DrawModifierNode).invalidateDraw()` is preferable in most cases, and this should only be used when absolutely necessary.

### LayoutModifierNode.invalidateLayer

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/LayoutModifierNode.kt+function:invalidateLayer) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.0)

```
fun LayoutModifierNode.invalidateLayer(): Unit
```

This will invalidate the current node's layer, and ensure that the layer is redrawn for the next frame.

### LayoutModifierNode.invalidateMeasurement

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/LayoutModifierNode.kt+function:invalidateMeasurement) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0)

```
fun LayoutModifierNode.invalidateMeasurement(): Unit
```

This invalidates the current node's measure result, and ensures that a re-measurement (the measurement block rerun) of this node will happen for the next frame.

### DelegatableNode.invalidateMeasurementForSubtree

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.kt+function:invalidateMeasurementForSubtree) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun DelegatableNode.invalidateMeasurementForSubtree(): Unit
```

Invalidates measurements for the entire subtree of this node.

Note that `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.LayoutModifierNode).invalidateMeasurement()` is preferable in most cases, however it is only guaranteed to invalidate measurement for that specific node, and it is possible that layout nodes that are underneath it could be cached and thus their measure policies will not get re-executed. Use this API if you need to ensure that measure is called for all layout nodes below this one. This might be necessary in certain situations where you are updating some data which you know descendant nodes use, but you are not relaying on automatic snapshot observation through `https://developer.android.com/reference/kotlin/androidx/compose/runtime/MutableState`.

Calling this method can be a relatively expensive operation as it will cause the entire subtree to relayout instead of just parts that are otherwise invalidated. `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.LayoutModifierNode).invalidateMeasurement()` is preferable in most cases, and this should only be used when absolutely necessary.

### ParentDataModifierNode.invalidateParentData

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/ParentDataModifierNode.kt+function:invalidateParentData) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.0)

```
fun ParentDataModifierNode.invalidateParentData(): Unit
```

This invalidates the current node's parent data, and ensures that layouts that utilize it will be scheduled to relayout for the next frame.

### LayoutModifierNode.invalidatePlacement

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/LayoutModifierNode.kt+function:invalidatePlacement) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0)

```
fun LayoutModifierNode.invalidatePlacement(): Unit
```

This will invalidate the current node's placement result, and ensure that relayout (the placement block rerun) of this node will happen for the next frame .

### SemanticsModifierNode.invalidateSemantics

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/SemanticsModifierNode.kt+function:invalidateSemantics) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.3.0)

```
fun SemanticsModifierNode.invalidateSemantics(): Unit
```

Invalidate semantics associated with this node. This will reset the `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration` associated with the layout node backing this modifier node, and will re-calculate it the next time the `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration` is read.

Semantics are automatically invalidated when backed by mutable state, or if the hierarchy is recomposed. In these cases `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/SemanticsModifierNode#(androidx.compose.ui.semantics.SemanticsPropertyReceiver).applySemantics()` is called and the latest semantics values are applied. However in cases where semantics properties are not backed by mutable state objects, a change to the semantic property will not trigger `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/SemanticsModifierNode#(androidx.compose.ui.semantics.SemanticsPropertyReceiver).applySemantics()`. This function can be used to manually invalidate semantics to ensure that `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/SemanticsModifierNode#(androidx.compose.ui.semantics.SemanticsPropertyReceiver).applySemantics()` will be called the next time the `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsConfiguration` is read.

### DelegatableNode.invalidateSubtree

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.kt+function:invalidateSubtree) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.0)

```
fun DelegatableNode.invalidateSubtree(): Unit
```

Invalidates the subtree of this layout, including layout, drawing, parent data, etc.

Calling this method can be a relatively expensive operation as it will cause the entire subtree to relayout and redraw instead of just parts that are otherwise invalidated. Its use should be limited to structural changes. This might be necessary in certain situations where you are updating some data which you know descendant nodes use, but you are not relaying on automatic snapshot observation through `https://developer.android.com/reference/kotlin/androidx/compose/runtime/MutableState`.

### T.observeReads

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/ObserverModifierNode.kt+function:observeReads) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0)

```
fun <T : Modifier.Node & ObserverModifierNode> T.observeReads(block: () -> Unit): Unit
```

Use this function to observe snapshot reads for any target within the specified `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.Modifier.Node).observeReads(kotlin.Function0)`. `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ObserverModifierNode#onObservedReadsChanged()` is called when any of the observed values within the snapshot change.

### LayoutModifierNode.remeasureSync

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/LayoutModifierNode.kt+function:remeasureSync) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.5.0)

```
fun LayoutModifierNode.remeasureSync(): Unit
```

Performs the node remeasuring synchronously even if the node was not marked as needs remeasure before. Useful for cases like when during scrolling you need to re-execute the measure block to consume the scroll offset and remeasure your children in a blocking way.

### DelegatableNode.requestAutofill

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.kt+function:requestAutofill) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.8.0)

```
fun DelegatableNode.requestAutofill(): Unit
```

Requests autofill for the LayoutNode that this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode` is attached to. If the node does not have any autofill semantic properties set, then the request still may be sent to the Autofill service, but no response is expected.

### DelegatableNode.requireDensity

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.kt+function:requireDensity) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.0)

```
fun DelegatableNode.requireDensity(): Density
```

Returns the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density` of the LayoutNode that this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode` is attached to. If the node is not attached, this function will throw an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html`.

### DelegatableNode.requireGraphicsContext

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.kt+function:requireGraphicsContext) Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
fun DelegatableNode.requireGraphicsContext(): GraphicsContext
```

Returns the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsContext` of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/Owner`

### DelegatableNode.requireLayoutCoordinates

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.kt+function:requireLayoutCoordinates) Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
fun DelegatableNode.requireLayoutCoordinates(): LayoutCoordinates
```

Returns the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` of this node.

To get a signal when the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` become available, or when its parent places it, implement `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutAwareModifierNode`.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | When either this node is not attached, or the `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/LayoutCoordinates` object is not attached. |

### DelegatableNode.requireLayoutDirection

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.kt+function:requireLayoutDirection) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.0)

```
fun DelegatableNode.requireLayoutDirection(): LayoutDirection
```

Returns the current `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection` of the LayoutNode that this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode` is attached to. If the node is not attached, this function will throw an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html`.

### DelegatableNode.requireView

android Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/DelegatableNode.android.kt+function:requireView)

```
fun DelegatableNode.requireView(): View
```

The Android `https://developer.android.com/reference/android/view/View.html` hosting the composition.

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-state-exception/index.html` | If the modifier node is not `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node#isAttached()`. |

### T.traverseAncestors

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/TraversableNode.kt+function:traverseAncestors) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.0)

```
fun <T : TraversableNode> T.traverseAncestors(block: (T) -> Boolean): Unit
```

Executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseAncestors(kotlin.Function1)` for all ancestors of the same class and key.

Note: The parameter `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseAncestors(kotlin.Function1)`'s return boolean value will determine if the traversal will continue (true = continue, false = cancel).

```kotlin
import androidx.compose.ui.Modifier
import androidx.compose.ui.node.traverseAncestors

val customTraversableModifierNode = CustomTraversableModifierNode()

with(customTraversableModifierNode) {
    traverseAncestors {
        // Because I use the existing key of the class, I can guarantee 'it' will be of the same
        // type as the class, so I can call my functions directly.
        it.doSomethingWithAncestor()

        // Return true to continue searching the tree after a match. If you were looking to
        // match only some of the nodes, you could return false and stop executing the search.
        true
    }
}
```

### DelegatableNode.traverseAncestors

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/TraversableNode.kt+function:traverseAncestors) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.0)

```
fun DelegatableNode.traverseAncestors(
    key: Any?,
    block: (TraversableNode) -> Boolean
): Unit
```

Executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseAncestors(kotlin.Any,kotlin.Function1)` for all ancestors with a matching `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseAncestors(kotlin.Any,kotlin.Function1)`.

Note: The parameter `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseAncestors(kotlin.Any,kotlin.Function1)`'s return boolean value will determine if the traversal will continue (true = continue, false = cancel).

```kotlin
import androidx.compose.ui.Modifier
import androidx.compose.ui.node.traverseAncestors

val customTraversableModifierNode = CustomTraversableModifierNode()

with(customTraversableModifierNode) {
    traverseAncestors(traverseKey) {
        if (it is CustomTraversableModifierNode) {
            it.doSomethingWithAncestor()
        }
        // Return true to continue searching the tree after a match. If you were looking to
        // match only some of the nodes, you could return false and stop executing the search.
        true
    }
}
```

### T.traverseChildren

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/TraversableNode.kt+function:traverseChildren) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.0)

```
fun <T : TraversableNode> T.traverseChildren(block: (T) -> Boolean): Unit
```

Executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseChildren(kotlin.Function1)` for all direct children of the node that are of the same class.

Note 1: This stops at the children and does not include grandchildren and so on down the tree.

Note 2: The parameter `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseChildren(kotlin.Function1)`'s return boolean value will determine if the traversal will continue (true = continue, false = cancel).

```kotlin
import androidx.compose.ui.Modifier
import androidx.compose.ui.node.traverseChildren

val customTraversableModifierNode = CustomTraversableModifierNode()

with(customTraversableModifierNode) {
    traverseChildren {
        // Because I use the existing key of the class, I can guarantee 'it' will be of the same
        // type as the class, so I can call my functions directly.
        it.doSomethingWithChild()

        // Return true to continue searching the tree after a match. If you were looking to
        // match only some of the nodes, you could return false and stop executing the search.
        true
    }
}
```

### DelegatableNode.traverseChildren

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/TraversableNode.kt+function:traverseChildren) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.0)

```
fun DelegatableNode.traverseChildren(
    key: Any?,
    block: (TraversableNode) -> Boolean
): Unit
```

Executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseChildren(kotlin.Any,kotlin.Function1)` for all direct children of the node with a matching `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseChildren(kotlin.Any,kotlin.Function1)`.

Note 1: This stops at the children and does not include grandchildren and so on down the tree.

Note 2: The parameter `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseChildren(kotlin.Any,kotlin.Function1)`'s return boolean value will determine if the traversal will continue (true = continue, false = cancel).

```kotlin
import androidx.compose.ui.Modifier
import androidx.compose.ui.node.traverseChildren

val customTraversableModifierNode = CustomTraversableModifierNode()

with(customTraversableModifierNode) {
    traverseChildren(traverseKey) {
        if (it is CustomTraversableModifierNode) {
            it.doSomethingWithChild()
        }
        // Return true to continue searching the tree after a match. If you were looking to
        // match only some of the nodes, you could return false and stop executing the search.
        true
    }
}
```

### T.traverseDescendants

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/TraversableNode.kt+function:traverseDescendants)

```
fun <T : TraversableNode> T.traverseDescendants(
    block: (T) -> TraversableNode.Companion.TraverseDescendantsAction
): Unit
```

Conditionally executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseDescendants(kotlin.Function1)` for each descendant of the same class.

Note 1: For nodes that do not have the same key, it will continue to execute the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseDescendants(kotlin.Function1)` for the descendants below that non-matching node (where there may be a node that matches).

Note 2: The parameter `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.TraversableNode).traverseDescendants(kotlin.Function1)`'s return value `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode.Companion.TraverseDescendantsAction` will determine the next step in the traversal.

```kotlin
import androidx.compose.ui.Modifier
import androidx.compose.ui.node.TraversableNode.Companion.TraverseDescendantsAction
import androidx.compose.ui.node.traverseDescendants

val customTraversableModifierNode = CustomTraversableModifierNode()

with(customTraversableModifierNode) {
    traverseDescendants {
        // Because I use the existing key of the class, I can guarantee 'it' will be of the same
        // type as the class, so I can call my functions directly.
        it.doSomethingWithDescendant()

        // [traverseDescendants()] actually has three options:
        // - ContinueTraversal
        // - SkipSubtreeAndContinueTraversal - rarely used
        // - CancelTraversal
        // They are pretty self explanatory. Usually, you just want to continue or cancel the
        // search. In some rare cases, you might want to skip the subtree but continue searching
        // the tree.
        TraverseDescendantsAction.ContinueTraversal
    }
}
```

### DelegatableNode.traverseDescendants

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/TraversableNode.kt+function:traverseDescendants)

```
fun DelegatableNode.traverseDescendants(
    key: Any?,
    block: (TraversableNode) -> TraversableNode.Companion.TraverseDescendantsAction
): Unit
```

Conditionally executes `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseDescendants(kotlin.Any,kotlin.Function1)` for each descendant with a matching `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseDescendants(kotlin.Any,kotlin.Function1)`.

Note 1: For nodes that do not have the same key, it will continue to execute the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseDescendants(kotlin.Any,kotlin.Function1)` for descendants below that non-matching node (where there may be a node that matches).

Note 2: The parameter `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).traverseDescendants(kotlin.Any,kotlin.Function1)`'s return value `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode.Companion.TraverseDescendantsAction` will determine the next step in the traversal.

```kotlin
import androidx.compose.ui.Modifier
import androidx.compose.ui.node.TraversableNode.Companion.TraverseDescendantsAction
import androidx.compose.ui.node.traverseDescendants

val customTraversableModifierNode = CustomTraversableModifierNode()

with(customTraversableModifierNode) {
    traverseDescendants(traverseKey) {
        if (it is CustomTraversableModifierNode) {
            it.doSomethingWithDescendant()
        }

        // [traverseDescendants()] actually has three options:
        // - ContinueTraversal
        // - SkipSubtreeAndContinueTraversal - rarely used
        // - CancelTraversal
        // They are pretty self explanatory. Usually, you just want to continue or cancel the
        // search. In some rare cases, you might want to skip the subtree but continue searching
        // the tree.
        TraverseDescendantsAction.ContinueTraversal
    }
}
```

### LayoutModifierNode.updateLayerBlock

Cmn Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/node/LayoutModifierNode.kt+function:updateLayerBlock) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun LayoutModifierNode.updateLayerBlock(layerBlock: (GraphicsLayerScope.() -> Unit)?): Unit
```

Updates the layer block of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutModifierNode`. This will mark the layer as invalidated and schedule a refresh of the layer.

Updating the layer lambda using this method is cheaper than invalidating placement and placing the layout with a new layer block. This API is expected to be used alongside `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)` with a `layerBlock` parameter passed. This will override/update the layerBlock passed in that API. Whichever one was called last should "win".

| Parameters |
|---|---|
| `layerBlock: (https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?` | the snapshot-observed lambda used to set properties on the layer. if `null`, is provided it will remove the layer. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Placeable#placeAt(androidx.compose.ui.unit.IntOffset,kotlin.Float,kotlin.Function1)` |   |