autotypist/tagWindow.go

56 lines
927 B
Go

package main
import (
"go.wit.com/gui"
"go.wit.com/log"
"go.wit.com/lib/gadgets"
"go.wit.com/lib/gui/repostatus"
)
var tagW *tagWindow
type tagWindow struct {
win *gadgets.BasicWindow
box *gui.Node
grid *gui.Node
group *gui.Node
allTags []*gitTag
}
type gitTag struct {
rs *repostatus.RepoStatus
hidden bool
}
func makeTagWindow() *tagWindow {
if tagW != nil {
tagW.win.Toggle()
return tagW
}
tagW = new(tagWindow)
tagW.win = gadgets.NewBasicWindow(me.myGui, "git tag tasks")
tagW.win.Custom = func() {
log.Warn("got to close")
}
tagW.win.Make()
tagW.win.StandardClose()
tagW.win.Draw()
tagW.box = tagW.win.Box()
topGrid := tagW.box.RawGrid()
tagW.group = tagW.box.NewGroup("tags")
tagW.grid = tagW.box.RawGrid()
topGrid.NewButton("list all tags", func() {
log.Info("fixme")
}).SetProgName("TAGSLISTALL")
return tagW
}
func (t *gitTag) Hide() {
t.hidden = true
}