00JCIV00
eaa9c1580a
widgets(table): fixed an issue w/ active row contents causing the last few rows to disappear
2024-09-12 21:07:41 -05:00
00JCIV00
2580a8fc12
widgets(table): improved type and bounds checks
...
- Improved the Type checks for MultiArrayList child Types.
- Improved the bounds checking for printing rows.
2024-09-12 21:07:41 -05:00
00JCIV00
a17c4af217
widgets(table): implemented customizable x offset for cells/items
...
- Added `cell_x_off` to the `TableContext` to allow changing the X Offset of Cells/Items as they're printed to their rows.
2024-09-12 21:07:41 -05:00
00JCIV00
dbeef72630
widgets(table): implemented customizable foreground colors
...
- Added `active_fg` and `selected_fg` to allow changing the Foreground Color of Active and Selected rows (and Headers) respectively.
2024-09-12 21:07:41 -05:00
Tim Culverhouse
235e0bb27b
vaxis: attempt to reset cursor shape
...
Attempt to reset the cursor shape on exit, if the shape has been
changed. This won't work on every terminal, however some implement
`\x1b[0 q` as setting the shape to the "default" value, others implement
it as a blinking block.
Fixes : #77
2024-09-10 09:22:42 -05:00
Tim Culverhouse
8263b1e35c
widgets(terminal): change pts log to debug
...
Change an error log of the pts name to be a debug level.
2024-09-05 06:24:24 -05:00
Tim Culverhouse
fa485c740c
quirks: set legacy sgr for TERM_PROGRAM=vscode
2024-09-04 04:19:57 -05:00
Tim Culverhouse
e1e3c61cdf
osc7: use std.Uri for percent encoding
2024-08-30 06:47:57 -05:00
CJ van den Berg
7dde40d346
fix(windows): don't use getenv("HOSTNAME") on windows
2024-08-30 06:47:57 -05:00
CJ van den Berg
e4655a4ab4
feat: add setTerminalWorkingDirectory (OSC7)
2024-08-30 06:47:57 -05:00
Tim Culverhouse
fcdeb321fe
zig fmt
2024-08-15 19:38:14 -05:00
00JCIV00
500488f728
widgets(table): implemented more header and column options
...
- Added the `HeaderNames` Type and `header_names` field to `TableContext` to let users choose between automatically getting header names from fields or setting custom names.
- Removed the `headers` parameter from `drawTable()`.
- Added the `ColumnIndexes` Type and `col_indexes` field to `TableContext` to let users choose which columns/fields they actually want to display.
2024-08-15 19:37:16 -05:00
00JCIV00
d1b4e3f010
widgets(table): added support f/ enums and slices of strings
...
- Added proper printing f/ Enums and Slices of Strings into Table cells.
2024-08-15 19:37:16 -05:00
Tim Culverhouse
26072bd85e
main: fix test import
2024-08-13 07:45:39 -05:00
Tim Culverhouse
327c2ace82
zig fmt
2024-08-13 07:42:14 -05:00
Tim Culverhouse
54e15764c4
example(table): fix text_input api
2024-08-13 07:42:14 -05:00
00JCIV00
81387ff242
git(fixes): fixed small issue with git rebase
...
- Reimplemented `col_width` in the Table Widget.
- Readded `*.sw?` to gitignore.
2024-08-13 07:42:14 -05:00
00JCIV00
ca6a67f689
window(fill) bounds check for start and end positions in both conditions
2024-08-13 07:42:14 -05:00
00JCIV00
999b0f4f00
widgets(table): implemented optional active row contents callback & context
...
- Added `active_content_fn` as an optional callback function that can be provided to `TableContext` to vertically expand the active row with additional info.
- Added `active_ctx` and `active_y_off` to support the `active_content_fn`.
- Updated the Table Widget example with
2024-08-13 07:42:14 -05:00
00JCIV00
a99fd3c29f
widgets(table): implemented customizable column widths
...
- Added the `WidthStyle` union to the Table Widget. This allows users to choose from 4 different options for Column Widths.
- Updated the Table Example with demos of the various styles (via comments).
2024-08-13 07:42:14 -05:00
00JCIV00
bbbfbaffbb
widgets(table): implemented selectable rows
...
- Implemented `TableContext.sel_rows`, allowing users to specify which rows have been 'selected' (similar to ctrl+clicking items in a GUI file browser).
- Changed previous 'selected' verbiage to 'active' in all cases.
2024-08-13 07:42:14 -05:00
00JCIV00
5972da8ee3
examples(table): updated the table example w/ latest vaxis changes
...
- Added `loop.init()` to regain dynamic resizing. (Thanks @rockorager!)
- Used the TTY's Buffered Writer where applicable.
- Updated `win.initChild()` to `win.child()` in all cases.
- Improved ArenaAllocator usage.
2024-08-13 07:42:14 -05:00
00JCIV00
9487916406
widgets(table): add support for Slices and MultiArrayLists
...
- Updated the Table Widget to support Slices and MultiArrayLists (in addtion to ArrayLists) for the `data_list` parameter of `drawTable()`.
2024-08-13 07:42:14 -05:00
Tim Culverhouse
707c050a76
widgets(text_input): add realLength fn
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-08-12 21:18:12 -05:00
Tim Culverhouse
453203553e
widgets(text_input): expose api
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-08-12 21:10:45 -05:00
Tim Culverhouse
62ccf824cf
widgets(text_input): impl word motion and deletes
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-08-12 21:07:09 -05:00
Tim Culverhouse
4fbbebbf0c
widgets(text_input): use internal GapBuffer impl
...
Use a tiny GapBuffer implementation internal to the library.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-08-12 20:19:23 -05:00
CJ van den Berg
7190fde166
feat: add functions to set the default terminal background/foreground
...
And reset to default on cleanup.
2024-08-12 17:25:40 -05:00
Tim Culverhouse
a8baf9ce37
feat: add prettyPrint
...
Add a prettyPrint function which dumps the current screen to the tty,
not saving any state. This is useful for pretty printing text to stdout
in a streaming fashion
2024-08-06 12:10:03 -05:00
Tim Culverhouse
22516a971c
image: reverse order of transmitLocalImagePath args
...
Width *then* height
2024-08-05 10:16:52 -05:00
Tim Culverhouse
0064229635
image: implement local filesystem transmission
...
Implement transmission over a local filesystem, by file, temp file, or
shared mem.
2024-08-05 07:58:04 -05:00
Tim Culverhouse
ec09912fa8
window(fill): bounds check end condition for fill
...
Fixes #65
2024-08-02 07:30:02 -05:00
glyh
9cbcc92b4c
fix memleak with transmitted image
2024-08-01 21:17:23 -05:00
Tim Culverhouse
2f46eb9172
examples(table): add intrusive init on Loop
2024-07-30 18:24:37 -05:00
Tristan Partin
e44c578649
Add home and end keybinds for the TextInput widget
...
readline accepts these an analogs for ctrl+z and ctrl+e.
Signed-off-by: Tristan Partin <tristan@partin.io>
2024-07-30 14:03:09 -05:00
Tim Culverhouse
138604313e
update readme
2024-07-30 13:53:13 -05:00
Tim Culverhouse
d36ab043ca
render: reset osc8 link on reposition
...
Reset the link state on reposition so we properly write a new OSC8 tag
2024-07-29 19:09:31 -05:00
CJ van den Berg
5b7f2c3d5d
fix: panic invalid enum value on left or right scroll
2024-07-28 15:49:43 -05:00
Tim Culverhouse
f0eaa3c831
resize: properly handle state reset on primary screen
...
When drawing on the primary screen The internal state of the cursor
location was not being updated. This resulted in an invalid state and a
messed up screen
Fixes: https://github.com/rockorager/libvaxis/issues/63
2024-07-21 21:17:00 -05:00
Tim Culverhouse
81a6b373a0
image: add transmitPreEncodedImage method
...
Add a method that allows users of the library to pre-encode an image
using whichever base64 encoder they want (ie a simd encoder).
2024-07-20 15:51:03 -05:00
Tim Culverhouse
22fab6f38b
image: fix image scaling s/win.height/win.width
2024-07-20 14:03:24 -05:00
InKryption
53374f4f09
Remove incorrect pointer capture
2024-07-20 09:49:14 -05:00
Tim Culverhouse
2882264fa3
image: fix transmission of rgb and rgba
...
We must send image dimensions for these particular formats
2024-07-19 14:20:09 -05:00
Tim Culverhouse
9f8ef6270b
re-export zigimg
2024-07-19 13:43:11 -05:00
Tim Culverhouse
2b5b58b255
image: allow transmitting zigimg Images directly
...
And with other transmission formats
2024-07-19 13:34:49 -05:00
Tim Culverhouse
20bbb25727
loop: null event continues inner loop
2024-07-19 11:44:09 -05:00
Tim Culverhouse
0e06467a61
mouse: don't translateMouse if we have 0 sized screen
2024-07-19 09:48:39 -05:00
Tim Culverhouse
1b9fcb1fa2
readme: add starter repo
2024-07-19 09:12:45 -05:00
Tim Culverhouse
c3ba0bbb16
loop: fix another loop continuuation
2024-07-19 07:43:44 -05:00
Tim Culverhouse
37941e59f5
loop: continue read_loop on null event
2024-07-19 07:41:14 -05:00