class WebViewHighlighter : SKryptonWidget
A class that provides a colored rectangle overlay to highlight certain areas of a web view.
WebViewHighlighter(view: SKryptonWebView, x: Int, y: Int, width: Int, height: Int, fillColor: Boolean = false, color: Color = Color.GREEN)
Main constructor |
var color: Color
Color of the highlight. |
|
var fillColor: Boolean
Whether or not the highlight should filled or just a border. |
|
val handle: CPointer
Native pointer |
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 showFor(seconds: Float, callback: () -> Unit = {}): Unit fun showFor(seconds: Double, callback: () -> Unit = {}): Unit fun showFor(duration: Long, unit: TimeUnit = TimeUnit.SECONDS, callback: () -> Unit = {}): Unit
Shows the highlight for a given duration. |
|
fun showForAndDispose(seconds: Float, callback: () -> Unit = {}): Unit fun showForAndDispose(seconds: Double, callback: () -> Unit = {}): Unit fun showForAndDispose(duration: Long, unit: TimeUnit = TimeUnit.SECONDS, callback: () -> Unit = {}): Unit
Same as showFor but disposes the highlighter before calling the callback. |
|
fun toggle(): Unit
Toggles the visibility of the highlighter. |
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. |