diff options
| author | Jeff Carr <[email protected]> | 2024-02-01 21:47:31 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-01 21:47:31 -0600 |
| commit | dddef229dcab1cd2c5ab7101dc5a4781478c0a62 (patch) | |
| tree | 1c3944f04f323214f17ab716196a7edd65834308 /gocui.go | |
| parent | 13b0daed7cb950c1244a8e6e42523813178d4c7d (diff) | |
dropdown & combobox's pop upv0.19.1
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gocui.go')
| -rw-r--r-- | gocui.go | 29 |
1 files changed, 0 insertions, 29 deletions
@@ -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 |
