Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to tcell #45

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.swp
vendor
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ A community fork based on the amazing work of [jroimartin](https://github.com/jr

This fork has many improvements over the original work from [jroimartin](https://github.com/jroimartin/gocui).

* Build on tcell instaid of go-termbox
* Better wide character support
* Support for 1 Line height views
* Better support for running in docker container
* Customize frame colors
* Improved code comments and quality
* Many small improvements
* Change Visibility of views
* Many other small improvements

For information about this org see: [awesome-gocui/about](https://github.com/awesome-gocui/about).

Expand Down Expand Up @@ -68,15 +69,15 @@ import (
)

func main() {
g, err := gocui.NewGui(gocui.OutputNormal, false)
g, err := gocui.NewGui(false)
if err != nil {
log.Panicln(err)
}
defer g.Close()

g.SetManagerFunc(layout)

if err := g.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil {
if err := g.SetKeybinding("", tcell.KeyCtrlC, tcell.ModNone, quit); err != nil {
log.Panicln(err)
}

Expand Down
7 changes: 4 additions & 3 deletions _examples/active.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"log"

"github.com/awesome-gocui/gocui"
"github.com/gdamore/tcell"
)

var (
Expand Down Expand Up @@ -94,7 +95,7 @@ func quit(g *gocui.Gui, v *gocui.View) error {
}

func main() {
g, err := gocui.NewGui(gocui.OutputNormal, true)
g, err := gocui.NewGui(true)
if err != nil {
log.Panicln(err)
}
Expand All @@ -106,10 +107,10 @@ func main() {

g.SetManagerFunc(layout)

if err := g.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil {
if err := g.SetKeybinding("", tcell.KeyCtrlC, tcell.ModNone, quit); err != nil {
log.Panicln(err)
}
if err := g.SetKeybinding("", gocui.KeyTab, gocui.ModNone, nextView); err != nil {
if err := g.SetKeybinding("", tcell.KeyTab, tcell.ModNone, nextView); err != nil {
log.Panicln(err)
}

Expand Down
6 changes: 3 additions & 3 deletions _examples/bufs.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func layout(g *gocui.Gui) error {
}

func main() {
g, err := gocui.NewGui(gocui.OutputNormal, true)
g, err := gocui.NewGui(true)
if err != nil {
log.Panicln(err)
}
Expand All @@ -52,10 +52,10 @@ func main() {

g.SetManagerFunc(layout)

if err := g.SetKeybinding("main", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil {
if err := g.SetKeybinding("main", tcell.KeyCtrlC, tcell.ModNone, quit); err != nil {
log.Panicln(err)
}
if err := g.SetKeybinding("main", gocui.KeyCtrlI, gocui.ModNone, overwrite); err != nil {
if err := g.SetKeybinding("main", gocui.KeyCtrlI, tcell.ModNone, overwrite); err != nil {
log.Panicln(err)
}

Expand Down
5 changes: 3 additions & 2 deletions _examples/colors.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ import (
"log"

"github.com/awesome-gocui/gocui"
"github.com/gdamore/tcell"
)

func main() {
g, err := gocui.NewGui(gocui.OutputNormal, true)
g, err := gocui.NewGui(true)
if err != nil {
log.Panicln(err)
}
defer g.Close()

g.SetManagerFunc(layout)

if err := g.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil {
if err := g.SetKeybinding("", tcell.KeyCtrlC, tcell.ModNone, quit); err != nil {
log.Panicln(err)
}

Expand Down
5 changes: 3 additions & 2 deletions _examples/colors256.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import (
"log"

"github.com/awesome-gocui/gocui"
"github.com/gdamore/tcell"
)

func main() {
g, err := gocui.NewGui(gocui.Output256, true)
g, err := gocui.NewGui(true)

if err != nil {
log.Panicln(err)
Expand All @@ -21,7 +22,7 @@ func main() {

g.SetManagerFunc(layout)

if err := g.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, quit); err != nil {
if err := g.SetKeybinding("", tcell.KeyCtrlC, tcell.ModNone, quit); err != nil {
log.Panicln(err)
}

Expand Down
Loading