skrypton-api / com.waicool20.skrypton.jni.objects / SKryptonWidget

SKryptonWidget

abstract class SKryptonWidget : NativeInterface

A class representing a user interface element.

Constructors

<init>

SKryptonWidget()

A class representing a user interface element.

Properties

geometry

var geometry: Rectangle

The geometry of the widget. (x-y coordinates, width and height)

size

var size: Dimension

Dimension of the widget. (Width and height only)

Inherited Properties

handle

abstract val handle: CPointer

Native pointer

Functions

addOnKeyEventListener

fun addOnKeyEventListener(type: KeyEventType, listener: (event: SKryptonKeyEvent) -> Unit): Unit

Adds a listener for when a key event occurs on this widget.

addOnMouseEventListener

fun addOnMouseEventListener(type: MouseEventType, listener: (event: SKryptonMouseEvent) -> Unit): Unit

Adds a listener for when a mouse event occurs on this widget.

addOnResizeEventListener

fun addOnResizeEventListener(listener: (event: SKryptonResizeEvent) -> Unit): Unit

Adds a listener for when a resize event occurs on this widget.

addOnWheelEventListener

fun addOnWheelEventListener(listener: (event: SKryptonWheelEvent) -> Unit): Unit

Adds a listener for when a mouse wheel event occurs on this widget.

close

open fun close(): Unit

Hides and closes this widget.

hide

fun hide(): Unit

Hides the widget.

isHidden

fun isHidden(): Boolean

Returns true if the widget is hidden.

move

fun move(x: Int, y: Int): Unit

Moves the widget to the given coordinates.

removeOnKeyEventListener

fun removeOnKeyEventListener(type: KeyEventType, listener: (event: SKryptonKeyEvent) -> Unit): Unit

Removes given onKeyEvent listener.

removeOnMouseEventListener

fun removeOnMouseEventListener(type: MouseEventType, listener: (event: SKryptonMouseEvent) -> Unit): Unit

Removes given onMouseEvent listener.

removeOnResizeEventListener

fun removeOnResizeEventListener(listener: (event: SKryptonResizeEvent) -> Unit): Unit

Removes given onResizeEvent listener.

removeOnWheelEventListener

fun removeOnWheelEventListener(listener: (event: SKryptonWheelEvent) -> Unit): Unit

Removes given onWheelEvent listener.

resize

fun resize(width: Int, height: Int): Unit

Resizes the widget.

show

fun show(): Unit

Makes the widget visible.

Inherited Functions

dispose

fun dispose(): Unit

Disposes this object, usually same action as close

Inheritors

SKryptonWebView

class SKryptonWebView : SKryptonWidget

A browser window that can be used to view and edit web documents.

WebViewHighlighter

class WebViewHighlighter : SKryptonWidget

A class that provides a colored rectangle overlay to highlight certain areas of a web view.