CodeView widget allows viewing code in a more visually pleasing manner.
It combines LineNumbers widget to provide line numbers on the side.
The CodeView widget allows you to optionally highlight a specific line
and show indentation guidelines.
It is not intended to be a fully fledged editor, but rather for showing
code snippets to a user.
While it is not a fully fledged editor, this widget's code can give you
a good starting point.
The TextView widget provides a simple way to show text content in
a scrollable window.
This implementation does not offer automatic line wrapping for now.
Text content is backed by the Buffer struct. The buffer can be styled
for visually appealing and colorful content, for example to provide
a syntax highlighting.
The buffer provides a writer() interface which allows providing content
from a stream, such as logging.
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.
- 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.
- 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});.