Package-level declarations
Types
Link copied to clipboard
class InvalidOption<T>(val label: String, val disabled: String, var hint: String? = null, val keyOptions: Map<String, KeyOption>? = null, val onHover: suspend SelectOption<out T>.() -> Unit? = null) : SelectOption<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class MultiSelectState<T>(optionsSupplier: () -> List<Option<T>>, defaultCursor: Int?, defaultOptions: Collection<T>, pageSize: Int, onHover: (selected: IndexedValue<Option<T>>?) -> Unit) : SelectState<T, Option<T>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class SelectKeyOption(val message: String, val color: TextStyle = gray, val label: String? = null, val action: KeyOptionContext.() -> Unit)
Select Key Option
Link copied to clipboard
Select Option interface
Link copied to clipboard
open class SelectState<T, O : SelectOption<T>>(optionsSupplier: () -> List<O>, defaultCursor: Int?, val pageSize: Int, val onHover: (selected: IndexedValue<O>?) -> Unit)
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T> Terminal.multiselect(title: String, options: () -> List<Option<T>>, keyOptions: Map<String, KeyOption>? = null, defaultCursor: Int? = null, defaultOptions: List<T> = emptyList(), details: (data: T, index: Int) -> Widget?? = null, onHover: suspend (option: Option<T>, index: Int) -> Unit? = null, onSelect: suspend (opion: Option<T>, index: Int) -> Unit? = null, onAnimate: (widget: Widget) -> Unit? = null, onDone: (animation: Animation<*>, throwable: Throwable?) -> Unit? = null, pageSize: Int = 10, maxPages: Int = 20): List<T>
Link copied to clipboard
fun <T, O : SelectOption<T>> Terminal.select(title: String, options: () -> List<O>, keyOptions: Map<String, KeyOption>? = null, defaultCursor: Int? = null, onHover: suspend (option: O, index: Int) -> Unit? = null, onAnimate: (widget: Widget) -> Unit? = null, onDone: (animation: Animation<*>, throwable: Throwable?) -> Unit? = null, onDisabled: (key: KeyPattern) -> Unit? = null, details: (data: T, index: Int) -> Widget?? = null, pageSize: Int = 10, maxPages: Int = 20): T
Link copied to clipboard
fun <T, O : SelectOption<T>> Terminal.select_old(message: String, options: Iterable<O>, sortedSelector: (SelectOption<out T>) -> Comparable<Any>?? = null, invalidOption: InvalidOption<T>? = null, keyOptions: Map<String, SelectKeyOption>? = null, defaultCursor: Int? = null, onHover: suspend (option: O, index: Int) -> Unit? = null, onSelect: (animation: Animation<*>) -> Unit? = null, onUpdate: (animation: Animation<*>) -> Unit? = null, onAnimate: (widget: Widget) -> Unit? = null, filterKey: String = "f", details: SelectDetails<T>? = null, pageSize: Int = 10): T