Created a devices service and moved the CDashDisplay service to the sahdow realm

This commit is contained in:
2026-08-25 14:46:20 +01:00
parent fe86993c6d
commit f4bde52f40
19 changed files with 444 additions and 184 deletions
+25
View File
@@ -0,0 +1,25 @@
package cdashdisplay
import "fmt"
type LayoutTree struct {
Windows map[int16]*DesktopUIWindow `yaml:"Windows"`
}
func NewLayoutTree() *LayoutTree {
return &LayoutTree{
Windows: make(map[int16]*DesktopUIWindow),
}
}
func (l *LayoutTree) AddWindow(w *DesktopUIWindow) {
pLogger.Debug(fmt.Sprintf("adding window '%d' - %v", w.UIData.IDX))
l.Windows[w.UIData.IDX] = w
pLogger.Debug(fmt.Sprintf("new map - %v", l.Windows))
}
func (l *LayoutTree) RemoveWindow(idx int16) {
pLogger.Debug(fmt.Sprintf("removing window '%d'", idx))
delete(l.Windows, idx)
pLogger.Debug(fmt.Sprintf("new map - %v", l.Windows))
}