blob: a7a3018169db2fb0ce949ced68eb3f1511e351e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
// 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()
}
|