class SKryptonWebView : SKryptonWidget
A browser window that can be used to view and edit web documents.
SKryptonWebView(url: String)
A browser window that can be used to view and edit web documents. |
val cursorX: Int
x coordinate of the virtual cursor. |
|
val cursorY: Int
y coordinate of the virtual cursor. |
|
val handle: CPointer
Native pointer |
|
val profile: SKryptonWebProfile
SKryptonWebProfile instance used by this web view. Can be changed without affecting profile of other web view instances. |
|
val settings: SKryptonWebSettings
SKryptonWebSettings instance used by this web view. Can be changed without affecting settings of other web view instances. |
|
var showCursor: Boolean
Whether or not to show the virtual cursor in the web view, useful for when you need to debug mouse events. |
|
val url: String
URL of the web page currently viewed. |
|
var zoomFactor: Double
Current zoom factor of the web view, valid values are 0.25 to 5.0. |
var geometry: Rectangle
The geometry of the widget. (x-y coordinates, width and height) |
|
var size: Dimension
Dimension of the widget. (Width and height only) |
fun addOnLoadFinishedListener(listener: (ok: Boolean) -> Unit): Unit
Adds a listener for when the web view is done loading a page. |
|
fun addOnLoadProgressListener(listener: (progress: Int) -> Unit): Unit
Adds a listener for the progress of loading a new page. |
|
fun addOnLoadStartedListener(listener: () -> Unit): Unit
Adds a listener for when the web view starts loading a new page. |
|
fun back(): Unit
Go back to previous page. |
|
fun forward(): Unit
Go to next page. |
|
fun isLoading(): Boolean
Returns |
|
fun load(url: URL): Unit fun load(url: String): Unit
Loads the given url. |
|
fun loadHtml(content: String, baseUrl: String): Unit
Loads raw HTML content into the web view. |
|
fun reload(): Unit
Reloads the current page. |
|
fun removeOnLoadFinishedListener(listener: (ok: Boolean) -> Unit): Unit
Removes given onLoadFinished listener. |
|
fun removeOnLoadProgressListener(listener: (progress: Int) -> Unit): Unit
Removes given onLoadProgress listener. |
|
fun removeOnLoadStartedListener(listener: () -> Unit): Unit
Removes given onLoadStarted listener. |
|
fun runJavaScript(content: String, callback: () -> Unit = {}): Unit
Runs JavaScript content on this web view. |
|
fun sendEvent(event: SKryptonEvent): Unit
Sends the given event to the web view |
|
fun stop(): Unit
Stops loading the current page, if it is loading. |
|
fun takeScreenshot(): BufferedImage
Takes a screenshot of the web views contents. |
fun addOnKeyEventListener(type: KeyEventType, listener: (event: SKryptonKeyEvent) -> Unit): Unit
Adds a listener for when a key event occurs on this widget. |
|
fun addOnMouseEventListener(type: MouseEventType, listener: (event: SKryptonMouseEvent) -> Unit): Unit
Adds a listener for when a mouse event occurs on this widget. |
|
fun addOnResizeEventListener(listener: (event: SKryptonResizeEvent) -> Unit): Unit
Adds a listener for when a resize event occurs on this widget. |
|
fun addOnWheelEventListener(listener: (event: SKryptonWheelEvent) -> Unit): Unit
Adds a listener for when a mouse wheel event occurs on this widget. |
|
open fun close(): Unit
Hides and closes this widget. |
|
fun hide(): Unit
Hides the widget. |
|
fun isHidden(): Boolean
Returns true if the widget is hidden. |
|
fun move(x: Int, y: Int): Unit
Moves the widget to the given coordinates. |
|
fun removeOnKeyEventListener(type: KeyEventType, listener: (event: SKryptonKeyEvent) -> Unit): Unit
Removes given onKeyEvent listener. |
|
fun removeOnMouseEventListener(type: MouseEventType, listener: (event: SKryptonMouseEvent) -> Unit): Unit
Removes given onMouseEvent listener. |
|
fun removeOnResizeEventListener(listener: (event: SKryptonResizeEvent) -> Unit): Unit
Removes given onResizeEvent listener. |
|
fun removeOnWheelEventListener(listener: (event: SKryptonWheelEvent) -> Unit): Unit
Removes given onWheelEvent listener. |
|
fun resize(width: Int, height: Int): Unit
Resizes the widget. |
|
fun show(): Unit
Makes the widget visible. |
fun SKryptonWebView.screen(action: SKryptonScreen.() -> Unit = {}): SKryptonScreen
Creates a SKryptonScreen under this SKryptonWebView instance |