summaryrefslogtreecommitdiffstats
path: root/graphics/src/primitive.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-12 14:51:00 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-12 14:51:00 +0200
commit6448429103c9c82b90040ac5a5a097bdded23f82 (patch)
tree79582bde4a7d6df71df0abefe35146b06452409f /graphics/src/primitive.rs
parent346af3f8b0baa418fd37b878bc2930ff0bd57cc0 (diff)
downloadiced-6448429103c9c82b90040ac5a5a097bdded23f82.tar.gz
iced-6448429103c9c82b90040ac5a5a097bdded23f82.tar.bz2
iced-6448429103c9c82b90040ac5a5a097bdded23f82.zip
Draft `Editor` API and `TextEditor` widget
Diffstat (limited to 'graphics/src/primitive.rs')
-rw-r--r--graphics/src/primitive.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/graphics/src/primitive.rs b/graphics/src/primitive.rs
index 8a97e6e7..ce0b734b 100644
--- a/graphics/src/primitive.rs
+++ b/graphics/src/primitive.rs
@@ -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