BindableArtboard

class BindableArtboard(unsafeCppPointer: Long, val viewModelInstance: ViewModelInstance? = null) : NativeObject

A BindableArtboard is an artboard reference that can be assigned to a ViewModelArtboardProperty. It should only be used for that purpose and cannot be used as a regular Artboard.

Instances of this class are created via File.createBindableArtboardByName or File.createDefaultBindableArtboard.

⚠️Important: This bindable artboard can outlive the File instance that created it, but in order to do so it has an extra reference count. You need to call release when you are done with it, otherwise it will leak memory.

Parameters

unsafeCppPointer

The pointer to the native object.

viewModelInstance

The view model instance to apply to the artboard instance when bound.

Throws

If the supplied instance has been disposed.

Constructors

Link copied to clipboard
constructor(unsafeCppPointer: Long, viewModelInstance: ViewModelInstance? = null)

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

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

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 external override fun cppDelete(pointer: Long)
Link copied to clipboard
external fun cppName(pointer: Long): String
Link copied to clipboard
open override fun release(): Int

Decrements the reference counter.