Documentation
¶
Overview ¶
Package tui holds the tabs of `doit tui`, each a gotermboard board.
Index ¶
- Constants
- func DisplayFile() string
- func Print(ctx context.Context, out io.Writer, in Inputs, view string, asJSON bool, ...) error
- func Program(in Inputs, pal gotermstyle.Palette, view string) (*gotermboard.Tabs, error)
- func TabNames() []string
- type DeskPanel
- type Inputs
- type NowBoard
- func (b *NowBoard) Actions() []gotermboard.Action
- func (b *NowBoard) Frame(now time.Time, _ string) gotermboard.Frame
- func (b *NowBoard) Groupings() []string
- func (b *NowBoard) Receive(m *gotermboard.Model, msg tea.Msg) tea.Cmd
- func (b *NowBoard) Snapshot(time.Time) desknudge.Panel
- func (b *NowBoard) Sources() []gotermboard.Refresher
- func (b *NowBoard) UnderWay() string
- type Panel
Constants ¶
const NowTab = "now"
NowTab is the tab of today's rows on the desk nudge panel.
Variables ¶
This section is empty.
Functions ¶
func DisplayFile ¶
func DisplayFile() string
DisplayFile is where the live program keeps each tab's display and the tab last moved to.
func Print ¶
func Print(ctx context.Context, out io.Writer, in Inputs, view string, asJSON bool, pal gotermstyle.Palette) error
Print reads the tab view names once, the first where it names none, and prints its frame, or its snapshot where asJSON is set. It builds no other tab.
func Program ¶
func Program(in Inputs, pal gotermstyle.Palette, view string) (*gotermboard.Tabs, error)
Program is the live program of every tab, keeping its display in DisplayFile. It opens on the tab that view names. With no view, it opens where the last run was left.
Types ¶
type DeskPanel ¶
DeskPanel is this desk's panel. Show reads it as `doit desk-nudge panel show` does, from the files the watch writes, and Pick hands a key to the watch as `doit desk-nudge panel pick` does.
type Inputs ¶
type Inputs struct {
// Panel is the desk nudge panel, which the now tab reads and picks through.
Panel Panel
}
Inputs is what the tabs' boards are built from.
type NowBoard ¶
type NowBoard struct {
// contains filtered or unexported fields
}
NowBoard is the now tab: the suggestion, the answers while a nudge is ready, and every row of today that something completes, each completed by a click or a key.
func NewNowBoard ¶
func (*NowBoard) Actions ¶
func (b *NowBoard) Actions() []gotermboard.Action
Actions puts each of a ready nudge's answers on a number, in the order the panel lists them.
func (*NowBoard) Frame ¶
Frame draws the suggestion first, then each completion row under the group the panel names for it, in the order the panel lists them.
func (*NowBoard) Snapshot ¶
Snapshot is the tab's panel document, as `doit desk-nudge panel show --json` prints it.
func (*NowBoard) Sources ¶
func (b *NowBoard) Sources() []gotermboard.Refresher