Package-level declarations

Types

Link copied to clipboard
expect object Clipboard

A wrapper for coping and pasting text. Within a JVM, it uses AWT's Clipboard class. Within a Browser, it uses window.navigator.clipboard.

actual object Clipboard

This interface was first designed to work in a JVM context, where it was possible to monitor the state of the clipboard. This isn't possible within a Javascript application, therefore containsText always returns true. This means that application's Edit menus will never have disabled items for Paste (even when the clipboard contains no text).

actual object Clipboard : ClipboardOwner

Exposes the system clipboard for copy/paste operations.

Link copied to clipboard
expect class ConsoleLog : Log

Logs messages to the console. This is stderr on the jvm, and console.log for JS

actual class ConsoleLog : Log

Logs messages to the console.

actual class ConsoleLog : Log

Logs messages to the console.

Link copied to clipboard
Link copied to clipboard
expect class FixedFormat(places: Int)
actual class FixedFormat(val places: Int)
actual class FixedFormat(val places: Int)
Link copied to clipboard
class GlokException(message: String) : Exception
Link copied to clipboard
class IgnoreLog : Log
Link copied to clipboard
class InMemoryLog(val halfMaxEntries: Int) : Log

An in-memory log, split into two parts, so that when the maximum entries are exceeded, the start and end of the log are preserved, and the middle is discarded.

Link copied to clipboard
interface Log
Link copied to clipboard
class Matrix(val m00: Float, val m01: Float, val m10: Float, val m11: Float, val m20: Float = 0.0f, val m21: Float = 0.0f)

A matrix for transposing 2D points. The right column of the matrix is not stored, as it always 0,0,1.

Properties

Link copied to clipboard
var log: Log

Functions

Link copied to clipboard
fun GlokSettings.load(preferences: Preferences = preferences())

Loads GlokSettings using Java's Preferences. The default node is given by preferences, which is common to all Glok applications.

Link copied to clipboard
fun main(vararg args: String)

Generates property boilerplate for the key classes in Glok. Also generates stylable code for :

Link copied to clipboard
expect fun <T : Any> KClass<T>.newInstance(): T
actual fun <T : Any> KClass<T>.newInstance(): T
actual fun <T : Any> KClass<T>.newInstance(): T
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

It is recommended that your application loads and saves GlokSettings via load and save using this Preferences node. This allows the user to choose the settings ONCE, and they will work across all Glok applications.

Link copied to clipboard
fun GlokSettings.save(preferences: Preferences = preferences())

Saves GlokSettings using Java's Preferences. The default node is given by preferences, which is common to all Glok applications.

Link copied to clipboard
fun <T> withLogLevel(level: Int, block: () -> T): T