Versions in this module Expand all Collapse all v0 v0.23.0 Aug 23, 2023 Changes in this version + type Alignment int16 + const AlignCenter + const AlignLeft + const AlignRight + type Box struct + AlignFooter Alignment + AlignTitle Alignment + Footer StyledText + Style gruid.Style + Title StyledText + func (b Box) Draw(gd gruid.Grid) gruid.Grid + type Label struct + AdjustWidth bool + Box *Box + Content StyledText + func NewLabel(content StyledText) *Label + func (lb *Label) Draw(gd gruid.Grid) gruid.Grid + func (lb *Label) SetText(text string) + type Menu struct + func NewMenu(cfg MenuConfig) *Menu + func (m *Menu) Action() MenuAction + func (m *Menu) Active() int + func (m *Menu) ActiveBounds() gruid.Range + func (m *Menu) Bounds() gruid.Range + func (m *Menu) Draw() gruid.Grid + func (m *Menu) SetActive(i int) + func (m *Menu) SetBox(b *Box) + func (m *Menu) SetEntries(entries []MenuEntry) + func (m *Menu) Update(msg gruid.Msg) gruid.Effect + type MenuAction int + const MenuInvoke + const MenuMove + const MenuPass + const MenuQuit + type MenuConfig struct + Box *Box + Entries []MenuEntry + Grid gruid.Grid + Keys MenuKeys + Style MenuStyle + type MenuEntry struct + Disabled bool + Keys []gruid.Key + Text StyledText + type MenuKeys struct + Down []gruid.Key + Invoke []gruid.Key + Left []gruid.Key + PageDown []gruid.Key + PageUp []gruid.Key + Quit []gruid.Key + Right []gruid.Key + Up []gruid.Key + type MenuStyle struct + Active gruid.Style + Layout gruid.Point + PageNum gruid.Style + type Pager struct + func NewPager(cfg PagerConfig) *Pager + func (pg *Pager) Action() PagerAction + func (pg *Pager) Draw() gruid.Grid + func (pg *Pager) SetBox(b *Box) + func (pg *Pager) SetCursor(p gruid.Point) + func (pg *Pager) SetLines(lines []StyledText) + func (pg *Pager) Update(msg gruid.Msg) gruid.Effect + func (pg *Pager) View() gruid.Range + type PagerAction int + const PagerMove + const PagerPass + const PagerQuit + type PagerConfig struct + Box *Box + Grid gruid.Grid + Keys PagerKeys + Lines []StyledText + Style PagerStyle + type PagerKeys struct + Bottom []gruid.Key + Down []gruid.Key + HalfPageDown []gruid.Key + HalfPageUp []gruid.Key + Left []gruid.Key + PageDown []gruid.Key + PageUp []gruid.Key + Quit []gruid.Key + Right []gruid.Key + Start []gruid.Key + Top []gruid.Key + Up []gruid.Key + type PagerStyle struct + LineNum gruid.Style + type Replay struct + func NewReplay(cfg ReplayConfig) *Replay + func (rep *Replay) Draw() gruid.Grid + func (rep *Replay) Seek(d time.Duration) + func (rep *Replay) SetFrame(n int) + func (rep *Replay) Update(msg gruid.Msg) gruid.Effect + type ReplayConfig struct + FrameDecoder *gruid.FrameDecoder + Grid gruid.Grid + Keys ReplayKeys + type ReplayKeys struct + Backward []gruid.Key + Forward []gruid.Key + FrameNext []gruid.Key + FramePrev []gruid.Key + Help []gruid.Key + Pause []gruid.Key + Quit []gruid.Key + SpeedLess []gruid.Key + SpeedMore []gruid.Key + type StyledText struct + func NewStyledText(text string, st gruid.Style) StyledText + func Text(text string) StyledText + func Textf(format string, a ...interface{}) StyledText + func (stt StyledText) Draw(gd gruid.Grid) gruid.Grid + func (stt StyledText) Format(width int) StyledText + func (stt StyledText) Iter(fn func(gruid.Point, gruid.Cell)) gruid.Point + func (stt StyledText) Markups() map[rune]gruid.Style + func (stt StyledText) Size() gruid.Point + func (stt StyledText) Style() gruid.Style + func (stt StyledText) Text() string + func (stt StyledText) With(text string, style gruid.Style) StyledText + func (stt StyledText) WithMarkup(r rune, style gruid.Style) StyledText + func (stt StyledText) WithMarkups(markups map[rune]gruid.Style) StyledText + func (stt StyledText) WithStyle(style gruid.Style) StyledText + func (stt StyledText) WithText(text string) StyledText + func (stt StyledText) WithTextf(format string, a ...interface{}) StyledText + type TextInput struct + func NewTextInput(cfg TextInputConfig) *TextInput + func (ti *TextInput) Action() TextInputAction + func (ti *TextInput) Content() string + func (ti *TextInput) Draw() gruid.Grid + func (ti *TextInput) SetBox(b *Box) + func (ti *TextInput) SetCursor(i int) + func (ti *TextInput) Update(msg gruid.Msg) gruid.Effect + type TextInputAction int + const TextInputChange + const TextInputInvoke + const TextInputPass + const TextInputQuit + type TextInputConfig struct + Box *Box + Grid gruid.Grid + Keys TextInputKeys + Prompt StyledText + Style TextInputStyle + Text StyledText + type TextInputKeys struct + Quit []gruid.Key + type TextInputStyle struct + Cursor gruid.Style