func setup() *Context { ctx := new(Context) ctx.ItemStore = NewMockItemStore() ctx.Entry = NewFakeEntry() ctx.AddButton = NewFakeAddButton() ctx.ToggleButton = NewFakeToggleButton() ui := ui.NewUi(ctx.Entry, NewFakeListStore(), ctx.AddButton, ctx.ToggleButton, func() {}) ctx.App = NewApp(ctx.ItemStore, ui, 10) return ctx }
func Load() ui.Ui { ls := loadListStore() toggleButton := NewToggleButton(loadToggleRenderer(), ls) entry := loadEntry() addButton := entry win := loadWindow() return ui.NewUi(entry, ls, addButton, toggleButton, func() { win.ShowAll() gtk.Main() }) }