Commit graph

20 commits

Author SHA1 Message Date
2714deeafb Add support for setting window title 2024-01-05 13:33:08 +01:00
4ffaae067e Export all types at top level 2023-02-16 09:37:31 +01:00
06aefd562b Remove wrap method from Frame 2022-09-26 17:34:38 +02:00
6ed47ad916 Rename WidthDB to WidthDb 2022-09-26 17:01:49 +02:00
f258c84094 Expose Widthdb directly via Frame 2022-09-26 17:00:46 +02:00
24fd0050fb Fix drawing widgets on cursor not removing cursor 2022-09-08 18:13:13 +02:00
31bb2de87b Make WidthDB tab-width-aware 2022-08-04 02:18:18 +02:00
26a8936cf5 Store Styled with contiguous string
The previous implementation of Styled used chunks that consisted of a
String and a ContentStyle. The current implementation instead stores a
single String and chunks consisting of a ContentStyle and an ending
index.

This implementation may reduce allocations and makes width-related
operations easier, for example getting the width of a Styled with its
whitespace trimmed.
2022-08-01 19:02:57 +02:00
464aefa6d7 Forbid stack frames from expanding the drawable area 2022-08-01 00:06:36 +02:00
c1907bb8ee Fix frame cursor functions ignoring stack 2022-07-23 22:24:28 +02:00
14aedaf252 Add stack of drawable areas
This lets the user restrict the drawable area to a sub-area of the
buffer. This lets the user draw without caring about the absolute
position, and guarantees that no glyphs or glyph parts appear outside of
the drawable area.
2022-07-13 11:19:19 +02:00
e4e1454e80 Calculate width of Styleds directly 2022-07-12 10:22:30 +02:00
d693712dab Expose tab width calculation 2022-07-07 16:21:05 +02:00
11b2211fad Improve word wrapping
Now supports long trailing whitespace as well as tabs.
2022-07-04 19:38:28 +02:00
9b0d80873f Use styled chunks of text instead of plain strings 2022-07-04 19:38:28 +02:00
37634139b0 Wrap text in a unicode-aware way 2022-05-29 13:18:39 +02:00
3b2ea37ba5 Get individual grapheme's width 2022-05-29 13:18:25 +02:00
833defd1ce Document WidthDB 2022-05-29 13:18:25 +02:00
9512ddaa3b Measure actual width of displayed characters 2022-05-29 13:18:25 +02:00
add2f25aba Use Frame for rendering instead of Buffer 2022-05-21 22:33:39 +02:00