intermediate #1

Merged
yves-biener merged 31 commits from intermediate into main 2025-02-16 16:02:59 +01:00
Owner

This PR refactors most of the existing codes (fewer examples, and not all features) with a fundamental better system to enable the same (if not even more and easier to implement) features. The construction of the layouts has been simplified, there are no more indirections for the layout elements and there is no difference between layout and widgets, instead everything is a Container which describes an Element and can contain sub-containers. Each Container is responsible for the position and sizing of the individual elements. While the Element interfaces allow for custom contents and user defined behavior through the event loop (or even outside of the event loop).

This PR refactors most of the existing codes (fewer examples, and not all features) with a fundamental better system to enable the same (if not even more and easier to implement) features. The construction of the layouts has been simplified, there are no more indirections for the layout elements and there is no difference between layout and widgets, instead everything is a `Container` which describes an `Element` and can contain sub-containers. Each `Container` is responsible for the position and sizing of the individual elements. While the `Element` interfaces allow for custom contents and user defined behavior through the event loop (or even outside of the event loop).
yves-biener added 30 commits 2025-02-16 15:41:19 +01:00
This branch will implement the necessary changes for the widgets and
their implementations to use the new renderer correctly.
Remove examples, add description for design goals in README.md and
apply re-names and naming changes accordingly for the project structure.
Implement a flat hierachry, as the library shall remain pretty simple.
The configuration of the `Container` types is very much inspired by
[clay](https://github.com/nicbarker/clay).
Work in progress for separator configuration of border properties
With minor code layout fixes
This enables the `Layout` struct to be packed (as well as the
`Properties` struct) which should further reduce the memory footprint.
Some additional refactoring and documentation updates have also been
applied.
`zg` now supports zig 0.14 dev which this library already uses.
Updated the corresponding documentation and ideas for how to realize
scrollable contents.
add(main): main executable with zig build run support
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (pull_request) Failing after 5m10s
5c929479b2
The main executable contains a simple `Element` implementation example
showing how interaction through and outside of the event loop can be
implemented to impact the rendered contents.
yves-biener added 1 commit 2025-02-16 16:01:22 +01:00
fix(lint): correct spelling errors
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (pull_request) Successful in 1m9s
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 42s
7b690d387b
yves-biener merged commit 7b690d387b into main 2025-02-16 16:02:59 +01:00
yves-biener deleted branch intermediate 2025-02-16 16:02:59 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yves-biener/zterm#1