Documentation
¶
Index ¶
- Constants
- type ExitAction
- type FakeHud
- func (h *FakeHud) Close()
- func (h *FakeHud) OnChange(ctx context.Context, st *store.Store)
- func (h *FakeHud) Refresh(ctx context.Context)
- func (h *FakeHud) Run(ctx context.Context, dispatch func(action store.Action), ...) error
- func (h *FakeHud) SetNarrationMessage(ctx context.Context, msg string)
- func (h *FakeHud) Update(v view.View, vs view.ViewState) error
- func (h *FakeHud) WaitUntil(t testing.TB, ctx context.Context, msg string, isDone func(view.View) bool)
- type HeadsUpDisplay
- type Hud
- func (h *Hud) Close()
- func (h *Hud) OnChange(ctx context.Context, st *store.Store)
- func (h *Hud) Refresh(ctx context.Context)
- func (h *Hud) Run(ctx context.Context, dispatch func(action store.Action), ...) error
- func (h *Hud) SetNarrationMessage(ctx context.Context, msg string)
- func (h *Hud) Update(v view.View, vs view.ViewState) error
- type Renderer
- type Scroller
- type ShowErrorAction
Constants ¶
View Source
const DefaultRefreshInterval = 1 * time.Second
The main loop ensures the HUD updates at least this often
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExitAction ¶ added in v0.1.0
type ExitAction struct{}
func (ExitAction) Action ¶ added in v0.1.0
func (ExitAction) Action()
type FakeHud ¶
type FakeHud struct {
LastView view.View
Canceled bool
Closed bool
// contains filtered or unexported fields
}
func NewFakeHud ¶
func NewFakeHud() *FakeHud
func (*FakeHud) SetNarrationMessage ¶
type HeadsUpDisplay ¶
type HeadsUpDisplay interface {
store.Subscriber
Run(ctx context.Context, dispatch func(action store.Action), refreshRate time.Duration) error
Update(v view.View, vs view.ViewState) error
Close()
SetNarrationMessage(ctx context.Context, msg string)
}
func NewDefaultHeadsUpDisplay ¶
func NewDefaultHeadsUpDisplay(renderer *Renderer) (HeadsUpDisplay, error)
type Hud ¶
type Hud struct {
// contains filtered or unexported fields
}
func (*Hud) SetNarrationMessage ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
type ShowErrorAction ¶
type ShowErrorAction struct {
// 1-based index of resource whose log should be printed
ResourceNumber int
}
func NewShowErrorAction ¶
func NewShowErrorAction(resourceNumber int) ShowErrorAction
func (ShowErrorAction) Action ¶
func (ShowErrorAction) Action()
Click to show internal directories.
Click to hide internal directories.