# DelegatableNode

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+class:androidx.compose.ui.node.DelegatableNode) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.3.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface DelegatableNode
  ```
Known direct subclasses [BeyondBoundsLayoutProviderModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/BeyondBoundsLayoutProviderModifierNode), [BringIntoViewModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/relocation/BringIntoViewModifierNode), [CompositionLocalConsumerModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/CompositionLocalConsumerModifierNode), [DragAndDropModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropModifierNode), [DrawModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode), [FocusEventModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusEventModifierNode), [FocusPropertiesModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusPropertiesModifierNode), [FocusRequesterModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusRequesterModifierNode), [FocusTargetModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusTargetModifierNode), [GlobalPositionAwareModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/GlobalPositionAwareModifierNode), [IndirectPointerInputModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/input/indirect/IndirectPointerInputModifierNode), [KeyInputModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/input/key/KeyInputModifierNode), [LayoutAwareModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutAwareModifierNode), [LayoutModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutModifierNode), [MeasuredSizeAwareModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/MeasuredSizeAwareModifierNode), [Modifier.Node](https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node), [ModifierLocalModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/modifier/ModifierLocalModifierNode), [ObserverModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ObserverModifierNode), [ParentDataModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/ParentDataModifierNode), [PlatformTextInputModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/PlatformTextInputModifierNode), [PointerInputModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode), [RotaryInputModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/input/rotary/RotaryInputModifierNode), [SemanticsModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/SemanticsModifierNode), [SoftKeyboardInterceptionModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/input/key/SoftKeyboardInterceptionModifierNode), [TraversableNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/TraversableNode), [UnplacedAwareModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/UnplacedAwareModifierNode)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/BeyondBoundsLayoutProviderModifierNode` | Provides a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/BeyondBoundsLayout` through Modifier.Node APIs. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/relocation/BringIntoViewModifierNode` | A node that can respond to `https://developer.android.com/reference/kotlin/androidx/compose/ui/relocation/BringIntoViewModifierNode#bringIntoView(androidx.compose.ui.layout.LayoutCoordinates,kotlin.Function0)` requests from its children by moving or adjusting its content. |
| `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. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropModifierNode` | **This interface is deprecated.** This interface is deprecated in favor to DragAndDropSourceModifierNode and DragAndDropTargetModifierNode |
| `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. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusEventModifierNode` | Implement this interface create a modifier node that can be used to observe focus state changes to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusTargetNode` down the hierarchy. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusPropertiesModifierNode` | Implement this interface create a modifier node that can be used to modify the focus properties of the associated `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusTargetNode`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusRequesterModifierNode` | Implement this interface to create a modifier node that can be used to request changes in the focus state of a `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusTargetNode` down the hierarchy. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/FocusTargetModifierNode` | This modifier node can be delegated to in order to create a modifier that makes a component focusable. |
| `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. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/indirect/IndirectPointerInputModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that receives `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/indirect/IndirectPointerEvent`s. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/key/KeyInputModifierNode` | Implement this interface to create a `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that can intercept hardware Key events. |
| `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. |
| `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. |
| `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. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` | The longer-lived object that is created for each `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Element` applied to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/Layout.composable#Layout(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.ui.layout.MeasurePolicy)`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/modifier/ModifierLocalModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that is capable of consuming and providing `https://developer.android.com/reference/kotlin/androidx/compose/ui/modifier/ModifierLocal` values. |
| `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. |
| `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)`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/PlatformTextInputModifierNode` | A modifier node that can connect to the platform's text input IME system. |
| `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. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/rotary/RotaryInputModifierNode` | Implement this interface to create a `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that can intercept rotary scroll events. |
| `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. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/key/SoftKeyboardInterceptionModifierNode` | Implement this interface to create a `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that can intercept hardware Key events before they are sent to the software keyboard. |
| `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). |
| `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. |

