Draft Editor API and TextEditor widget
This commit is contained in:
parent
346af3f8b0
commit
6448429103
25 changed files with 1384 additions and 92 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue