Versions in this module Expand all Collapse all v0 v0.2.5 Sep 20, 2026 v0.2.4 Sep 16, 2026 v0.2.3 Sep 16, 2026 v0.2.2 Sep 16, 2026 v0.2.1 Sep 16, 2026 Changes in this version type Window + func (w *Window) ClearFocus() v0.2.0 Sep 16, 2026 Changes in this version + const KeyCancel + const KeyColumnDate + const KeyColumnName + const KeyColumnSize + const KeyColumnType + const KeyDirLabel + const KeyFileFolder + const KeyFileGeneric + const KeyFileNameLabel + const KeyFilterAll + const KeyFilterGph + const KeyFilterImage + const KeyFilterVideo + const KeyNo + const KeyOK + const KeyOpen + const KeyValuePrompt + const KeyValueRangeError + const KeyValueRequired + const KeyYes type Application + func (app *Application) Locale() Locale + func (app *Application) SetLocale(l Locale) + func (app *Application) SetTranslations(locale Locale, catalog Catalog) + func (app *Application) T(key string, args ...any) string + type Catalog map[string]string + func (c Catalog) Merge(others ...Catalog) Catalog + type Locale string + const LocaleChinese + const LocaleCzech + const LocaleDutch + const LocaleEnglish + const LocaleFrench + const LocaleGerman + const LocaleItalian + const LocaleJapanese + const LocaleKorean + const LocalePolish + const LocalePortuguese + const LocaleRussian + const LocaleSpanish + const LocaleTurkish + const LocaleUkrainian v0.1.0 Sep 10, 2026 Changes in this version + var GphMagic = []byte + func GetTerminalSize() (int, int) + func NoteName(note uint8) string + func ShowConfirm(app *Application, title, message string, style ButtonStyle, onConfirm func()) + func ShowFilePicker(app *Application, initialDir string, onSelect func(path string)) + func ShowTextEditor(app *Application, title, label, current string, onConfirm func(string)) + func ShowValueEditor(app *Application, title string, current, min, max float64, ...) + func WriteGph(w io.Writer, img *GphImage) error + type Application struct + func NewApplication() *Application + func (app *Application) CloseModal() + func (app *Application) Invoke(fn func()) + func (app *Application) Quit() + func (app *Application) Resume() + func (app *Application) Run() + func (app *Application) SetIdleCallback(cb func()) + func (app *Application) SetModal(mod *Window) + func (app *Application) SetOnQuitRequested(fn func()) + func (app *Application) SetStatus(status string) + func (app *Application) SetTheme(t Theme) + func (app *Application) SetWindow(win *Window) + func (app *Application) ShowMessage(title, message string, style ButtonStyle) + func (app *Application) Suspend() + type BaseWidget struct + AbsX int + AbsY int + Enabled bool + Height int + IsFocusable bool + IsFocused bool + LastH int + LastW int + PctH int + PctW int + PctX int + PctY int + Visible bool + Width int + X int + Y int + func NewBaseWidget(x, y, w, h int) BaseWidget + func (b *BaseWidget) CanFocus() bool + func (b *BaseWidget) DrawOverlay(c *Canvas, oX, oY, pW, pH int) + func (b *BaseWidget) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (b *BaseWidget) GetChildren() []Widget + func (b *BaseWidget) GetFixedH() int + func (b *BaseWidget) GetFixedW() int + func (b *BaseWidget) HandleEvent(ev Event) + func (b *BaseWidget) HasFocus() bool + func (b *BaseWidget) HitTest(mx, my int) bool + func (b *BaseWidget) IsEnabled() bool + func (b *BaseWidget) IsVisible() bool + func (b *BaseWidget) SetEnabled(e bool) + func (b *BaseWidget) SetFocus(f bool) + func (b *BaseWidget) SetPercentLayout(x, y, w, h int) + func (b *BaseWidget) SetPosition(x, y int) + func (b *BaseWidget) SetVisible(v bool) + type Button struct + BgColor Color + FgColor Color + OnClick func() + Style ButtonStyle + Text string + func NewButton(x, y int, text string, style ButtonStyle, onClick func()) *Button + func (b *Button) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (b *Button) HandleEvent(ev Event) + type ButtonStyle int + const BtnDanger + const BtnDefault + const BtnInfo + const BtnSuccess + const BtnWarning + type Canvas struct + func NewCanvas() *Canvas + func (c *Canvas) Clear() + func (c *Canvas) DrawCell(x, y int, s string, bg, fg Color) + func (c *Canvas) DrawText(x, y int, text string, bg, fg Color) + func (c *Canvas) DrawTextBounded(x, y, maxW int, text string, bg, fg Color) + func (c *Canvas) DrawTextWrapped(x, y, maxW int, text string, bg, fg Color) int + func (c *Canvas) GetCellBg(x, y int) Color + func (c *Canvas) Height() int + func (c *Canvas) Render() + func (c *Canvas) Resize(w, h int) + func (c *Canvas) Theme() Theme + func (c *Canvas) Width() int + type Cell struct + BgColor Color + FgColor Color + Symbol string + func (c Cell) NotEqual(other Cell) bool + type Checkbox struct + Checked bool + Label string + OnChange func(checked bool) + func NewCheckbox(x, y int, label string, checked bool) *Checkbox + func (cb *Checkbox) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (cb *Checkbox) HandleEvent(ev Event) + type Color int32 + const ColorNone + func Hex(s string) Color + func RGB(r, g, b uint8) Color + func (c Color) Components() (r, g, b uint8) + func (c Color) ContrastText() Color + func (c Color) Darken(pct float64) Color + type ComboBox struct + IsOpen bool + Items []string + OnSelect func(idx int, item string) + Selected int + func NewComboBox(x, y, w int, items []string, onSelect func(int, string)) *ComboBox + func (cb *ComboBox) DrawOverlay(c *Canvas, offX, offY, pW, pH int) + func (cb *ComboBox) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (cb *ComboBox) HandleEvent(ev Event) + func (cb *ComboBox) HitTest(mx, my int) bool + type Event struct + CharCode rune + Key KeyCode + MouseX int + MouseY int + Type EventType + type EventType int + const EventKey + const EventMouseDown + const EventMouseDrag + const EventMouseRightDown + const EventMouseScrollDown + const EventMouseScrollUp + const EventMouseUp + const EventNone + type Fader struct + ChannelName string + ClipThreshold float64 + Clipping bool + LabelColor Color + Level float64 + Muted bool + OnChange func(value float64) + OnDoubleClick func() + OnMuteChange func(muted bool) + OnSoloChange func(soloed bool) + ShowClip bool + ShowMeter bool + ShowMute bool + ShowSolo bool + Soloed bool + Ticks []FaderTick + Value float64 + func NewFader(x, y, w int, channelName string, labelColor Color) *Fader + func (f *Fader) ClearClip() + func (f *Fader) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (f *Fader) HandleEvent(ev Event) + func (f *Fader) SetLevel(level float64) + type FaderTick struct + Label string + Percent float64 + type Flex struct + Direction FlexDirection + Gap int + func NewFlex(x, y, w, h int, dir FlexDirection) *Flex + func (f *Flex) AddChild(w Widget, weight int) + func (f *Flex) Clear() + func (f *Flex) DrawOverlay(c *Canvas, offX, offY, pW, pH int) + func (f *Flex) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (f *Flex) GetChildren() []Widget + type FlexDirection int + const FlexColumn + const FlexRow + type GphImage struct + DelayMs uint16 + Frames [][]GphPixel + Height int + Mode PlaybackMode + Width int + func LoadGphFile(path string) (*GphImage, error) + func ReadGph(r io.Reader) (*GphImage, error) + type GphPixel struct + Bg Color + Fg Color + Level uint8 + type GroupBox struct + Children []Widget + Label string + func NewGroupBox(x, y, w, h int, label string) *GroupBox + func (gb *GroupBox) AddWidget(w Widget) + func (gb *GroupBox) DrawOverlay(c *Canvas, offX, offY, pW, pH int) + func (gb *GroupBox) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (gb *GroupBox) GetChildren() []Widget + type Image struct + AutoSize bool + Img *GphImage + OnFrameUpdate func() + func NewImage(x, y int, img *GphImage) *Image + func (img *Image) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (img *Image) NextFrame() + func (img *Image) Play(app *Application) + func (img *Image) PrevFrame() + func (img *Image) Stop() + type InputBox struct + CursorPos int + Label string + Masked bool + OnSubmit func(string) + Value string + func NewInputBox(x, y, w int, label string) *InputBox + func NewPasswordBox(x, y, w int, label string) *InputBox + func (ib *InputBox) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (ib *InputBox) HandleEvent(ev Event) + type KeyCode int + const KeyBackspace + const KeyCtrlC + const KeyCtrlV + const KeyCtrlX + const KeyDelete + const KeyDown + const KeyEnter + const KeyEscape + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF2 + const KeyF3 + const KeyF4 + const KeyF5 + const KeyF6 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyInsert + const KeyLeft + const KeyNone + const KeyRight + const KeySpace + const KeyTab + const KeyUp + type Label struct + Text string + func NewLabel(x, y int, text string) *Label + func (l *Label) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (l *Label) SetText(text string) + type ListBox struct + Items []string + OnDoubleClick func(int, string) + OnSelect func(int, string) + Scroll int + Selected int + func NewListBox(x, y, w, h int, items []string, onSelect func(int, string)) *ListBox + func (lb *ListBox) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (lb *ListBox) HandleEvent(ev Event) + type MenuCategory struct + Items []MenuItem + Label string + type MenuItem struct + Action func() + Label string + Separator bool + SubItems []MenuItem + type MenuStrip struct + BgColor Color + Categories []MenuCategory + FgColor Color + OpenIdx int + OpenSubIdx int + func NewMenuStrip(categories []MenuCategory) *MenuStrip + func (m *MenuStrip) DrawOverlay(c *Canvas, offX, offY, pW, pH int) + func (m *MenuStrip) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (m *MenuStrip) HandleEvent(ev Event) + func (m *MenuStrip) HitTest(mx, my int) bool + type Panel struct + Children []Widget + FocusIdx int + func NewPanel(x, y, w, h int) *Panel + func (p *Panel) AddWidget(w Widget) + func (p *Panel) DrawOverlay(c *Canvas, offX, offY, pW, pH int) + func (p *Panel) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (p *Panel) GetChildren() []Widget + type PianoOrientation int + const PianoHorizontal + const PianoVertical + type PianoRoll struct + KeyMap map[rune]int + KeyReleaseTimeout time.Duration + KeyboardOctaveBase uint8 + LowestNote uint8 + MinKeys int + OnNoteOff func(note uint8) + OnNoteOn func(note uint8, velocity uint8) + Orientation PianoOrientation + Velocity uint8 + func NewPianoRoll(x, y, w, h int, orientation PianoOrientation, lowestNote uint8) *PianoRoll + func (p *PianoRoll) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (p *PianoRoll) HandleEvent(ev Event) + func (p *PianoRoll) NoteOff(note uint8) + func (p *PianoRoll) NoteOn(note, velocity uint8) + type PlaybackMode uint8 + const PlaybackBoomerang + const PlaybackLoop + const PlaybackOnce + const PlaybackStatic + type ProgressBar struct + Label string + Progress float32 + func NewProgressBar(x, y, w int, label string) *ProgressBar + func (pb *ProgressBar) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (pb *ProgressBar) SetProgress(p float32) + type RawInputReceiver interface + WriteRaw func(p []byte) + type Slider struct + Label string + Max float64 + Min float64 + OnChange func(value float64) + OnDoubleClick func() + Value float64 + func NewSlider(x, y, w int, label string, min, max float64) *Slider + func (s *Slider) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (s *Slider) HandleEvent(ev Event) + func (s *Slider) SetValue(v float64) + type Spinner struct + Label string + func NewSpinner(x, y int, label string) *Spinner + func (s *Spinner) DrawRelative(c *Canvas, offX, offY, pW, pH int) + type Tab struct + Name string + Widgets []Widget + type TabStyle int + const TabDefault + const TabTimeline + type TabView struct + Active int + Style TabStyle + Tabs []Tab + func NewTabView(x, y, w int, style TabStyle) *TabView + func (tv *TabView) AddTab(name string, widgets []Widget) + func (tv *TabView) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (tv *TabView) HandleEvent(ev Event) + func (tv *TabView) UpdateVisibility() + type Terminal struct + OnExit func(err error) + func NewTerminal(app *Application, x, y, w, h int, shell string, args []string) (*Terminal, error) + func (t *Terminal) Close() error + func (t *Terminal) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (t *Terminal) Exited() (exited bool, err error) + func (t *Terminal) HandleEvent(ev Event) + func (t *Terminal) WriteRaw(p []byte) + type TextArea struct + CursorPos int + Scroll int + Text string + func NewTextArea(x, y, w, h int) *TextArea + func (ta *TextArea) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (ta *TextArea) HandleEvent(ev Event) + func (ta *TextArea) SetText(text string) + type TextLine struct + Runes []rune + Start int + type Theme struct + Accent Color + BgFocused Color + BgScreen Color + BgWidget Color + BgWindow Color + Danger Color + Disabled Color + FgDisabled Color + FgFocused Color + FgWindow Color + Info Color + Primary Color + Success Color + Warning Color + func DefaultTheme() Theme + type TodoItem struct + State TodoState + Text string + type TodoList struct + Items []TodoItem + ReadOnly bool + Scroll int + Selected int + func NewTodoList(x, y, w, h int, items []string, readOnly bool) *TodoList + func (tl *TodoList) DrawRelative(c *Canvas, offX, offY, pW, pH int) + func (tl *TodoList) HandleEvent(ev Event) + func (tl *TodoList) SetItemState(idx int, state TodoState) + type TodoState int + const TodoDone + const TodoPending + const TodoRunning + type Widget interface + CanFocus func() bool + DrawOverlay func(c *Canvas, offX, offY, pW, pH int) + DrawRelative func(c *Canvas, offX, offY, pW, pH int) + GetChildren func() []Widget + GetFixedH func() int + GetFixedW func() int + HandleEvent func(ev Event) + HasFocus func() bool + HitTest func(mx, my int) bool + IsEnabled func() bool + IsVisible func() bool + SetEnabled func(e bool) + SetFocus func(f bool) + SetPercentLayout func(pctX, pctY, pctW, pctH int) + SetPosition func(x, y int) + SetVisible func(v bool) + type Window struct + Children []Widget + Chrome WindowChrome + FixedH int + FixedW int + PaddingX int + PaddingY int + PctH int + PctW int + Title string + func NewFullscreenWindow() *Window + func NewWindow(w, h int, title string) *Window + func (w *Window) AddWidget(widget Widget) + func (w *Window) ClearMouseCapture() + func (w *Window) Draw(c *Canvas) + func (w *Window) HandleEvent(ev Event) + func (w *Window) HasMouseCapture() bool + func (w *Window) SetPercentSize(pw, ph int) + type WindowChrome int + const ChromeBordered + const ChromeBorderless