RootContainer

interface RootContainer : InternalContainer

Functions

acceptsFocus
Link copied to clipboard
common
abstract fun acceptsFocus(): Boolean
Tells whether this Focusable accepts focus right now.
activated
Link copied to clipboard
common
open fun activated(): UIEventResponse
The component was activated (mouse click or spacebar press typically).
addComponent
Link copied to clipboard
common
abstract fun addComponent(component: Component): AttachedComponent
Adds a child Component to this ComponentContainer.
open override fun addComponent(builder: Builder<Component>): AttachedComponent
Builds a Component using the given component Builder and adds it to this ComponentContainer.
addComponents
Link copied to clipboard
common
open override fun addComponents(vararg components: Builder<Component>): List<AttachedComponent>
Adds the given Components to this ComponentContainer.
open override fun addComponents(vararg components: Component): List<AttachedComponent>
Adds the given Components to this ComponentContainer.
addFragment
Link copied to clipboard
common
open fun addFragment(fragment: Fragment): AttachedComponent
Adds the Fragment.root of the given Fragment to this ComponentContainer.
addFragments
Link copied to clipboard
common
open fun addFragments(vararg fragments: Fragment): List<AttachedComponent>
Adds the Fragment.root of the given Fragment to this ComponentContainer.
asInternalComponent
Link copied to clipboard
common
abstract override fun asInternalComponent(): InternalContainer
Returns this Component as an InternalComponent which represents the internal API of Component.
calculatePathTo
Link copied to clipboard
common
abstract fun calculatePathTo(component: InternalComponent): List<InternalComponent>
clearCustomStyle
Link copied to clipboard
common
abstract fun clearCustomStyle()
Clears any custom componentStyleSet (if present).
clearFocus
Link copied to clipboard
common
abstract fun clearFocus()
Clears focus from this Focusable.
close
Link copied to clipboard
common
abstract fun close()
Closes this Closeable.
containsBoundable
Link copied to clipboard
common
abstract infix fun containsBoundable(boundable: Boundable): Boolean
Tells whether this boundable contains the other boundable.
containsPosition
Link copied to clipboard
common
abstract infix fun containsPosition(position: Position): Boolean
Tells whether position is within this boundable's bounds.
convertColorTheme
Link copied to clipboard
common
abstract fun convertColorTheme(colorTheme: ColorTheme): ComponentStyleSet
Converts the given ColorTheme to the equivalent ComponentStyleSet representation.
deactivated
Link copied to clipboard
common
open fun deactivated(): UIEventResponse
The component was deactivated (mouse release or spacebar release typically).
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
fetchComponentByPosition
Link copied to clipboard
common
abstract fun fetchComponentByPosition(absolutePosition: Position): Maybe<out InternalComponent>
focusGiven
Link copied to clipboard
common
open fun focusGiven(): UIEventResponse
Focus was given to the component.
focusTaken
Link copied to clipboard
common
open fun focusTaken(): UIEventResponse
Focus was taken away from the component.
handleComponentEvents
Link copied to clipboard
common
abstract fun handleComponentEvents(eventType: ComponentEventType, handler: (event: ComponentEvent) -> UIEventResponse): Subscription
Adds the given handler for ComponentEvents.
handleKeyboardEvents
Link copied to clipboard
common
abstract fun handleKeyboardEvents(eventType: KeyboardEventType, handler: (event: KeyboardEvent, phase: UIEventPhase) -> UIEventResponse): Subscription
Adds the given handler for keyboard events.
handleMouseEvents
Link copied to clipboard
common
abstract fun handleMouseEvents(eventType: MouseEventType, handler: (event: MouseEvent, phase: UIEventPhase) -> UIEventResponse): Subscription
Adds the given handler for mouse events.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
intersects
Link copied to clipboard
common
abstract infix fun intersects(boundable: Boundable): Boolean
Tells whether this Boundable intersects with the other boundable.
keyPressed
Link copied to clipboard
common
open fun keyPressed(event: KeyboardEvent, phase: UIEventPhase): UIEventResponse
keyReleased
Link copied to clipboard
common
open fun keyReleased(event: KeyboardEvent, phase: UIEventPhase): UIEventResponse
keyTyped
Link copied to clipboard
common
open fun keyTyped(event: KeyboardEvent, phase: UIEventPhase): UIEventResponse
mouseClicked
Link copied to clipboard
common
open fun mouseClicked(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseDragged
Link copied to clipboard
common
open fun mouseDragged(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseEntered
Link copied to clipboard
common
open fun mouseEntered(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseExited
Link copied to clipboard
common
open fun mouseExited(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseMoved
Link copied to clipboard
common
open fun mouseMoved(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mousePressed
Link copied to clipboard
common
open fun mousePressed(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseReleased
Link copied to clipboard
common
open fun mouseReleased(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseWheelRotatedDown
Link copied to clipboard
common
open fun mouseWheelRotatedDown(event: MouseEvent, phase: UIEventPhase): UIEventResponse
mouseWheelRotatedUp
Link copied to clipboard
common
open fun mouseWheelRotatedUp(event: MouseEvent, phase: UIEventPhase): UIEventResponse
moveBy
Link copied to clipboard
common
open fun moveBy(position: Position): Boolean
Moves this Movable relative to its current position by the given position.
moveDownBy
Link copied to clipboard
common
open fun moveDownBy(delta: Int): Boolean
moveLeftBy
Link copied to clipboard
common
open fun moveLeftBy(delta: Int): Boolean
moveRightBy
Link copied to clipboard
common
open fun moveRightBy(delta: Int): Boolean
moveTo
Link copied to clipboard
common
abstract fun moveTo(position: Position): Boolean
Sets the position of this Movable.
moveUpBy
Link copied to clipboard
common
open fun moveUpBy(delta: Int): Boolean
onActivated
Link copied to clipboard
common
abstract fun onActivated(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component is activated.
onDeactivated
Link copied to clipboard
common
abstract fun onDeactivated(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component is deactivated.
onFocusGiven
Link copied to clipboard
common
abstract fun onFocusGiven(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component gains focus.
onFocusTaken
Link copied to clipboard
common
abstract fun onFocusTaken(fn: (ComponentEvent) -> Unit): Subscription
Adds a listener to this Component that will be called whenever this Component loses focus.
process
Link copied to clipboard
common
abstract fun process(event: UIEvent, phase: UIEventPhase): UIEventResponse
Processes the given UIEvent in the given phase.
processComponentEvents
Link copied to clipboard
common
abstract fun processComponentEvents(eventType: ComponentEventType, handler: (event: ComponentEvent) -> Unit): Subscription
Adds the given handler for ComponentEvents.
processKeyboardEvents
Link copied to clipboard
common
abstract fun processKeyboardEvents(eventType: KeyboardEventType, handler: (event: KeyboardEvent, phase: UIEventPhase) -> Unit): Subscription
Adds the given handler for KeyboardEvents.
processMouseEvents
Link copied to clipboard
common
abstract fun processMouseEvents(eventType: MouseEventType, handler: (event: MouseEvent, phase: UIEventPhase) -> Unit): Subscription
Adds the given handler for MouseEvents.
render
Link copied to clipboard
common
abstract fun render(graphics: TileGraphics)
Renders this Renderable onto the given TileGraphics object.
requestFocus
Link copied to clipboard
common
abstract fun requestFocus(): Boolean
Requests focus for this Focusable.
resetState
Link copied to clipboard
common
abstract fun resetState()
toString
Link copied to clipboard
common
open fun toString(): String

Properties

absolutePosition
Link copied to clipboard
common
abstract val absolutePosition: Position
The absolute position of this Component, eg: the Position relative to the top left corner of the grid it is displayed on.
children
Link copied to clipboard
common
abstract val children: Iterable<Component>
The immediate child Components of this Container.
closed
Link copied to clipboard
common
open val closed: Boolean
closedValue
Link copied to clipboard
common
open val closedValue: ObservableValue<Boolean>
componentState
Link copied to clipboard
common
abstract val componentState: ComponentState
componentStateValue
Link copied to clipboard
common
abstract val componentStateValue: ObservableValue<ComponentState>
componentStyleSet
Link copied to clipboard
common
abstract var componentStyleSet: ComponentStyleSet
componentStyleSetProperty
Link copied to clipboard
common
abstract val componentStyleSetProperty: Property<out ComponentStyleSet>
componentTree
Link copied to clipboard
common
abstract val componentTree: ObservableList<InternalComponent>
Holds the component tree rooted at this RootContainer flattened into an ObservableList.
contentOffset
Link copied to clipboard
common
abstract val contentOffset: Position
The position of the top left corner of the content area (where the component is rendered without the decorations) relative to the top left corner of this Component.
contentSize
Link copied to clipboard
common
abstract val contentSize: Size
The Size of the content of this Component.
currentStyle
Link copied to clipboard
common
open val currentStyle: StyleSet
The current style based on componentStyleSet according to the current componentState.
disabledProperty
Link copied to clipboard
common
abstract override val disabledProperty: Property<Boolean>
hasFocus
Link copied to clipboard
common
abstract val hasFocus: Boolean
Tells whether this Focusable has focus or not.
hasFocusValue
Link copied to clipboard
common
abstract val hasFocusValue: ObservableValue<Boolean>
hasParent
Link copied to clipboard
common
abstract val hasParent: ObservableValue<Boolean>
height
Link copied to clipboard
common
open override val height: Int
hiddenProperty
Link copied to clipboard
common
abstract override val hiddenProperty: Property<Boolean>
id
Link copied to clipboard
common
abstract val id: UUID
isAttached
Link copied to clipboard
common
open override val isAttached: Boolean
isAttachedToRoot
Link copied to clipboard
common
open val isAttachedToRoot: Boolean
isClosed
Link copied to clipboard
common
abstract val isClosed: ObservableValue<Boolean>
isDisabled
Link copied to clipboard
common
abstract override var isDisabled: Boolean
isHidden
Link copied to clipboard
common
abstract override var isHidden: Boolean
parent
Link copied to clipboard
common
abstract var parent: Maybe<InternalContainer>
parentProperty
Link copied to clipboard
common
abstract val parentProperty: Property<Maybe<InternalContainer>>
position
Link copied to clipboard
common
open val position: Position
Shorthand for Rect.position
rect
Link copied to clipboard
common
abstract val rect: Rect
A Rect contains the coordinates and the size of a Boundable.
rectValue
Link copied to clipboard
common
abstract val rectValue: ObservableValue<Rect>
Observable value that can be used to observe the changes of rect.
relativeBounds
Link copied to clipboard
common
abstract val relativeBounds: Rect
The bounds of this Component relative to its parent.
relativePosition
Link copied to clipboard
common
abstract val relativePosition: Position
The relative position is the position of the top left corner of this Component relative to the contentOffset of its parent.
root
Link copied to clipboard
common
abstract var root: Maybe<RootContainer>
rootValue
Link copied to clipboard
common
abstract val rootValue: ObservableValue<Maybe<RootContainer>>
size
Link copied to clipboard
common
abstract override val size: Size
theme
Link copied to clipboard
common
abstract override var theme: ColorTheme
The (mutable) ColorTheme.
themeProperty
Link copied to clipboard
common
abstract override val themeProperty: Property<ColorTheme>
A Property that wraps the theme and offers data binding and observability features.
tileset
Link copied to clipboard
common
abstract override var tileset: TilesetResource
The (mutable) tileset value.
tilesetProperty
Link copied to clipboard
common
abstract val tilesetProperty: Property<TilesetResource>
A Property that wraps the tileset and offers data binding and observability features.
updateOnAttach
Link copied to clipboard
common
abstract val updateOnAttach: Boolean
Tells whether the Component's observable properties should be updated from the parent when the component is attached.
width
Link copied to clipboard
common
open override val width: Int
x
Link copied to clipboard
common
open val x: Int
Shorthand for Rect.x
y
Link copied to clipboard
common
open val y: Int
Shorthand for Rect.y

Inheritors

DefaultRootContainer
Link copied to clipboard

Sources

(source)
Link copied to clipboard