View

Constructors

Link copied to clipboard
constructor()

View

Properties

Link copied to clipboard
Link copied to clipboard
external val children: ReadonlyArray<View>

A View[] property representing the child views of this view.

Functions

Link copied to clipboard
external fun addChildView(view: View, index: Double = definedExternally)

If the same View is added to a parent which already contains it, it will be reordered such that it becomes the topmost view.

Link copied to clipboard
external fun addListener(type: EventType, listener: EventListener)
Link copied to clipboard
external fun emit(type: EventType, vararg args: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
external fun getBounds(): Rectangle

The bounds of this View, relative to its parent.

Link copied to clipboard
external fun getMaxListeners(): Double
Link copied to clipboard
external fun getVisible(): Boolean

Whether the view should be drawn. Note that this is different from whether the view is visible on screen—it may still be obscured or out of view.

Link copied to clipboard
external fun listenerCount(type: EventType, listener: EventListener): Double
Link copied to clipboard
Link copied to clipboard
external fun off(type: EventType, listener: EventListener)
Link copied to clipboard
external fun on(type: EventType, listener: EventListener)
Link copied to clipboard
external fun once(type: EventType, listener: EventListener)
Link copied to clipboard
external fun prependListener(type: EventType, listener: EventListener)
Link copied to clipboard
external fun prependOnceListener(type: EventType, listener: EventListener)
Link copied to clipboard
Link copied to clipboard
external fun removeAllListeners(type: EventType)
Link copied to clipboard
external fun removeChildView(view: View)

If the view passed as a parameter is not a child of this view, this method is a no-op.

Link copied to clipboard
external fun removeListener(type: EventType, listener: EventListener)
Link copied to clipboard
external fun setBackgroundColor(color: String)

Examples of valid color values:

Link copied to clipboard
external fun setBorderRadius(radius: Double)
Link copied to clipboard
external fun setBounds(bounds: Rectangle, options: BoundsOptions = definedExternally)
Link copied to clipboard
external fun setMaxListeners(n: Number)
Link copied to clipboard
external fun setVisible(visible: Boolean)