From 3fa08bed151d174e3cf699abd7e39e8709a8d4e1 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 8 May 2019 13:09:17 -0700 Subject: [PATCH] export two functions Signed-off-by: Jeff Carr --- gui.go | 9 +++++---- table.go | 2 +- tableCallbacks.go | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gui.go b/gui.go index 71ef399..816464b 100644 --- a/gui.go +++ b/gui.go @@ -1,4 +1,4 @@ -package main +package gui import "log" // import "fmt" @@ -239,7 +239,7 @@ func setupUI() { mainwin.Show() } -func addTableTab(name string, rowcount int, row1name string) { +func AddTableTab(name string, rowcount int, row1name string) { mh := new(tableData) mh.rowcount = rowcount @@ -277,10 +277,11 @@ func addTableTab(name string, rowcount int, row1name string) { maintab.SetMargined(tabcount, true) } -func doGUI() { +func DoGUI() { ui.Main(setupUI) log.Println("GUI exited. Not sure what to do here. os.Exit() ?") - onExit() + // not sure how to pass this back to the main program + // onExit() } diff --git a/table.go b/table.go index 6e23e25..0b7f539 100644 --- a/table.go +++ b/table.go @@ -1,6 +1,6 @@ // based off andlabs/ui/examples/table.go -package main +package gui import "fmt" import "log" diff --git a/tableCallbacks.go b/tableCallbacks.go index 42f91ef..8e9eda3 100644 --- a/tableCallbacks.go +++ b/tableCallbacks.go @@ -1,4 +1,4 @@ -package main +package gui // // These functions are the hooks to the andlabs libui