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

@ -4,6 +4,7 @@ use crate::core::image;
use crate::core::svg;
use crate::core::text;
use crate::core::{Background, Color, Font, Pixels, Point, Rectangle, Vector};
use crate::text::editor;
use crate::text::paragraph;
use std::sync::Arc;
@ -41,6 +42,15 @@ pub enum Primitive<T> {
/// The color of the paragraph.
color: Color,
},
/// An editor primitive
Editor {
/// The [`editor::Weak`] reference.
editor: editor::Weak,
/// The position of the paragraph.
position: Point,
/// The color of the paragraph.
color: Color,
},
/// A quad primitive
Quad {
/// The bounds of the quad