Package-level declarations

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class ActionParameter(val label: String, val order: Int = Int.MAX_VALUE, val description: String = "")

ActionParameter annotation for functions without arguments

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class BooleanParameter(val label: String, val order: Int = Int.MAX_VALUE, val description: String = "")

BooleanParameter annotation for a boolean parameter

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ColorParameter(val label: String, val order: Int = Int.MAX_VALUE, val description: String = "")

ColorParameter annotation for a ColorRGBa parameter

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Description(val title: String, val description: String = "")
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class DoubleListParameter(val label: String, val low: Double = -1.0, val high: Double = 1.0, val minimumListLength: Int = 1, val maximumListLength: Int = 16, val precision: Int = 3, val order: Int = Int.MAX_VALUE, val description: String = "")

DoubleListParameter annotation for a double precision parameter

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class DoubleParameter(val label: String, val low: Double, val high: Double, val precision: Int = 3, val order: Int = Int.MAX_VALUE, val description: String = "")

DoubleParameter annotation for a double precision parameter

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class IntParameter(val label: String, val low: Int, val high: Int, val order: Int = Int.MAX_VALUE, val description: String = "")

IntParameter annotation for an integer parameter

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ListParameter(val label: String, val order: Int = Int.MAX_VALUE, val description: String = "")

ListParameter annotation for a SelectableList

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class MutableListParameter(val label: String, val order: Int = Int.MAX_VALUE, val description: String = "")

ListParameter annotation for a SelectableMutableList.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class NestedParameter(val name: String, val order: Int = Int.MAX_VALUE)

NestedParameter annotation for a property that holds an object with annotated parameters of its own. The parameters of that object are listed as Parameter.nestedParameters, user interfaces show them as a group. The property does not need to be mutable. When it is, it can be assigned an object of another class with other parameters; listParameters lists the object the property holds when it is called, the GUI of orx-gui follows assignments and replaces the controls of the group.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FIELD])
annotation class OptionLabel(val label: String)

The label of a constant of an enum that an OptionParameter chooses from, as user interfaces show it; constants without one are shown by their names in lowercase, with spaces for underscores, see Parameter.optionLabels

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class OptionParameter(val label: String, val order: Int = Int.MAX_VALUE, val description: String = "")

OptionParameter annotation for a double precision parameter

Link copied to clipboard
class Parameter(val parameterType: ParameterType, val property: KMutableProperty1<out Any, Any?>?, val function: KCallable<Unit>?, val label: String, val doubleRange: ClosedRange<Double>?, val vectorRange: Pair<Vector2, Vector2>?, val sizeRange: ClosedRange<Int>?, val intRange: IntRange?, val precision: Int?, val invertY: Boolean?, val showVector: Boolean?, val absolutePath: Boolean?, val pathContext: String?, val pathExtensions: Array<String>?, val pathIsDirectory: Boolean?, val order: Int, val nestedProperty: KProperty1<out Any, Any?>? = null, val nestedParameters: List<Parameter>? = null, val description: String? = null, val optionLabels: Map<String, String>? = null)

Parameter summary class. This is used by listParameters as a way to report parameters in a unified form.

Link copied to clipboard

The parameters of objects, bound by labels: their values are read, set, randomized, saved and loaded by the label of an object and the name of a parameter. This is what a GUI shows, without a GUI: programs that run without one, and other front ends, like remote controls or MIDI controllers, use it in the same way.

Link copied to clipboard
class ParameterHistory(val bindings: ParameterBindings, val maxSteps: Int = 100, clock: () -> Double = { System.nanoTime() / 1E9 })

The history of the changes to the values of bindings, for undo and redo. Changes that come in quick succession are one step: the changes of a drag of a control to the same parameter, and the changes that are made at once, like by ParameterBindings.randomize or ParameterBindings.load.

Link copied to clipboard
Link copied to clipboard
@Serializable
class ParameterValue(var doubleValue: Double? = null, var intValue: Int? = null, var booleanValue: Boolean? = null, var colorValue: ColorRGBa? = null, var vector2Value: Vector2? = null, var vector3Value: Vector3? = null, var vector4Value: Vector4? = null, var doubleListValue: MutableList<Double>? = null, var intListValue: MutableList<Int>? = null, var stringListValue: MutableList<String>? = null, var textValue: String? = null, var optionValue: String? = null, var minValue: Double? = null, var maxValue: Double? = null, var selectedIndex: Int? = null, var listElementType: String? = null)

The value of a parameter as it is saved and loaded, see ParameterBindings: the field that matches the type of the parameter is set, the others are null.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class PathParameter(val label: String, val absolute: Boolean = false, val context: String = "null", val extensions: Array<String> = [], val directory: Boolean = false, val order: Int = Int.MAX_VALUE, val description: String = "")

ActionParameter annotation for functions without arguments

Link copied to clipboard
interface Selectable

A list with a selected element, the value of a property with a ListParameter or a MutableListParameter annotation, like the SelectableList and SelectableMutableList of orx-panel. Lets the selection be saved and loaded without knowing the class of the list.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class TextParameter(val label: String, val order: Int = Int.MAX_VALUE, val description: String = "")

TextParameter annotation for a text parameter

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Vector2Parameter(val label: String, val min: Double = -1.0, val max: Double = 1.0, val precision: Int = 2, val order: Int = Int.MAX_VALUE, val description: String = "")
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Vector3Parameter(val label: String, val min: Double = -1.0, val max: Double = 1.0, val precision: Int = 2, val order: Int = Int.MAX_VALUE, val description: String = "")
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Vector4Parameter(val label: String, val min: Double = -1.0, val max: Double = 1.0, val precision: Int = 2, val order: Int = Int.MAX_VALUE, val description: String = "")
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class XYParameter(val label: String, val minX: Double = -1.0, val maxX: Double = 1.0, val minY: Double = -1.0, val maxY: Double = 1.0, val precision: Int = 2, val showVector: Boolean = false, val invertY: Boolean = true, val order: Int = Int.MAX_VALUE, val description: String = "")

Vector2 annotation for a vector 2 parameter

Properties

Link copied to clipboard

the name of this, the name of its property or its function, see ParameterBindings.Binding.parameter

Functions

Link copied to clipboard
expect fun Any.description(): String?
actual fun Any.description(): String?
actual fun Any.description(): String?
Link copied to clipboard

List all parameters, (public var properties with a parameter annotation, functions with an ActionParameter annotation and public properties with a NestedParameter annotation)

Link copied to clipboard

name, the name of a constant, in lowercase with spaces for underscores: SOFT_LIGHT is "soft light"

Link copied to clipboard
expect fun Any.title(): String?

List all parameters, (public var properties with a parameter annotation)

actual fun Any.title(): String?

List all parameters, (public var properties with a parameter annotation)

actual fun Any.title(): String?

List all parameters, (public var properties with a parameter annotation)