Known indirect subclasses [ApproachLayoutModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachLayoutModifierNode), [CacheDrawModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/draw/CacheDrawModifierNode), [DelegatingNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatingNode), [DragAndDropSourceModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropSourceModifierNode), [DragAndDropTargetModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropTargetModifierNode), [LayoutAwareModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/node/LayoutAwareModifierNode), [SuspendingPointerInputModifierNode](https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputModifierNode)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachLayoutModifierNode` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/ApproachLayoutModifierNode` is designed to support gradually approaching the destination layout calculated in the lookahead pass. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draw/CacheDrawModifierNode` | Expands on the `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DrawModifierNode` by adding the ability to invalidate the draw cache for changes in things like shapes and bitmaps (see Modifier.border for a usage examples). |
| `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. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropSourceModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that can be used as a source for platform drag and drop operations. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropTargetModifierNode` | A `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that can be used as a target for platform drag and drop operations. |
| `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. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/SuspendingPointerInputModifierNode` | Extends `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/PointerInputModifierNode` with a handler to execute asynchronously when an event occurs and a function to reset that handler (cancels the existing coroutine and essentially resets the handler's execution). |

*** ** * ** ***

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`. Since `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` implements this interface, in practice any `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` can be delegated.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatingNode` |   |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatingNode#delegate(androidx.compose.ui.node.DelegatableNode)` |   |

## Summary

| ### Nested types |
|---|
| `fun interface https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.RegistrationHandle` |

| ### Public functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#onDensityChange()()` Invoked when the density changes for this node. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#onLayoutDirectionChange()()` Invoked when the layout direction changes for this node. | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#node()` A reference of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that holds this node's position in the node hierarchy. | Cmn |

| ### Extension functions |
|---|---|---|
| `suspend 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/DelegatableNode#(androidx.compose.ui.node.DelegatableNode).bringIntoView(kotlin.Function0)(bounds: (() -> https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect?)?)` Bring this node into visible bounds. | 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/DelegatableNode#(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 |
| `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/DelegatableNode#(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/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(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/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(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/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(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` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(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/DelegatableNode#(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/DelegatableNode#(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/DelegatableNode#(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/DelegatableNode#(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/DelegatableNode#(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` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(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://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.RegistrationHandle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)( throttleMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, debounceMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, callback: (https://developer.android.com/reference/kotlin/androidx/compose/ui/spatial/RelativeLayoutBounds) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Registers a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)` to be executed with the position of this modifier node relative to the coordinate system of the root of the composition, as well as in screen coordinates and window coordinates, see `https://developer.android.com/reference/kotlin/androidx/compose/ui/spatial/RelativeLayoutBounds`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.RegistrationHandle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)( throttleMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, debounceMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, callback: (https://developer.android.com/reference/kotlin/androidx/compose/ui/spatial/RelativeLayoutBounds) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` Registers a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` to be executed with the position of this modifier node relative to the coordinate system of the root of the composition, as well as in screen coordinates and window coordinates. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInLocalBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)( left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Attempts to request focus for the most suitable focusable child node that overlaps with the given rect area (`https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInLocalBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInLocalBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInLocalBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInLocalBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`). | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInRootBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)( left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Attempts to request focus for the most suitable focusable child node that overlaps with the given rect area (`https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInRootBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInRootBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInRootBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInRootBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`). | 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/DelegatableNode#(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://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/DelegatableNode#(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` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(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` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode#(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 |

## Public functions

### onDensityChange

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

```
@EmptySuper
open fun onDensityChange(): Unit
```

Invoked when the density changes for this node. This affects Dp to pixel conversions, and can cause coordinates / other values to change.

Changes to density will automatically invalidate layout / draw modifiers, as layout, measurement, and draw depend on density. This callback can be used to update any other node state that depends on density, outside of these phases. Density can be retrieved inside a node by using `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).requireDensity()`.

### onLayoutDirectionChange

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

```
@EmptySuper
open fun onLayoutDirectionChange(): Unit
```

Invoked when the layout direction changes for this node. This can affect the layout and drawing of nodes.

Changes to layout direction will automatically invalidate layout / draw modifiers, as layout, measurement, and draw depend on layout direction. This callback can be used to update any other node state that depends on layout direction, outside of these phases. Layout direction can be retrieved inside a node by using `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/package-summary#(androidx.compose.ui.node.DelegatableNode).requireLayoutDirection()`.

## Public properties

### node

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

```
val node: Modifier.Node
```

A reference of the `https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier.Node` that holds this node's position in the node hierarchy. If the node is a delegate of another node, this will point to the root delegating node that is actually part of the node tree. Otherwise, this will point to itself.

## Extension functions

### DelegatableNode.bringIntoView

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/relocation/BringIntoViewModifierNode.kt+function:bringIntoView)

```
suspend fun DelegatableNode.bringIntoView(bounds: (() -> Rect?)? = null): Unit
```

Bring this node into visible bounds. Does nothing if the node is not attached.

This method will not return until this request is satisfied or a newer request interrupts it. If this call is interrupted by a newer call, this method will throw a `https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-cancellation-exception/index.html`.

| Parameters |
|---|---|
| `bounds: (() -> https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect?)? = null` | provides the bounds (In local coordinates) that should be brought into view. The function may return a different value over time, if the bounds of the request change while the request is being processed. If you don't provide bounds, the whole node bounds will be used. |

### 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)

```
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. |

### 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)

```
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.

### 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)

```
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.

### 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)

```
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.

### 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)

```
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`.

### 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)

```
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)

```
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)

```
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)

```
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)

```
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()`. |

### 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)

```
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.registerOnGlobalLayoutListener

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/layout/OnGlobalLayoutListener.kt+function:registerOnGlobalLayoutListener)

```
fun DelegatableNode.registerOnGlobalLayoutListener(
    throttleMillis: Long,
    debounceMillis: Long,
    callback: (RelativeLayoutBounds) -> Unit
): DelegatableNode.RegistrationHandle
```

Registers a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)` to be executed with the position of this modifier node relative to the coordinate system of the root of the composition, as well as in screen coordinates and window coordinates, see `https://developer.android.com/reference/kotlin/androidx/compose/ui/spatial/RelativeLayoutBounds`.

It may also be used to calculate certain Layout relationships at the time of the callback execution, such as `https://developer.android.com/reference/kotlin/androidx/compose/ui/spatial/RelativeLayoutBounds#calculateOcclusions()`.

This will be called after layout pass. This API allows for throttling and debouncing parameters in order to moderate the frequency with which the callback gets invoked during high rates of change (e.g. scrolling).

Specifying `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)` will prevent `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)` from being executed more than once over that time period. Specifying `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)` will delay the execution of `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)` until that amount of time has elapsed without a new position.

Specifying 0 for both `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)` will result in the callback being executed every time the position has changed. Specifying non-zero amounts for both will result in both conditions being met.

| Parameters |
|---|---|
| `throttleMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration, in milliseconds, to prevent `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)` from being executed more than once over that time period. |
| `debounceMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration, in milliseconds, to delay the execution of `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnGlobalLayoutListener(kotlin.Long,kotlin.Long,kotlin.Function1)` until that amount of time has elapsed without a new position. |
| `callback: (https://developer.android.com/reference/kotlin/androidx/compose/ui/spatial/RelativeLayoutBounds) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The callback to be executed, provides a new `https://developer.android.com/reference/kotlin/androidx/compose/ui/spatial/RelativeLayoutBounds` instance associated to this `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode`. Keep in mind this callback is executed on the main thread even when debounced. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.RegistrationHandle` | an object which should be used to unregister/dispose this callback, such as when a node is detached |

### DelegatableNode.registerOnLayoutRectChanged

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/layout/OnLayoutRectChangedModifier.kt+function:registerOnLayoutRectChanged)

