Add Edit::cursor_position

This commit is contained in:
Pavel Strakhov 2024-06-08 13:16:28 +01:00 committed by Jeremy Soller
parent 320b034f5b
commit a3a6262e5d
5 changed files with 95 additions and 65 deletions

View file

@ -319,6 +319,9 @@ pub trait Edit<'buffer> {
/// Perform an [Action] on the editor
fn action(&mut self, font_system: &mut FontSystem, action: Action);
/// Get X and Y position of the top left corner of the cursor
fn cursor_position(&self) -> Option<(i32, i32)>;
}
impl<'font_system, 'buffer, E: Edit<'buffer>> BorrowedWithFontSystem<'font_system, E> {