ViewModelArtboardProperty

class ViewModelArtboardProperty(unsafeCppPointer: Long, fileLock: ReentrantLock) : ViewModelProperty<Unit>

An artboard property of a ViewModelInstance.

Unlike other property types, this property can only be set. It cannot be read or observed. It's value and valueFlow are not applicable and will always return Unit.

Parameters

unsafeCppPointer

Pointer to the C++ counterpart.

fileLock

Lock shared by the File and native graph this property mutates. Updated through ViewModelProperty.updateFileLock when assigned to another native graph.

Constructors

Link copied to clipboard
constructor(unsafeCppPointer: Long, fileLock: ReentrantLock)

Properties

Link copied to clipboard

Getter/Setter for the underlying C++ pointer value.

Link copied to clipboard
Link copied to clipboard

Whether this objects underlying pointer is still valid.

Link copied to clipboard

The name of the property.

Link copied to clipboard
open val refCount: Int
Link copied to clipboard
override var refs: AtomicInteger
Link copied to clipboard
var value: Unit

The current value of the property, whether set by this property or by a data binding update.

Link copied to clipboard
val valueFlow: StateFlow<Unit>

A flow of the property's value. Use for observing changes.

Functions

Link copied to clipboard
open override fun acquire(): Int

Increments the references for this counter. Cannot be used for initialization - use refs.incrementAndGet instead.

Link copied to clipboard
open fun cppDelete(pointer: Long)
Link copied to clipboard
@VisibleForTesting(otherwise = 2)
external fun cppHasChanged(cppPointer: Long): Boolean
Link copied to clipboard
external fun cppName(cppPointer: Long): String
Link copied to clipboard
open override fun release(): Int

Release this property while holding the current file lock.

Link copied to clipboard
fun set(artboard: Artboard)

Set the artboard for this property.

fun set(bindableArtboard: BindableArtboard?)

Set the bindable artboard for this property.