forge/windowRepos.go

67 lines
935 B
Go

// Copyright 2017-2025 WIT.COM Inc. All rights reserved.
// Use of this source code is governed by the GPL 3.0
package main
import (
"go.wit.com/lib/gadgets"
"go.wit.com/gui"
)
type repoWindow struct {
win *gadgets.BasicWindow // the window widget itself
box *gui.Node // notsure
topbox *gui.Node // the top box of the repolist window
}
func (r *repoWindow) Hidden() bool {
if r == nil {
return true
}
if r.win == nil {
return true
}
return r.win.Hidden()
}
func (r *repoWindow) Show() {
if r == nil {
return
}
if r.win == nil {
return
}
r.win.Show()
}
func (r *repoWindow) Hide() {
if r == nil {
return
}
if r.win == nil {
return
}
r.win.Hide()
}
func (r *repoWindow) Disable() {
if r == nil {
return
}
if r.box == nil {
return
}
r.box.Disable()
}
func (r *repoWindow) Enable() {
if r == nil {
return
}
if r.box == nil {
return
}
r.box.Enable()
}