spinner

package
v0.0.0-...-260126f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Created by Navid Yaghoobi and adopted from https://github.com/navidys/tvxwidgets/blob/b555c093da2ad329f1c79eb0f0631a1b9c616efe/spinner.go License text: https://github.com/navidys/tvxwidgets/blob/b555c093da2ad329f1c79eb0f0631a1b9c616efe/LICENSE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container interface {
	Container() tview.Primitive
}

type Spinner

type Spinner struct {
	*tview.Box
	// contains filtered or unexported fields
}

Spinner represents a spinner widget.

func New

func New(d func() *tview.Application) *Spinner

NewSpinner returns a new spinner widget.

func (*Spinner) Container

func (s *Spinner) Container() tview.Primitive

func (*Spinner) Draw

func (s *Spinner) Draw(screen tcell.Screen)

Draw draws this primitive onto the screen.

func (*Spinner) SetCustomStyle

func (s *Spinner) SetCustomStyle(frames []rune) *Spinner

SetCustomStyle sets a list of runes as custom frames to show as the spinner.

func (*Spinner) SetStyle

func (s *Spinner) SetStyle(style SpinnerStyle) *Spinner

SetStyle sets the spinner style.

func (*Spinner) Start

func (s *Spinner) Start()

func (*Spinner) Stop

func (s *Spinner) Stop()

type SpinnerStyle

type SpinnerStyle int
const (
	SpinnerDotsCircling SpinnerStyle = iota
	SpinnerDotsUpDown
	SpinnerBounce
	SpinnerLine
	SpinnerCircleQuarters
	SpinnerSquareCorners
	SpinnerCircleHalves
	SpinnerCorners
	SpinnerArrows
	SpinnerHamburger
	SpinnerStack
	SpinnerGrowHorizontal
	SpinnerGrowVertical
	SpinnerStar
	SpinnerBoxBounce
)

type StartStopper

type StartStopper interface {
	Start()
	Stop()
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL