aboutsummaryrefslogtreecommitdiff
path: root/ui/types.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-01-10 22:03:56 -0500
committerDrew DeVault <sir@cmpwn.com>2018-01-10 22:03:56 -0500
commitdb1b2cd53f5dc7bfbfb6ee54ad0bb0882ea2cc03 (patch)
tree97c17d675dc2b38cf2acb6473f545de2c0d42979 /ui/types.go
parenta0be5e80256b98237241b2f3d7825484e7a9c964 (diff)
Renderer scaffolding
Diffstat (limited to 'ui/types.go')
-rw-r--r--ui/types.go47
1 files changed, 47 insertions, 0 deletions
diff --git a/ui/types.go b/ui/types.go
new file mode 100644
index 0000000..a7918b5
--- /dev/null
+++ b/ui/types.go
@@ -0,0 +1,47 @@
+package ui
+
+const (
+ Valid = 0
+ InvalidateTabs = 1 << iota
+ InvalidateSidebar
+ InvalidateStatusBar
+)
+
+const (
+ InvalidateAll = InvalidateTabs | InvalidateSidebar | InvalidateStatusBar
+)
+
+type Geometry struct {
+ row int
+ col int
+ width int
+ height int
+}
+
+type AercTab interface {
+ Name() string
+ Invalid() bool
+ Render(at Geometry)
+}
+
+type UIState struct {
+ Exit bool
+ InvalidPanes uint
+
+ Panes struct {
+ TabList Geometry
+ TabView Geometry
+ Sidebar Geometry
+ StatusBar Geometry
+ }
+
+ Tabs []AercTab
+ SelectedTab int
+
+ Prompt struct {
+ Prompt *string
+ Text *string
+ Index int
+ Scroll int
+ }
+}