Documentation
¶
Overview ¶
Package progressbar provides ProgressBar, a single-line visual progress indicator with optional percentage label.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProgressBar ¶
type ProgressBar struct {
views.Base
Min, Max int
Position int
ShowPercent bool
FilledChar rune
EmptyChar rune
}
ProgressBar is a [Min..Max] gauge filled left-to-right.
func New ¶
func New(bounds geom.Rect, min, max int) *ProgressBar
New constructs a ProgressBar with range [min..max].
func (*ProgressBar) GetTypeID ¶
func (p *ProgressBar) GetTypeID() string
GetTypeID for the serial registry.
func (*ProgressBar) SetProgress ¶
func (p *ProgressBar) SetProgress(v int)
SetProgress clamps v to [Min, Max] and stores it.
func (*ProgressBar) SetRange ¶
func (p *ProgressBar) SetRange(min, max int)
SetRange installs a new (min, max), clamping the current position.
Click to show internal directories.
Click to hide internal directories.