SubspaceModifier.Node

abstract class SubspaceModifier.Node

Known direct subclasses

The longer-lived object that is created for each SubspaceModifierElement applied to a SubspaceLayout

Summary

Public constructors

Public functions

open Unit

Called when the node is attached to a SubspaceLayout which is part of the UI tree.

open Unit

Called when the node is not attached to a SubspaceLayout anymore.

Public properties

Boolean

Indicates that the node is attached to a SubspaceLayout which is part of the UI tree.

Extension functions

Sequence<SubspaceModifier.Node>

Generates a lazy sequence that walks up the node tree to the root.

Sequence<SubspaceModifier.Node>

Generates a lazy sequence that walks down the node tree.

Sequence<SubspaceModifier.Node>

Generates a sequence with self and elements up the node tree to the root.

Sequence<SubspaceModifier.Node>

Generates a sequence with self and elements down the node tree.

Public constructors

Node

Added in 1.0.0-alpha02
Node()

Public functions

onAttach

Added in 1.0.0-alpha02
open fun onAttach(): Unit

Called when the node is attached to a SubspaceLayout which is part of the UI tree.

onDetach

Added in 1.0.0-alpha02
open fun onDetach(): Unit

Called when the node is not attached to a SubspaceLayout anymore. Note that the node can be reattached again.

Public properties

isAttached

Added in 1.0.0-alpha02
val isAttachedBoolean

Indicates that the node is attached to a SubspaceLayout which is part of the UI tree. This will get set to true right before onAttach is called, and set to false right after onDetach is called.

See also
onAttach
onDetach

Extension functions

traverseAncestors

fun SubspaceModifier.Node.traverseAncestors(): Sequence<SubspaceModifier.Node>

Generates a lazy sequence that walks up the node tree to the root.

If this node is the root, an empty sequence is returned.

traverseDescendants

fun SubspaceModifier.Node.traverseDescendants(): Sequence<SubspaceModifier.Node>

Generates a lazy sequence that walks down the node tree.

If this node is a leaf node, an empty sequence is returned.

traverseSelfThenAncestors

fun SubspaceModifier.Node.traverseSelfThenAncestors(): Sequence<SubspaceModifier.Node>

Generates a sequence with self and elements up the node tree to the root.

traverseSelfThenDescendants

fun SubspaceModifier.Node.traverseSelfThenDescendants(): Sequence<SubspaceModifier.Node>

Generates a sequence with self and elements down the node tree.