class Term::Prompt::Slider

Overview

A class responsible for gathering numeric input from range

Defined in:

prompt/slider.cr

Constant Summary

FORMAT = ":slider %d"
HELP = "(Use arrow keys, press Enter to select)"

Constructors

Instance Method Summary

Constructor Detail

def self.new(prompt : Term::Prompt, **options) #

Initialize a Slider


[View source]

Instance Method Detail

def call(question : Nil | String, &block) #

Call the slider by passing question


[View source]
def call(question : Nil | String) #

ditto


[View source]
def default(value : Int32 | Nil) #

[View source]
def format(value : String) #

[View source]
def initial #

Setup initial active position


[View source]
def keydown #

[View source]
def keyenter #

[View source]
def keyleft #

[View source]
def keyreturn #

[View source]
def keyright #

[View source]
def keyup #

[View source]
def max(value : Int32) #

[View source]
def min(value : Int32) #

[View source]
def range #

Range of numbers to render


[View source]
def step(value : Int32) #

[View source]
def symbols : Hash(Symbol, String) #

[View source]
def symbols=(new_symbols) #

Change symbols used by this prompt


[View source]