![]() ![]() The code includes some syscall_*.go files, indicating that termbox-go runs on Linux, macOS, Windows, OpenBSD, NetBSD, FreeBSD, and Dragonfly BSD. The README makes no claims about supported platforms. All input, whether keyboard, mouse, or resize events, is tracked through a unified Event type.Īs simple as the API might seem, it has not prevented others from creating interesting projects on top of termbox, including higher-level TUI libraries ( termui, gocui, tui-go and `termloop``), simple games, It uses a two-dimensional cell buffer to represent the terminal screen, with a few methods like setting cells, clearing the screen, or setting the cursor. If you are fine with building your UI on top of a handful of UI primitives, there are two libraries that look fairly stable and complete: nsf/termbox-goĪPI. This /r/golang thread, clui and wm would perhaps have slipped through.Īnd then, of course, the above list of criteria is a very fuzzy filter, and you might have included a library that I ruled out because of this list.īut now let’s move on to the TUI library overview. ![]() Without the tips of a couple of redditors in I used, ,, and to find TUI libraries but still there is no guarantee that I found all relevant projects out there. However, if you can forego some of the requirements, there is indeed a small selection of capable TUI libraries at your disposal that I’ll briefly introduce below. Well, not if you really want all those nifty UI features at once. So that’s it? No single all-in-one, high-level GUI lib with decent documentation? Turned out that none of the libraries I found passes all of the requirements. I wanted at least a simple how-to-start tutorial that covers the basics.) have reasonable documentation or sample code.be active projects (that is, the last commit should not date back to months or even years ago),.provide high-level abstractions (as opposed to only providing low-level UI primitives),.be fairly complete TUI libraries, supporting flexible layouts, standard UI widgets like buttons, menus, text entry, text output, mouse support, etc. ![]() I had a few requirements on the libraries: They should. Originally, I planned to evaluate three to four TUI libraries for Go side-by-side, using a sample app definition with a specific set of features to be tested. OK, so can we do a side-by-side test, please? They bring panes, input, output, mouse support, graphics, and audio, to your terminal. Text-Based User Interface libraries (or TUI libraries) meet this need. And that’s ok in most cases, though sometimes it would be great to have a visual user interface but without the code size and complexity of a full-blown Web app. Console applications usually take some parameters at start, and maybe some more input through basic console I/O. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |