SpinnerElement

io.worxbend.tui.dsl.SpinnerElement
final case class SpinnerElement(elapsed: FiniteDuration, label: String, preset: SpinnerPreset, glyphStyle: Style, labelStyle: Style, props: ElementProps) extends Element

A spinner whose colors were resolved from the ambient Theme at construction.

The theme supplies the glyph and label styles; anything the call site sets with .color/.bold/.style layers on top of the glyph style, so spinner(tick).color(Color.Red) recolors the moving part and leaves the label alone.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Element
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def atFps(fps: Double): SpinnerElement

Runs the animation at an explicit frame rate.

Runs the animation at an explicit frame rate.

Attributes

def label(text: String): SpinnerElement

Sets the caption shown after the glyph.

Sets the caption shown after the glyph.

Attributes

def labelStyle(style: Style): SpinnerElement

Styles the caption independently of the glyph.

Styles the caption independently of the glyph.

Attributes

def preset(chosen: SpinnerPreset): SpinnerElement

Swaps the animation — see io.worxbend.tui.widgets.SpinnerPreset for the catalogue.

Swaps the animation — see io.worxbend.tui.widgets.SpinnerPreset for the catalogue.

Attributes

def slowedBy(factor: Double): SpinnerElement

Runs the animation factor times slower than the preset's own speed.

Runs the animation factor times slower than the preset's own speed.

Attributes

def widget: Widget

Inherited methods

def children: Seq[Element]

Attributes

Inherited from:
Element
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def style: Style

Attributes

Inherited from:
Element