- Added the `WidthStyle` union to the Table Widget. This allows users to choose from 4 different options for Column Widths.
- Updated the Table Example with demos of the various styles (via comments).
- Implemented `TableContext.sel_rows`, allowing users to specify which rows have been 'selected' (similar to ctrl+clicking items in a GUI file browser).
- Changed previous 'selected' verbiage to 'active' in all cases.
- Added `loop.init()` to regain dynamic resizing. (Thanks @rockorager!)
- Used the TTY's Buffered Writer where applicable.
- Updated `win.initChild()` to `win.child()` in all cases.
- Improved ArenaAllocator usage.
Add a prettyPrint function which dumps the current screen to the tty,
not saving any state. This is useful for pretty printing text to stdout
in a streaming fashion
When drawing on the primary screen The internal state of the cursor
location was not being updated. This resulted in an invalid state and a
messed up screen
Fixes: https://github.com/rockorager/libvaxis/issues/63
AFAIK zig lacks a way of overriding module dependencies of dependencies.
LoopWithModules lets you use aio backend with vaxis using aio and coro
modules that are not included by vaxis, when this function is used
`include_aio` is not neccessary.
on macOS, `@alignOf(std.c.max_align_t)` is 8, while `@alignOf(i128)`
is 16. since we moved to using `std.time.Timer`, render duration
should always be an unsigned quantity.
this change is motivated by my seamstress project, which wants to use
a Vaxis struct (well, something with a Vaxis struct as a field) as a
Lua userdata. it turns out that Lua won't allocate at an alignment
greater than `@alignOf(std.c.max_align_t)` even if you ask it to.
If the text was printed with a wrap, and we can determine this from the
`print` method in Window, then we rely on the terminal for wrapping.
This can help with primary screen text reflowing on resize
Update to latest aio, which has minor changes such as the thread pool
argument and special aio.ReadTty operation.
In future the aio.ReadTty might have option to translate to vt escape
sequences, but for vaxis it will use the direct mode.
I was not really able to test the windows at all actually as wine did
not seem to play nice with any vaxis example, but it compiles and ...
runs?