Draft Editor API and TextEditor widget

This commit is contained in:
Héctor Ramón Jiménez 2023-09-12 14:51:00 +02:00
parent 346af3f8b0
commit 6448429103
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
25 changed files with 1384 additions and 92 deletions

View file

@ -1,16 +1,22 @@
use crate::core::alignment;
use crate::core::text;
use crate::core::{Color, Font, Pixels, Point, Rectangle};
use crate::graphics::text::editor;
use crate::graphics::text::paragraph;
/// A paragraph of text.
#[derive(Debug, Clone)]
pub enum Text<'a> {
Managed {
Paragraph {
paragraph: paragraph::Weak,
position: Point,
color: Color,
},
Editor {
editor: editor::Weak,
position: Point,
color: Color,
},
Cached(Cached<'a>),
}