Display

interface Display : Iterable<View>

The top-level surface for presenting Views. An item must be added to the Display (either directly, or as a descendant of the Display) before it can be rendered or interact with the user.

Author

Nicholas Eddy

Properties

Link copied to clipboard

The Display's center point in its coordinate system.

Link copied to clipboard

The list of top-level items added to the Display

Link copied to clipboard

Notifies changes to children

Link copied to clipboard

Indicates the direction of content within the Display. This is used to support right-to-left locales. Top-level Views without a View.localContentDirection specified will inherit this value and pass it on to their descendants that have no explicit value.

Link copied to clipboard
Link copied to clipboard
abstract var cursor: Cursor?

The top-level cursor. This will be the cursor used for View hierarchies that do not have one set.

Link copied to clipboard

Fires when the display cursor changes

Link copied to clipboard
Link copied to clipboard

The height of the Display

Link copied to clipboard
abstract var insets: Insets

Insets if any

Link copied to clipboard
abstract var layout: Layout?

The layout applied

Link copied to clipboard
Link copied to clipboard

Fires when mirrored changes.

Link copied to clipboard

Indicates whether the Display should be mirrored (as though transformed using AffineTransform.flipHorizontally), when the contentDirection is RightLeft.

Link copied to clipboard
abstract val size: Size

The current size of the Display. This may be smaller than the client's screen in situations where the application is hosted within a window.

Link copied to clipboard

Fires when the display re-sizes

Link copied to clipboard

Affine transform applied to the View. This transform does not affect the Display's size or how it is handled by Layout. Hit-detection is handled correctly such that the pointer intersects with the Display as expected after transformation. So no additional handling is necessary in general. The default is Identity

Link copied to clipboard

The width of the Display

Functions

Link copied to clipboard
abstract infix fun ancestorOf(view: View): Boolean
Link copied to clipboard
abstract fun child(at: Point): View?
abstract fun child(at: Point, predicate: (View) -> Boolean): View?
Link copied to clipboard
abstract fun fill(fill: Paint)

Fills the Display's background with the given fill

Link copied to clipboard
fun Display.fill(color: Color)

Fills the Display with color.paint

Link copied to clipboard
abstract fun fromAbsolute(point: Point): Point

Maps a Point from absolute coordinate-space un-transformed Display, into this Display's coordinate-space. The result is different form the input if the Display's transform is not Identity.

Link copied to clipboard
open operator override fun iterator(): MutableIterator<View>
Link copied to clipboard
open operator fun minusAssign(view: View)

Removes view from the Display.

open operator fun minusAssign(views: Collection<View>)

Removes the given views from the Display.

Link copied to clipboard
open operator fun plusAssign(view: View)

Adds view to the Display.

open operator fun plusAssign(views: Collection<View>)

Adds the given views to the Display.

Link copied to clipboard
abstract fun relayout()

Prompts the Display to layout its children if it has a Layout installed.

Link copied to clipboard
abstract fun toAbsolute(point: Point): Point

Maps a Point within the Display to absolute coordinate-space.