Commit graph

6 commits

Author SHA1 Message Date
Jari Vetoniemi
f25b8ab421 widgets: add ScrollView widget
The ScrollView widget can be used to introduce scrollable elements into
existing widgets.

To use the ScrollView, you must use the ScrollView's writeCell and
readCell functions rather than the ones from Window.
2024-05-31 18:21:54 -05:00
00JCIV00
8d842c8b44 Added some various integer overflow protections 2024-05-12 20:25:51 -05:00
Tim Culverhouse
920e490e4c widgets: add Scrollbar widget 2024-05-06 18:54:35 -05:00
Tim Culverhouse
606272f471 widgets: add initial nvim implementation 2024-04-16 16:06:14 -08:00
00JCIV00
923c81d7d2 widgets: added table widget
- Added `Table.zig` under the `src/widgets` directory and `widgets.zig` module.
- Created the `drawTable()` function to draw a Table to the provided parent Window based on the provided ArrayList.
- Created the `TableContext` struct to manage state and attributes for the `drawTable()` function.
2024-02-26 19:21:12 -06:00
Jora Troosh
4a463cfa3a
refactor: make code more idiomatic
- Added standard .gitattributes file for Zig projects.
- Reworked build.zig a little, hopefully it's a bit clearer. Also, now zig build will run all steps.
- outer: while in examples was redundant since there's only one loop to break from. switch expressions don't allow breaking from them, so breaking is only for loops, i.e. while and for.
- When returning a struct instance from a function, the compiler infers the return type from function signature, so instead of return MyType{...}; , it's more idiomatic to write return .{...};.
- Logging adds a new line by default, so you don't usually need to write \n like here: log.debug("event: {}\r\n", .{event});.
2024-02-11 12:59:33 -06:00