Add Edit::cursor_position
This commit is contained in:
parent
320b034f5b
commit
a3a6262e5d
5 changed files with 95 additions and 65 deletions
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue