Commit Graph
100 Commits
Author SHA1 Message Date
yves-biener 9b0dd3c52f doc: correct link to wiki
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 43s
2025-02-21 19:17:28 +01:00
yves-biener f45e722578 fix(linter): spelling error in README
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 57s
2025-02-21 19:15:19 +01:00
yves-biener 7b005ea4b1 add(examples/styles): text and color styling possiblities
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
This also contains some minor refactoring to improve the readability
and understandability of the library (i.e. renaming of Style.Attributes
to Style.Emphasis).
2025-02-21 19:13:11 +01:00
yves-biener c0c0590bb9 add(examples/styles): color palette to showcase all available colors to render (except for .default)
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
2025-02-21 16:43:03 +01:00
yves-biener 16724f6a52 add(example/elements): distinct different scrollable containers
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
2025-02-21 15:58:42 +01:00
yves-biener 44e92735cf ref(examples): avoid unnecessary casts
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 43s
2025-02-21 15:15:15 +01:00
yves-biener 8cc047c1fa fix(lint): spelling error in README
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 57s
2025-02-21 14:57:30 +01:00
yves-biener 8fbc958ca1 add(examples/elements): mouse clickable button
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
2025-02-21 14:50:29 +01:00
yves-biener b980703350 fix(container): border separator handling
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
Due to the assigning back the increased value for the used gap in case
the separator was active, every .resize `Event` would add more to the
gap, leading to ever smaller sub-container's and different sizes after
resizes. This has been fixed to have consistent layouting done by the
`Container` and `Border`.
2025-02-21 12:25:47 +01:00
yves-biener eb89f7f98b fix(renderer): reset color after each cell write
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 38s
2025-02-21 12:19:38 +01:00
yves-biener cc847b7035 add(examples/layout): mixed content with different layout options 2025-02-21 12:19:16 +01:00
yves-biener 9dc1a4b95a add(examples/layout): vertical, horizontal and grid
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 39s
2025-02-21 11:31:18 +01:00
yves-biener 69c1600eb9 mod(build): adjust name of enum values to be easier to type in command line
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
2025-02-20 23:54:53 +01:00
yves-biener c4639bf4bb add(example): input with simple text field
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m41s
2025-02-20 23:48:57 +01:00
yves-biener 07e932741c doc: update roadmap and further goals
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 43s
2025-02-20 18:56:56 +01:00
yves-biener e4ff240839 doc: update roadmap and contents for future documentation goals
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 44s
2025-02-20 11:49:30 +01:00
yves-biener 96375e3b72 mod(build): build configuration for examples
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
2025-02-20 11:16:42 +01:00
yves-biener 9322785ca0 mod: update zig version
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 43s
2025-02-19 22:55:03 +01:00
yves-biener cc831a5cdf fix(element/scrollable): render horizontal directed contents correctly
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
2025-02-19 22:23:32 +01:00
yves-biener 86b3e7d4ed feat(scrollable): make Container scrollable through Element Scrollable
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m35s
2025-02-19 20:32:26 +01:00
yves-biener f55d71a7cb mod(mouse): fix input.Mouse.in method
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
Pass through mouse events where they actually match the corresponding
`Container`. Adopt mouse event accordingly in `Scrollable` `Element`
trait when passing through the mouse event to the scrollable
`Container`.
2025-02-18 19:09:03 +01:00
yves-biener f66a870223 ref(input): move mouse.zig and key.zig into public input.zig namespace
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m41s
2025-02-18 18:24:09 +01:00
yves-biener e2f9408850 add(input): mouse support
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
2025-02-17 23:36:27 +01:00
yves-biener c2080ab40f ref(ctlseqs): use control sequence file; rename key names
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 46s
2025-02-17 23:08:47 +01:00
yves-biener a9f48bfb6a ref(key): make Key struct packed and rename constants
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 2m5s
2025-02-17 21:06:15 +01:00
yves-biener 7891af6c6f add(element/scrollable): implement content provider
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m49s
However this is only working for the same size as the parent container
(i.e. same `Size`). The `.resize` event for the `Container` of the
scrollable element needs to be the necessary and/or required size for
the contents (regardless of the screen viewport).
2025-02-17 19:58:25 +01:00
yves-biener 7b690d387b fix(lint): correct spelling errors
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
2025-02-16 16:01:04 +01:00
yves-biener 5c929479b2 add(main): main executable with zig build run support
Zig Project Action / Lint, Spell-check and test zig project (pull_request) Failing after 5m10s
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.
2025-02-16 15:35:50 +01:00
yves-biener d8a9e72b67 add(border): seperator line options with corresponding code points 2025-02-16 02:04:53 +01:00
yves-biener d951906b2b rem: Scroll from Propierties of Container
Updated the corresponding documentation and ideas for how to realize
scrollable contents.
2025-02-15 18:50:36 +01:00
yves-biener 01eb14f1bd doc: update Roadmap section of README 2025-02-15 16:03:06 +01:00
yves-biener 1041b0a955 mod: update zg dependency
`zg` now supports zig 0.14 dev which this library already uses.
2025-02-15 16:00:55 +01:00
yves-biener 4781e9ce39 add(element): interface for injecting user behavior to containers
Some additional refactoring and documentation updates have also been
applied.
2025-02-15 15:56:30 +01:00
yves-biener 5c148e1aa5 fix(cotainer/border): seperator placement without border's and gap 2025-02-15 11:25:20 +01:00
yves-biener a6aa6e5150 fix(container/border): correct location and rendering of separators between child elements 2025-02-15 11:10:37 +01:00
yves-biener 26d31a38de ref(container): use only one size for each container 2025-02-15 10:49:48 +01:00
yves-biener 01d121ef87 mod: update README and remove alignment options 2025-02-14 22:27:24 +01:00
yves-biener abaea968a6 rem(container): sizing options
This enables the `Layout` struct to be packed (as well as the
`Properties` struct) which should further reduce the memory footprint.
2025-02-14 22:19:20 +01:00
yves-biener 73a7f740c9 ref(container): move size: Size member from Scroll to Container 2025-02-14 22:03:21 +01:00
yves-biener c2a03e95c1 fix(container/layout): padding calculation for anchor corrections 2025-02-14 21:59:10 +01:00
yves-biener 8998afd9d6 mod(): 2025-02-14 21:49:30 +01:00
yves-biener 4cda202873 fix(renderer): integer overflows 2025-02-14 20:57:48 +01:00
yves-biener bbe6f4741e WIP: use viewport to allow sizes of scroll to extend further than renderable screen 2025-02-12 22:33:03 +01:00
yves-biener 98031dbd1a add(container/layout): sizing option percentage 2025-02-09 13:41:23 +01:00
yves-biener ef950809a6 add(container/layout): sizing:fixed option 2025-02-09 12:59:55 +01:00
yves-biener c72d76470a mod(container/border): change default configuration 2025-02-08 13:52:01 +01:00
yves-biener 29ae75adf5 add(layout/padding): layout configuration for padding
With minor code layout fixes
2025-02-08 13:11:27 +01:00
yves-biener d326deac97 add(container/rectangle): add content creation 2025-02-07 17:43:16 +01:00
yves-biener 11531e9d4a mod: remove min_size argument from App.start 2025-02-06 22:19:27 +01:00
yves-biener 8586a05508 mod: fix rendering resizing; layout placement of child elements for vertical and horizontal directions
Work in progress for separator configuration of border properties
2025-02-06 20:10:22 +01:00
yves-biener 009d2129b6 mod(container/layout): support gap configuration 2025-02-04 19:06:09 +01:00
yves-biener 9c06ced658 mod(style): styling and color revamp now with fewer characters to print to the terminal 2025-02-04 17:51:28 +01:00
yves-biener 2bfacc0e98 WIP: container rendering for borders + container element rendering 2025-02-03 19:55:33 +01:00
yves-biener 0bf79dc236 mod(container): support layout direction handling for child elements 2025-02-01 11:31:05 +01:00
yves-biener 1293cb065d WIP: add Container type with corresponding Properties configuration
The configuration of the `Container` types is very much inspired by
[clay](https://github.com/nicbarker/clay).
2025-02-01 01:05:56 +01:00
yves-biener bdbe05c996 mod(structure): update project structure
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.
2025-01-30 23:02:34 +01:00
yves-biener 3decc541a9 mod(renderer): initial version of double buffer intermediate renderer
This branch will implement the necessary changes for the widgets and
their implementations to use the new renderer correctly.
2025-01-30 20:53:01 +01:00
yves-biener c83ceff925 fix(typo): correct function name
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m40s
2025-01-30 16:28:36 +01:00
yves-biener 1ea410354f fix(View): correct typo
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 51s
2025-01-15 11:02:32 +01:00
yves-biener e9be9a1c35 add(View): enable and disable interface functions
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 38s
2025-01-15 11:00:11 +01:00
yves-biener f4a01f227e fix: renderer default size value and example usage
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 41s
2025-01-14 17:17:24 +01:00
yves-biener 2efbb5feb1 mod(renderer): store absolut screen size for view change to report current screen size accordingly
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m21s
2025-01-14 17:08:19 +01:00
yves-biener 3048b59e84 add(view): View type for composing view modules
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 22s
2025-01-14 01:14:55 +01:00
yves-biener 817056cf8b fix(style): apply merging only if it differs from the default values
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 42s
2025-01-07 13:08:13 +01:00
yves-biener 0015bac9ff add(style): merge function to merge styles from different styles together
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m43s
Merging may overwrite changes of the current style with the other style
if that style differs from the default value.
2025-01-07 12:56:52 +01:00
yves-biener c2c3f41ff3 mod(memory): do not create items on the stack instead using the provided allocator
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 4m26s
2025-01-06 21:56:04 +01:00
yves-biener 04e1ca087f dep: bump zg dependency
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 51s
2024-12-27 12:04:04 +01:00
yves-biener 2ef59ca9ea add(widget/Input): widget for user inputs
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 1m22s
Accepts optional label and placeholders which are rendered accordingly.
The widget only is interactable if it is active. Hence it needs further
control from the outside scope where it is used (likely a corresponding
layout). This also applies to the inputed value, which needs to be
received from the within the owning layout to be used for further
processing (i.e. in custom user events, etc.).
2024-12-27 11:34:51 +01:00
yves-biener 3a989321fc feat(event): add focus in/out event to SystemEvents
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 3m54s
feat(app): add minimal size argument for App.start

Read more corresponding inputs from stdin and convert them correctly
(i.e. in band window resizing), further keys (arrow keys, F-keys, etc.).
Respect the provided minimal size for the application which posts an
error message in case the size is smaller than the requested minimal
size.
2024-12-25 12:53:39 +01:00
yves-biener f7cd61d619 mod: reduce the amount of unnecessary re-renderings
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m8s
2024-12-08 21:38:19 +01:00
yves-biener 3947c2b5af mod: make terminal.zig public
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m33s
2024-12-05 18:59:42 +01:00
yves-biener bbb360e417 fix(renderer): avoid inter overflow when rendering multiline strings
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 2m10s
2024-12-03 17:43:06 +01:00
yves-biener 05277a226a fix: do not use @divExact as the exact division cannot be garantueed from the caller
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m41s
2024-11-27 15:10:39 +01:00
yves-biener 8d68945100 add(widget/List): initial list widget; used in tabs.zig example
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m34s
2024-11-23 22:41:42 +01:00
yves-biener c0c7b9f925 add(layout/tab): Tab layout implementation
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 9m46s
2024-11-21 23:27:00 +01:00
yves-biener 6cd78d0418 fix: release mode undefined usage (for optionals); bump to 0.14.dev
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 54s
2024-11-19 23:27:12 +01:00
yves-biener f4adf53067 doc: removed unnecessary comment
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 32s
2024-11-16 19:08:50 +01:00
yves-biener 4ef9e077cb mod(dispatch): use anyopague instead of usize for pointer handling
Zig Project Action / Lint, Spell-check and test zig project (push) Has been cancelled
2024-11-16 19:08:22 +01:00
yves-biener 7c9038fbda mod(widget/Text): add alignment options for Text Widget
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 36s
Updated exec example which uses centered text.
2024-11-16 18:12:24 +01:00
yves-biener aeac4bdc83 add(examples): split main.zig into examples which can be executed and reviewed independently
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 50s
2024-11-15 21:02:44 +01:00
yves-biener 58982a53f2 add(widget): Text widget to display static Cell contents 2024-11-15 21:01:50 +01:00
yves-biener 273da37020 add(layout): HContainer and VContainer for arbritrary sized H/V Element placement 2024-11-15 20:37:55 +01:00
yves-biener 0cc0ed10d2 cleanup of obsolete comments and dead code
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 35s
This removes the App.Renderer.Buffered, which was not improving on the
direct renderer, which has a simpler implementation and was keept for
this regard.
2024-11-13 19:14:13 +01:00
yves-biener 5908d6d5e3 fix(lint): correct typo and rename Marging to Margin
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 32s
2024-11-13 19:06:11 +01:00
yves-biener 9bf146257a add: MIT-LICENSE with README updates
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 32s
2024-11-13 19:01:53 +01:00
yves-biener bc1bc757d4 add(layout/Marging): relative margins for Elements
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 32s
2024-11-13 18:09:54 +01:00
yves-biener 61f6c72bf8 mod(layout/Stacks): add comptime checks for correct Element union typing
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 34s
2024-11-13 16:49:38 +01:00
yves-biener 1e59a7c593 add(Layout/Padding): clear only when necessary
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 36s
2024-11-13 16:10:25 +01:00
yves-biener 270ca9b1be mod(renderer): dynamic clear of size for widgets to improve render performance
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 35s
2024-11-13 15:07:26 +01:00
yves-biener 80459a51b1 doc: update layout and widget interface documentation
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 34s
2024-11-12 23:41:14 +01:00
yves-biener 28817d468a add(zig-interface): dependency to check interface contracts at comptime
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 53s
The described interfaces for `Widget` and `Layout` are now defined and
correspondingly checked at comptime.
2024-11-12 23:13:35 +01:00
yves-biener 07e4819ecd feat(renderer): render cells instead of raw u8 array contents
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 39s
2024-11-12 19:14:19 +01:00
yves-biener 510bf7d885 fix(typos)
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 33s
2024-11-11 17:03:04 +01:00
yves-biener ed5873de63 feat(Renderer): update interface functions to start supporting buffered rendering
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 30s
2024-11-11 17:01:59 +01:00
yves-biener d2d655c829 mod: change interface for rendering of Layouts and Widgets to use a non-const pointer to the renderer instead
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 38s
2024-11-11 13:47:01 +01:00
yves-biener 8b3f863404 mod(app): automatically hide cursor when running fullscreen tui's
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 37s
2024-11-11 13:32:39 +01:00
yves-biener 1544a4d2ff mod(main): adapt example to showcase configuration of Layout.Padding and Layout.Framing
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 37s
2024-11-11 12:30:56 +01:00
yves-biener 430f2866e8 feat(Padding): user configuration for custom padding 2024-11-11 12:30:34 +01:00
yves-biener 1605cd78dc feat(Framing): border, style, title with styling 2024-11-11 12:29:53 +01:00
yves-biener 53fc34ba69 mod(terminal): add writer interface implementation 2024-11-11 12:29:33 +01:00