Hojjat
b253800383
Add Padding to the TextBox ( #36 )
...
* WIP: initial text-margin support
* Fix the selection issue when clicking the margins
* Move the margin size into the main
* using padding, consistent with iced text_input
* Added top and bottom margin
* bugfix: selection starting from the top margin works
* bugfix: left half of first glyph was being ignored
2022-11-10 11:55:12 -07:00
Jeremy Soller
bbe7d77b7b
Improvements to syntax editor, integrate with libcosmic editor
2022-11-09 10:44:51 -07:00
Jeremy Soller
268805ba0c
no_std support
2022-11-08 13:24:14 -07:00
Hojjat
83307e7969
Switch to peekable to avoid looping the runs again
2022-11-06 11:09:17 -07:00
Hojjat
c1c2248572
bugfix: text selection starting from the bottom
2022-11-06 11:09:17 -07:00
Ian Douglas Scott
0d3fb1dd9d
Use ouroboros in FontSystem to avoid lifetime bound
...
Perhaps not quite what ouroboros is expected to be used for, but it's
not too bad, and avoiding the lifetime bound can be a huge help.
2022-11-04 10:37:32 -06:00
Jeremy Soller
ac354c3a2a
Remove AttrsList lifetime bound
2022-11-04 09:44:54 -06:00
Jeremy Soller
a13fd9c591
Improve docs
2022-10-31 11:36:54 -06:00
Jeremy Soller
92cad6fe13
Decouple editing from buffer
2022-10-31 11:24:36 -06:00
Jeremy Soller
88bd1c9235
Add layout_opt and shape_opt getters to TextBufferLine
2022-10-27 17:40:00 -06:00
Jeremy Soller
cce821e99f
Adjust attribute spans when buffer lines change
2022-10-27 14:51:46 -06:00
Jeremy Soller
8f8cf80bf6
Update documentation
2022-10-27 10:29:19 -06:00
Jeremy Soller
e4c8d4ba6b
Make attribute spans use ranges and update docs
2022-10-27 09:56:53 -06:00
Jeremy Soller
3ece9236b3
Use Color in more places
2022-10-27 09:07:47 -06:00
Jeremy Soller
f133b1fca1
Improve API to set line attributes
2022-10-27 08:37:07 -06:00
Jeremy Soller
1e1164f4b2
Cache syntax highlighting results
2022-10-26 22:25:37 -06:00
Jeremy Soller
87c12b11ae
Combine both simple and word wrapping into one layout function
2022-10-26 20:10:38 -06:00
Jeremy Soller
5d1aa8b814
Add simple per-glyph wrapping option
2022-10-26 19:56:13 -06:00
Jeremy Soller
57feeb2901
Preserve cursor glyph when moving up/down
2022-10-26 19:45:28 -06:00
Jeremy Soller
846c646043
Syntax highlighting while editing
2022-10-26 19:31:33 -06:00
Jeremy Soller
559a83faa5
Improve attribute setting
2022-10-26 18:45:31 -06:00
Jeremy Soller
a51f5ac4a8
Highlight empty lines correctly
2022-10-26 17:52:51 -06:00
Jeremy Soller
ea64291abb
Make it possible to set attributes per glyph
2022-10-26 15:16:06 -06:00
Jeremy Soller
4798c7ee1a
Add initial rich text example
2022-10-26 14:16:48 -06:00
Jeremy Soller
119a570ee9
Cache font matches, use usize for line index, use font system for swash
2022-10-26 12:23:03 -06:00
Jeremy Soller
cdc2868c10
Remove completed TODO
2022-10-25 22:10:15 -06:00
Jeremy Soller
80e0a31188
Make font_matches accessible via function only
2022-10-25 21:38:47 -06:00
Jeremy Soller
ea18576032
Make it possible to set and use default family
2022-10-25 21:16:02 -06:00
Jeremy Soller
e53956cb2d
Fix scrolling with cursor
2022-10-25 20:49:15 -06:00
Jeremy Soller
c031944b45
Make hit detection public
2022-10-25 20:27:46 -06:00
grovesNL
e32cfedfcf
Make font_matches public for now
2022-10-25 19:52:59 -06:00
Jeremy Soller
525c4efaa5
Add ability to set global buffer attributes
2022-10-25 16:29:33 -06:00
Jeremy Soller
59a4f8a4c1
Produce FontMatches inside of Buffer
2022-10-25 16:13:07 -06:00
Jeremy Soller
324c8837fd
Cache fonts
2022-10-25 15:47:55 -06:00
Jeremy Soller
c60aaaf9d2
Ensure orbclient example reshapes
2022-10-25 15:33:48 -06:00
Jeremy Soller
bc04887b35
Update docstring again
2022-10-25 13:15:52 -06:00
Jeremy Soller
8f9d9de87f
Update TextLayoutRun::rtl doc
2022-10-25 13:14:38 -06:00
Jeremy Soller
0336e0c5e9
Use layout_runs for hit detection
2022-10-25 13:13:13 -06:00
Jeremy Soller
a9b7b4e914
Add layout run iterator
2022-10-25 12:52:46 -06:00
Jeremy Soller
5d7dd59078
Draw does not need mutable buffer
2022-10-25 11:40:57 -06:00
Jeremy Soller
330a736136
Add function to get layout runs
2022-10-25 11:40:10 -06:00
Jeremy Soller
5603e30a29
Document shape_until_cursor
2022-10-25 11:13:22 -06:00
Jeremy Soller
0f446368ca
Have TextBuffer own FontMatches
2022-10-25 11:10:44 -06:00
Jeremy Soller
1c341f3126
Make swash optional, add swash cache abstraction
2022-10-25 10:55:24 -06:00
Jeremy Soller
42de42d59e
Do not store reference to font in shape or layout glyphs
2022-10-25 10:13:44 -06:00
Andrew Wheeler(Genusis)
5200f67196
Clippy Fixes
2022-10-25 08:58:40 -06:00
Jeremy Soller
1bf532a2fc
Improved highlighting of selection
2022-10-24 19:11:28 -06:00
Jeremy Soller
ef686f8f96
Improved bidi selection
2022-10-24 18:57:13 -06:00
Aaron Muir Hamilton
e14588b2f6
Fix edge cases relating to running Delete with your cursor half way through an egc.
2022-10-24 18:01:49 -06:00
Aaron Muir Hamilton
7363c923e5
Delete by EGC rather than by char.
2022-10-24 16:12:06 -06:00