Commit graph

57 commits

Author SHA1 Message Date
Jeremy Soller
0a11fb1045 Make Editor::buffer_ref accessible, rename lifetimes 2024-01-17 13:31:03 -07:00
Jeremy Soller
cbbf6f0d8f Allow Editor to use reference or Arc of Buffer 2024-01-17 13:31:03 -07:00
Jeremy Soller
ae030e9885 Move color and x_opt out of Cursor 2024-01-17 13:31:03 -07:00
Jeremy Soller
cbd567d238
Support line selection 2023-11-28 10:42:50 -07:00
Huang-Huang Bao
68ec25d38a
Fix building editor-libcosmic with vi feature
The vi editor has no update_theme method, fix it with feature gate.
2023-09-17 11:52:34 +08:00
Jeremy Soller
e7f3e161b4
Merge pull request #145 from 0HyperCube/update-libcosmic-version
Update libcosmic version
2023-06-26 06:29:02 -06:00
0hypercube
f6f56a93be Update libcosmic example version 2023-06-25 12:01:18 +01:00
0hypercube
bc1a327371 Add light syntax highligher to libcosmic example 2023-06-25 11:58:10 +01:00
Jeremy Soller
3c7dc1f657
Remove monospaced from attrs 2023-03-30 08:04:52 -06:00
Jeremy Soller
d85f12af8b
Fix #106 with editor-libcosmic 2023-03-24 07:51:31 -06:00
Jeremy Soller
31a8427e10
Update libcosmic 2023-03-23 14:20:48 -06:00
Edgar Geier
384c5c1fdc
Remove Mutex from FontSystem 2023-03-12 10:39:56 +01:00
Edgar Geier
46e9ef0246
Make BorrowedWithFontSystem borrow FontSystem mutably 2023-03-12 10:39:56 +01:00
Edgar Geier
057b5b6fa9
Extract borrow of FontSystem from Buffer 2023-03-12 10:39:54 +01:00
Edgar Geier
17102f5144
Fix clippy warnings 2023-03-03 18:59:45 +01:00
Edgar Geier
6c501c6640
Fix clippy warnings 2023-03-01 22:58:41 +01:00
Héctor Ramón Jiménez
4320ae6329
Use f32 instead of i32 for lengths
This allows users to use logical coordinates instead of physical ones.
2023-02-28 03:39:31 +01:00
Hojjat
260748afe7 Make sure the lines exists before applying the alignment 2023-02-24 10:07:23 -07:00
Hojjat
fff8389bbf Allow set_align to clear the alignment by setting it to None 2023-02-24 08:39:24 -07:00
Hojjat
45f6474a74 Apply alignment to selection in editor-libcosmic 2023-02-23 18:25:41 -07:00
Hojjat
d313713f44 Removed alignment from Buffer, added alignment per Bufferline to editor-libcosmic 2023-02-23 14:23:56 -07:00
Hojjat
2442422762 Add justification buttons to editor-libcosmic 2023-02-22 21:59:03 -07:00
Jeremy Soller
8cc988d374 Run cargo fmt 2023-01-04 20:03:03 -07:00
Hojjat
b9fef72f76 Added an enum with the option for "No Wraping" 2022-12-20 13:38:34 -07:00
Jeremy Soller
d22c0f43d4
Update to latest libcosmic 2022-12-06 08:49:32 -07:00
Jeremy Soller
ee54e7626b
Vi-style editor and other editor improvements (#40)
* WIP VI wrapper for editor

* WIP: block cursor

* Create Edit trait, run CI on all feature options

* Add prints describing build steps to ci.sh

* Custom rendering for Vi editor

* Clippy fixes

* More clippy fixes

* Show clippy results in CI

* Fix for Redox

* Fix clippy lint

* Add vi feature to enable vi-style editor

* Add escape to libcosmic text box
2022-11-15 12:26:59 -07:00
Jeremy Soller
bbe7d77b7b
Improvements to syntax editor, integrate with libcosmic editor 2022-11-09 10:44:51 -07:00
Jeremy Soller
ecf61a93b1
Update to use cosmic::theme::Theme 2022-11-09 08:03:13 -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
d49e8881fd
Use image renderer for iced text widget 2022-10-31 12:04:33 -06:00
Jeremy Soller
92cad6fe13
Decouple editing from buffer 2022-10-31 11:24:36 -06:00
tarkah
9e9a14f323 Update text color on theme change 2022-10-29 17:31:50 -06:00
tarkah
972a3c722a Set attrs on launch 2022-10-29 17:31:50 -06:00
Jeremy Soller
c247bbdad2 Move cache to text box state 2022-10-27 20:31:05 -06:00
Jeremy Soller
f229e06d83
Use new Text widget for all text 2022-10-27 18:16:58 -06:00
Jeremy Soller
fae1477136
Add text label using cosmic-text 2022-10-27 16:16:28 -06:00
Jeremy Soller
e4c8d4ba6b
Make attribute spans use ranges and update docs 2022-10-27 09:56:53 -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
a99a5dd0fb
Default libcosmic editor to monospace 2022-10-26 10:59:00 -06:00
Jeremy Soller
498cb7243d Set attribute family to monospace when monospace is toggled 2022-10-25 22:09:49 -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
84f4381cdf
Add text attributes 2022-10-25 14:14:23 -06:00
Jeremy Soller
330a736136
Add function to get layout runs 2022-10-25 11:40:10 -06:00
Jeremy Soller
0f446368ca
Have TextBuffer own FontMatches 2022-10-25 11:10:44 -06:00
Jeremy Soller
564dab009c Relicense MIT OR Apache 2.0 2022-10-24 12:58:15 -06:00
Jeremy Soller
441112b5e2
More implementation of new buffer abstraction 2022-10-20 19:34:56 -06:00
Jeremy Soller
3035bad29a
Add save button 2022-10-19 14:13:05 -06:00
Jeremy Soller
bfdc9a6d66
Show filename in title 2022-10-19 14:05:14 -06:00
Jeremy Soller
0cbc3c3cfa
Allow buffer text to be reset 2022-10-19 13:15:07 -06:00