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