Window

abstract class Window

A class that represents a floating on-screen window that the user can drag and interact with.

In most cases an instance of this class has to be passed to WindowManager before anything can be done with it.

Constructors

Link copied to clipboard
fun Window()

Functions

Link copied to clipboard
open fun addAction(action: Action)

Applies an action to the root table.

Link copied to clipboard
fun destroy()

Destroys this window, removing it from the scene and triggering onDestroy.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
abstract fun onCreate()

Called when the window is being created.

Link copied to clipboard
open fun onDestroy()

Called when the window is being destroyed. Usually this means that the user has closed the window.

Link copied to clipboard
open fun onDrag()

Called when the window is being dragged by the user.

Link copied to clipboard
open fun onFullScreen(fullscreen: Boolean)

Called whenever the user switches between full screen and normal mode

Link copied to clipboard
open fun onToggle(collapsed: Boolean)

Called whenever this window is being toggled by the user

Link copied to clipboard
open fun onUpdate()

This function is called on every tick after creating the table.

Link copied to clipboard
open fun shrink()

Shrinks the root table of this window, reducing it's size to the minimum preferred size.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
abstract val closeable: Boolean

Whether this window can be closed by the user. Should be overriden.

Link copied to clipboard
var fullScreen: Boolean = false

Whether the window is in the full screen mode. Modifying this property triggers onFullScreen.

Link copied to clipboard
var isCollapsed: Boolean = false

Whether this window is collapsed. Modifying this property triggers onToggle.

Link copied to clipboard
var isDragged: Boolean = false

Whether the window is being dragged by the user right now

Link copied to clipboard
abstract val name: String

Name of this window, displayed in the top bar. Should be overriden.

Link copied to clipboard

Whether this window supports full screen mode. Can be overriden. Currently broken, should not be used.

Link copied to clipboard
lateinit var table: Table

The table this window is assigned to. Initialized when the window is created.