Commit Graph

28 Commits

Author SHA1 Message Date
yves-biener 7595e3b5bb feat(element/input): text input element implementation
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 14s
Moved implementation from example/input as a standalone `Element`
implementation, which is directly used by the example instead.

The provided argument is the `App.Event`'s event that should be
triggered on acceptance for the contents of the Input `Element`.
Currently only `[]u21` strings are supported, but in the future also
`[]u8` strings shall be supported and automatically converted when
pushed as an `App.Event` into the app's queue.
2025-06-29 11:19:09 +02:00
yves-biener 439520d4fe mod(example/input): ellipse rendering with scrolling for text field contents
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 17s
2025-06-28 22:09:36 +02:00
yves-biener ded1f2c17e mod(example/input): reorder input handling cases; add alt-b/f binding implementations 2025-06-28 22:08:19 +02:00
yves-biener 92ae8c9681 feat(example/input): readline shortcuts; better navigation;
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 58s
This will be the basis for a Textfield `Element` implementation to make
it easier to add user inputs into the container structures.
2025-06-28 13:04:00 +02:00
yves-biener 825fb63bc8 ref: rename gpa usages to the aliased DebugAllocator 2025-06-11 20:31:41 +02:00
yves-biener 9a818117d7 feat(panic): panic handler to recover termios when crashing 2025-05-30 23:00:45 +02:00
yves-biener 5ba5b2b372 feat(element/alignment): alignment Element implementation
You can now align a `Container` using the Alignment `Element` similar to
how you make a `Container` scrollable. For usage details please see the
example and the corresponding tests.
2025-05-28 14:42:02 +02:00
yves-biener 80a36a9947 refactor: zigify imports and usages 2025-05-26 14:23:18 +02:00
yves-biener ba25e6056c feat(element/scrollable): scrollbar rendering
Configuration to enable scrollbar rendering for scrollable `Element`s.
Currently only the fg `Color` of the scrollbar can be configured while
the background uses the same fg `Color` but adds the emphasis `.dim` to
make it obvious what the is the actual scrollbar. In the future it might
be necessary to provide the user with more options to configure the
representation of the scrollbar.

Tests have been added to test the scrollbar rendering and placement
accordingly.
2025-05-21 18:20:52 +02:00
yves-biener aa4adf20f9 refactor: zigify imports and correct minor mistakes 2025-05-20 18:23:44 +02:00
yves-biener a4293ff243 add(event): mouse event has relative position for receiving elements
Zig Project Action / Lint, Spell-check and test zig project (push) Has been cancelled
2025-04-20 20:53:46 +02:00
yves-biener 962a384ecf add(Scrollable): init function with corresponding usages
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 42s
2025-03-29 21:21:23 +01:00
yves-biener 54af974c2b mod(container): make reposition public and split from resize
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m3s
2025-03-13 19:48:31 +01:00
yves-biener dddc09b4ce mod(container/element): remove origin: Point argument from Element.content function
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m12s
Renamed `Container.contents` to `Container.content` to be in line with
the corresponding `Element` function name. This has also been done for
the properties structs used by the `Container`.
2025-03-11 07:52:35 +01:00
yves-biener e3551fa624 add(sizing): grow configuration
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m14s
Currently the 'grid' and 'mixed' examples are not working yet.
2025-03-05 22:53:28 +01:00
yves-biener 466e00c16c fix(element/scrollable): support deriving Container size of scrollable
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 13s
2025-03-04 21:54:07 +01:00
yves-biener fc72cf4abb ref(container): split size and position calculations
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 34s
2025-03-04 19:53:28 +01:00
yves-biener ec22e68e8c ref(event): remove .resize and replace with recursize method calls
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 40s
This also means that currently the dynamic resizing through the app's
detached thread is not working, as it cannot send size updates. The
examples have been overhauled to still implement intermediate mode
applications accordingly.
2025-03-04 14:52:19 +01:00
yves-biener 591b990087 ref(event): split Size into two Points (one for the size and one for the anchor / origin)
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 39s
2025-03-04 00:04:56 +01:00
yves-biener 91ac6241f4 doc: correct TODO, NOTE and FIX comment statements
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 48s
2025-03-03 21:49:11 +01:00
yves-biener caee008d50 test: streamline examples with quit texts
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 24s
Improve some examples to provide visual feedback, i.e. for the button
exmample, with fixes to make them compilable with the `Scrollable`
element changes.
2025-03-01 17:12:28 +01:00
yves-biener 3b6848f845 fix(container): rendering scrollable elements with separators
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 23s
Added corresponding test cases to test the corresponding rendering of
scrollable elements.
2025-02-27 17:02:16 +01:00
yves-biener ca14bc6106 fix(container): positioning; move separator options to layout struct
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 22s
Added corresponding test cases for padding, borders and corresponding
seperators.
2025-02-26 18:21:55 +01:00
yves-biener 6ccab74c94 add(examples/demo): application to showcase a more complex application
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 53s
Further improvements for example applications; Demo example is now
default build target (when not providing example configuration).
2025-02-21 22:57:14 +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 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 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