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

@ -141,6 +141,7 @@ where
{
type Font = Font;
type Paragraph = text::Paragraph;
type Editor = text::Editor;
const ICON_FONT: Font = Font::with_name("Iced-Icons");
const CHECKMARK_ICON: char = '\u{f00c}';
@ -171,6 +172,19 @@ where
});
}
fn fill_editor(
&mut self,
editor: &Self::Editor,
position: Point,
color: Color,
) {
self.primitives.push(Primitive::Editor {
editor: editor.downgrade(),
position,
color,
});
}
fn fill_text(
&mut self,
text: Text<'_, Self::Font>,