Drawable

abstract class Drawable

A base class for all elements that can be drawn on the glasses HUD, like UIKit.widgets.UIElement and UIKit.ar.elements.ArModel

Inheritors

Constructors

Link copied to clipboard
constructor()
constructor(id: String)

Properties

Link copied to clipboard

The screen which the ui element is attached to (if exists).

Link copied to clipboard
var Id: String

The ID of the screen. auto generate when using default constructor.

Link copied to clipboard
var tag: Any?

A Generic tag that can be attached to the UI Element

Functions

Link copied to clipboard

Returns the parent ui element group

Link copied to clipboard

Returns true when the element has a parent

Link copied to clipboard
open fun invalidate(): Drawable
Link copied to clipboard

Returns true when the element is attached to screen

Link copied to clipboard
open fun isVisible(): Boolean

Returns the ui element visibility

Link copied to clipboard
protected open fun onAttachedToScreen()

Override this function to be notified when the ui element is attached to a screen

Link copied to clipboard
protected open fun onBeforeDetachFromScreen()

Override this function to be notified when the ui element is about to be detached from a screen

Link copied to clipboard
protected open fun onBeforeDraw(timestampMs: Long)

Override this function to be notified when the ui element is about to be drawn

Link copied to clipboard
protected open fun onCreate()

Override this function to be notified when the ui element is ready for its creation

Link copied to clipboard
protected abstract fun onDraw(canvas: CanvasBuffer)

The draw method is called to actually draw the ui element visual representation to the CanvasBuffer

Link copied to clipboard
open fun setVisibility(isVisible: Boolean): Drawable

Change the ui element visibility (Hide\Show the ui element)

Link copied to clipboard
open override fun toString(): String

To String

Link copied to clipboard

Returns true when the element was created (the onCreate was called)