```
fun DelegatableNode.registerOnLayoutRectChanged(
    throttleMillis: Long,
    debounceMillis: Long,
    callback: (RelativeLayoutBounds) -> Unit
): DelegatableNode.RegistrationHandle
```

Registers a `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` to be executed with the position of this modifier node relative to the coordinate system of the root of the composition, as well as in screen coordinates and window coordinates. This will be called after layout pass. This API allows for throttling and debouncing parameters in order to moderate the frequency with which the callback gets invoked during high rates of change (e.g. scrolling).

Specifying `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` will prevent `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` from being executed more than once over that time period. Specifying `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` will delay the execution of `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` until that amount of time has elapsed without a new position.

Specifying 0 for both `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` will result in the callback being executed every time the position has changed. Specifying non-zero amounts for both will result in both conditions being met.

| Parameters |
|---|---|
| `throttleMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration, in milliseconds, to prevent `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` from being executed more than once over that time period. |
| `debounceMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration, in milliseconds, to delay the execution of `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/package-summary#(androidx.compose.ui.node.DelegatableNode).registerOnLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` until that amount of time has elapsed without a new position. |
| `callback: (https://developer.android.com/reference/kotlin/androidx/compose/ui/spatial/RelativeLayoutBounds) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The callback to be executed. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/node/DelegatableNode.RegistrationHandle` | an object which should be used to unregister/dispose this callback |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/layout/onLayoutRectChanged.modifier#(androidx.compose.ui.Modifier).onLayoutRectChanged(kotlin.Long,kotlin.Long,kotlin.Function1)` |   |

### DelegatableNode.requestFocusForChildInLocalBounds

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/focus/RequestChildFocus.kt+function:requestFocusForChildInLocalBounds)

```
fun DelegatableNode.requestFocusForChildInLocalBounds(
    left: Int,
    top: Int,
    right: Int,
    bottom: Int
): Boolean
```

Attempts to request focus for the most suitable focusable child node that overlaps with the given rect area (`https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInLocalBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInLocalBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInLocalBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInLocalBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`).

The rectangle is interpreted in the coordinate space **relative to the receiver node**.

| Parameters |
|---|---|
| `left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the left edge of the rectangle, in pixels relative to the receiver node's origin. |
| `top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the top edge of the rectangle, in pixels relative to the receiver node's origin. |
| `right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the right edge of the rectangle, in pixels relative to the receiver node's origin. |
| `bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the bottom edge of the rectangle, in pixels relative to the receiver node's origin. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if a matching child was found and focus was granted; `false` if no such child exists, it is already focused, or the focus request failed. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInRootBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)` |   |

### DelegatableNode.requestFocusForChildInRootBounds

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/focus/RequestChildFocus.kt+function:requestFocusForChildInRootBounds)

```
fun DelegatableNode.requestFocusForChildInRootBounds(
    left: Int,
    top: Int,
    right: Int,
    bottom: Int
): Boolean
```

Attempts to request focus for the most suitable focusable child node that overlaps with the given rect area (`https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInRootBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInRootBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInRootBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInRootBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)`).

The rectangle is interpreted in the coordinate space **relative to the compose root**.

| Parameters |
|---|---|
| `left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | is the left edge of the rectangle, in pixels relative to the compose root. |
| `top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | is the top edge of the rectangle, in pixels relative to the compose root. |
| `right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | is the right edge of the rectangle, in pixels relative to the compose root. |
| `bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | is the bottom edge of the rectangle, in pixels relative to the compose root. |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `true` if a matching child was found and focus was granted; `false` if no such child exists, it is already focused, or the focus request failed. |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/focus/package-summary#(androidx.compose.ui.node.DelegatableNode).requestFocusForChildInLocalBounds(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.Int)` |   |

### 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)

```
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.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)

```
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
    }
}
```

### 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)

```
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
    }
}
```

### 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
    }
}
```