InternalScreen

interface InternalScreen : Screen, InternalComponentContainer, UIEventProcessor

Represents the internal API of a Screen

Functions

activate
Link copied to clipboard
common
abstract fun activate()
addComponent
Link copied to clipboard
common
open fun addComponent(builder: Builder<Component>): AttachedComponent
Builds a Component using the given component Builder and adds it to this ComponentContainer.
abstract fun addComponent(component: Component): AttachedComponent
Adds a child Component to this ComponentContainer.
addComponents
Link copied to clipboard
common
open fun addComponents(vararg components: Builder<Component>): List<AttachedComponent>
Adds the given Components to this ComponentContainer.
open 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.
addLayer
Link copied to clipboard
common
abstract fun addLayer(layer: Layer): LayerHandle
Adds a layer on top of the currently present layers.
applyStyle
Link copied to clipboard
common
abstract fun applyStyle(styleSet: StyleSet)
Applies the given styleSet to all currently present Tiles in this TileGraphics.
clear
Link copied to clipboard
common
abstract fun clear()
Clears this Clearable.
close
Link copied to clipboard
common
abstract fun close()
Closes this Closeable.
deactivate
Link copied to clipboard
common
abstract fun deactivate()
Deactivates this InternalComponentContainer.
dispatch
Link copied to clipboard
common
abstract fun dispatch(event: UIEvent): UIEventResponse
Dispatches the given UIEvent and propagates it throughout the UI controls this UIEventDispatcher has.
display
Link copied to clipboard
common
abstract fun display()
Moves the contents of this Screen to the underlying TileGrid, effectively displaying them on the user's screen.
dock
Link copied to clipboard
common
abstract fun dock(view: View)
Docks a View to this ViewContainer.
draw
Link copied to clipboard
common
abstract fun draw(tileMap: Map<Position, Tile>)
Same as draw with 3 parameters, with the difference that size will be used for drawArea, and Position.zero as drawPosition
abstract fun draw(tileComposite: TileComposite)
Same as draw with tileMap, but TileComposite.tiles will be use as the Map.
abstract fun draw(tileMap: Map<Position, Tile>, drawPosition: Position)
Same as draw with 3 parameters, with the difference that size will be used for drawArea.
abstract fun draw(tile: Tile, drawPosition: Position)
Draws the given Tile on this TileGraphics at the given drawPosition.
abstract fun draw(tileComposite: TileComposite, drawPosition: Position)
Same as draw with tileMap, but TileComposite.tiles will be use as the Map.
abstract fun draw(tileMap: Map<Position, Tile>, drawPosition: Position, drawArea: Size)
Draws the given tileMap onto this TileGraphics.
abstract fun draw(tileComposite: TileComposite, drawPosition: Position, drawArea: Size)
Same as draw with tileMap, but TileComposite.tiles will be use as the Map.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
fill
Link copied to clipboard
common
abstract fun fill(filler: Tile)
Fills the empty parts of this TileGraphics with the given filler.
getLayerAt
Link copied to clipboard
common
abstract fun getLayerAt(level: Int): Maybe<LayerHandle>
Returns the Layer at the given level (if present).
getTileAt
Link copied to clipboard
common
open fun getTileAt(position: Position): Maybe<Tile>
Returns the Tile stored at a particular position in this TileComposite.
getTileAtOrNull
Link copied to clipboard
common
open fun getTileAtOrNull(position: Position): Tile?
Returns the Tile stored at a particular position or null if there is no such Tile.
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
insertLayerAt
Link copied to clipboard
common
abstract fun insertLayerAt(level: Int, layer: Layer): LayerHandle
Inserts the given Layer into this Layerable at the given level.
moveCursorBackward
Link copied to clipboard
common
abstract fun moveCursorBackward()
Moves the cursor one Position to the left.
moveCursorForward
Link copied to clipboard
common
abstract fun moveCursorForward()
Moves the cursor one Position to the right.
onShutdown
Link copied to clipboard
common
abstract fun onShutdown(listener: () -> Unit)
Adds a listener which will be notified when the environment shuts down.
openModal
Link copied to clipboard
common
open fun <T : ModalResult> openModal(modalFragment: ModalFragment<T>)
Opens a new Modal window on top of the Screen using the given ModalFragment.
abstract fun <T : ModalResult> openModal(modal: Modal<T>)
Opens a new Modal window on top of the Screen.
process
Link copied to clipboard
common
abstract fun process(event: UIEvent, phase: UIEventPhase): UIEventResponse
Processes the given UIEvent in the given phase.
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.
putTile
Link copied to clipboard
common
abstract fun putTile(tile: Tile)
Adds the tile at the current cursor location.
setLayerAt
Link copied to clipboard
common
abstract fun setLayerAt(level: Int, layer: Layer): LayerHandle
Sets the given Layer in this Layerable at the given level.
start
Link copied to clipboard
common
abstract fun start(animation: Animation): AnimationHandle
Adds and starts the given Animation.
toString
Link copied to clipboard
common
open fun toString(): String
transform
Link copied to clipboard
common
abstract fun transform(transformer: (Position, Tile) -> Tile)
Transforms all of the Tiles in this TileGraphics with the given transformer and overwrites them with the results of calling transformer.

Properties

closed
Link copied to clipboard
common
open val closed: Boolean
closedValue
Link copied to clipboard
common
open val closedValue: ObservableValue<Boolean>
cursorPosition
Link copied to clipboard
common
abstract var cursorPosition: Position
Returns the position of the cursor.
flattenedTree
Link copied to clipboard
common
abstract val flattenedTree: Iterable<InternalComponent>
Holds the component tree rooted at this RootContainer flattened into an ObservableList.
height
Link copied to clipboard
common
open override val height: Int
heightInPixels
Link copied to clipboard
common
open val heightInPixels: Int
isActive
Link copied to clipboard
common
abstract val isActive: ObservableValue<Boolean>
isClosed
Link copied to clipboard
common
abstract val isClosed: ObservableValue<Boolean>
isCursorAtTheEndOfTheLine
Link copied to clipboard
common
abstract val isCursorAtTheEndOfTheLine: Boolean
Tells whether the cursor is at the end of the line.
isCursorAtTheFirstRow
Link copied to clipboard
common
abstract val isCursorAtTheFirstRow: Boolean
Tells whether the cursor is at the first (index 0) row.
isCursorAtTheLastRow
Link copied to clipboard
common
abstract val isCursorAtTheLastRow: Boolean
Tells whether the cursor is at the last row.
isCursorAtTheStartOfTheLine
Link copied to clipboard
common
abstract val isCursorAtTheStartOfTheLine: Boolean
Tells whether the cursor is at the start of the line.
isCursorVisible
Link copied to clipboard
common
abstract var isCursorVisible: Boolean
Tells whether the cursor is visible.
layers
Link copied to clipboard
common
abstract val layers: ObservableList<out Layer>
renderables
Link copied to clipboard
common
abstract val renderables: List<Renderable>
Contains the Renderable objects ordered from bottom to top.
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.
tiles
Link copied to clipboard
common
abstract val tiles: Map<Position, Tile>
The Tiles this TileComposite contains.
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.
width
Link copied to clipboard
common
open override val width: Int
widthInPixels
Link copied to clipboard
common
open val widthInPixels: Int

Inheritors

TileGridScreen
Link copied to clipboard

Sources

(source)
Link copied to clipboard