Documentation ¶
Overview ¶
Package spinner provides a simple themable spinner.
Index ¶
- func Render(w IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- type ChangeStateCB
- type IWidget
- type Options
- type Widget
- func (w *Widget) Enabled() bool
- func (w *Widget) Index() int
- func (w *Widget) OnChangeState(f gowid.IWidgetChangedCallback)
- func (w *Widget) RemoveOnChangeState(f gowid.IIdentity)
- func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
- func (w *Widget) SetEnabled(enabled bool, app gowid.IApp)
- func (w *Widget) SpinnerLen() int
- func (w *Widget) String() string
- func (w *Widget) Styler() gowid.ICellStyler
- func (w *Widget) Text() string
- func (w *Widget) Update()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChangeStateCB ¶
type ChangeStateCB struct{}
type IWidget ¶
type IWidget interface { gowid.IWidget // Text should return the string to be displayed inside the progress bar e.g. "50%" Text() string // Enabled returns true if spinner is spinning Enabled() bool // SetEnabled enables or disables the animation/spinning SetEnabled(bool, gowid.IApp) // Index returns the index at which to start drawing from the spinner characters Index() int // SpinnerLen returns the length of the set of chars used to draw the spinner SpinnerLen() int // Styler is used to render the incomplete part of the progress bar. Styler() gowid.ICellStyler }
IWidget - if your widget implements progress.IWidget, you will be able to render it using the progress.Render() function.
type Options ¶
type Options struct { Label string Styler gowid.ICellStyler }
Options is used for passing arguments to the progressbar initializer, New().
type Widget ¶
type Widget struct { Callbacks *gowid.Callbacks gowid.RejectUserInput gowid.NotSelectable // contains filtered or unexported fields }
Widget is the concrete type of a progressbar widget.
func (*Widget) OnChangeState ¶
func (w *Widget) OnChangeState(f gowid.IWidgetChangedCallback)
func (*Widget) RemoveOnChangeState ¶
func (*Widget) RenderSize ¶
func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
func (*Widget) SpinnerLen ¶
func (*Widget) Styler ¶
func (w *Widget) Styler() gowid.ICellStyler
Click to show internal directories.
Click to hide internal directories.