still working on the layout tool

- started doing it in a more adhoc way and will engineer it once I have
a clear vision
This commit is contained in:
2026-02-12 23:03:57 +00:00
parent 97caeafd58
commit f2d92c80ee
9 changed files with 678 additions and 154 deletions
+21
View File
@@ -1,6 +1,8 @@
package ui
import (
"esdi/cdashdisplay"
helper "esdi/helpers"
"esdi/tui/internal/models"
"github.com/rivo/tview"
@@ -8,6 +10,9 @@ import (
// Main controller events
// Find a way to remove this
type ForceRedraw struct{}
type LogEv struct {
Log string
}
@@ -26,6 +31,12 @@ type ChangeFocusEv struct {
// Layout events
type SaveLayoutEv struct{}
type LoadLayoutEv struct{}
type RegisterLoadedLayout struct {
Layout cdashdisplay.LayoutTree
}
type CreateWindowEv struct {
Window models.Window
}
@@ -38,6 +49,16 @@ type LayoutRegisterWindowEv struct {
Window models.Window
}
type MoveWindowEv struct {
WindowID int16
Delta helper.Vector
}
type ResizeWindowEv struct {
WindowID int16
Delta helper.Vector
}
type WindowCreatedEv struct {
ID int16
Title string