Package-level declarations

Types

Link copied to clipboard
interface Behavior<in T : View>

A Behavior can be used by Views and Themes to allow delegation of the View.render call and other characteristics of the View. This way, a View can support pluggable visual style and behavior.

Link copied to clipboard
data class Camera(val position: Point, val distance: Double)

Defines the perspective a viewer has if they are assumed to be looking directly at the screen. A camera placed farther from a View will create a stronger perspective projection of that View. This will result in the View looking more 3-dimensional when it is transformed "into" the screen in some way. Whether using the z-axis or because of rotations around the x and/or y-axis.

Link copied to clipboard
typealias ChildObserver<S> = (source: S, diffs: Differences<View>) -> Unit

Observes changes to the children of a parent, S

Link copied to clipboard

Represents a View that can have children and Layout.

Link copied to clipboard

Class to enable container { ... } DSL.

Link copied to clipboard

Created by Nicholas Eddy on 8/12/20.

Link copied to clipboard
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.

Link copied to clipboard
interface Icon<in T : Any>

Represents graphical data associated with an item. An example is the icon used by a button to indicate its function.

Link copied to clipboard

Indicates internal Doodle APIs that should only be accessed from other Doodle libraries.

Link copied to clipboard
interface Layout

Layouts control the positioning of a PositionableContainer's children. They are also responsible for reporting the ideal size for a view given it's contents.

Link copied to clipboard
sealed class LookupResult

The result of Layout.child.

Link copied to clipboard
interface Positionable

Represents an item within a PositionableContainer that a Layout can position.

Link copied to clipboard

Represents an item whose children (Positionables) are being manipulated by a Layout.

Link copied to clipboard
abstract class View(accessibilityRole: AccessibilityRole? = null) : Renderable, Positionable

The smallest unit of displayable, interactive content within doodle. Views are the visual entities used to display components for an application. User input events are sent to all Views that are configured to receive them. This allows them to response to user interaction or convey such events to other parts of an application.

Link copied to clipboard

Class to enable panel { ... } DSL.

Inherited properties

Link copied to clipboard

The Display's center point in its coordinate system.

The View's center point in its parent's coordinate system.

Link copied to clipboard

The height of the Display

Link copied to clipboard

The width of the Display

Functions

Link copied to clipboard
fun <T : View, B : Behavior<T>> behavior(beforeChange: (old: B?, new: B?) -> Unit = { _,_ -> }): ReadWriteProperty<T, B?>

Delegate that manages installation and uninstallation of a Behavior and calls beforeChange before applying changes.

fun <T : View, B : Behavior<T>> behavior(beforeChange: (old: B?, new: B?) -> Unit = { _,_ -> }, afterChange: (old: B?, new: B?) -> Unit = { _,_ -> }): ReadWriteProperty<T, B?>
Link copied to clipboard

DSL for creating a custom Container.

Link copied to clipboard
inline fun <T> renderProperty(initial: T, noinline onChange: View.(old: T, new: T) -> Unit = { _,_ -> }): ReadWriteProperty<View, T>

Delegate for properties that should trigger View.rerender when changed.

Link copied to clipboard
fun view(block: ViewBuilder.() -> Unit): View

DSL for creating a custom View.

Inherited functions

Link copied to clipboard

Moves the View's center to the given point.

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

Fills the Display with color.paint

Link copied to clipboard
Link copied to clipboard
fun View.scrollTo(rectangle: Rectangle)

Scrolls the View to the given region if it is within a ScrollPanel.

Link copied to clipboard
infix fun Layout.then(onLayout: (PositionableContainer) -> Unit): Layout

Provides a way to get notified each time a Layout is done positioning.