From dddef229dcab1cd2c5ab7101dc5a4781478c0a62 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 1 Feb 2024 21:47:31 -0600 Subject: dropdown & combobox's pop up Signed-off-by: Jeff Carr --- gocui.go | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'gocui.go') diff --git a/gocui.go b/gocui.go index dec6d20..05672ec 100644 --- a/gocui.go +++ b/gocui.go @@ -12,35 +12,6 @@ import ( "go.wit.com/log" ) -// This initializes the gocui package -// it runs SetManagerFunc which passes every input -// event (keyboard, mouse, etc) to the function "gocuiEvent()" -func gocuiMain() { - g, err := gocui.NewGui(gocui.OutputNormal, true) - if err != nil { - panic(err) - } - defer g.Close() - - me.baseGui = g - - g.Cursor = true - g.Mouse = true - - // this sets the function that is run on every event. For example: - // When you click the mouse, move the mouse, or press a key on the keyboard - // This is equivalent to xev or similar to cat /dev/input on linux - g.SetManagerFunc(gocuiEvent) - - if err := defaultKeybindings(g); err != nil { - panic(err) - } - - if err := g.MainLoop(); err != nil && !errors.Is(err, gocui.ErrQuit) { - panic(err) - } -} - // Thanks to the gocui developers -- your package kicks ass // This function is called on every event. It is a callback function from the gocui package // which has an excellent implementation. While gocui handles things like text highlighting -- cgit v1.2.3