ScreenObjectSnapshot

@Serializable
data class ScreenObjectSnapshot(val type: String, val id: String, val size: ScreenObjectSnapshot.Size, val isVisible: Boolean, val layoutMargin: EdgeInsets, val horizontalAlignment: Int, val verticalAlignment: Int, val elements: Map<String, String>, val children: List<ScreenObjectSnapshot>)

Represents a serializable snapshot of a screen object.

This class captures the state of a screen object at a specific point in time for persistence or restoration purposes. It is independent from runtime screen object instances and is used as a data-only representation.

Screen objects can form a hierarchical structure, expressed through nested children snapshots.

Constructors

Link copied to clipboard
constructor(type: String, id: String, size: ScreenObjectSnapshot.Size, isVisible: Boolean, layoutMargin: EdgeInsets, horizontalAlignment: Int, verticalAlignment: Int, elements: Map<String, String>, children: List<ScreenObjectSnapshot>)

Types

Link copied to clipboard
@Serializable
data class Size(val width: Int, val height: Int)

Properties

Link copied to clipboard

Child screen object snapshots that form a hierarchical screen structure.

Link copied to clipboard

A map of element-specific properties represented as key-value pairs. Used to store extensible or type-specific attributes.

Link copied to clipboard

The horizontal alignment of the screen object within its parent.

Link copied to clipboard
val id: String

The unique identifier of this screen object.

Link copied to clipboard

The visibility of the screen object.

Link copied to clipboard

The margin applied to the screen object when performing layout calculations.

Link copied to clipboard

The position and size of the screen object within its parent coordinate space.

Link copied to clipboard

The type identifier of the screen object. This value is typically used to determine which screen object to recreate.

Link copied to clipboard

The vertical alignment of the screen object within its parent.