diff options
author | 2023-10-27 17:36:54 +0200 | |
---|---|---|
committer | 2023-10-27 17:36:54 +0200 | |
commit | d731996342118dccfd50df8db9607741d162a639 (patch) | |
tree | 9f7db10dea8e6faf25041b19d0fe595acb995e9c /core/src/mouse | |
parent | 3ec5ad42251d4f35861f3bed621223e383742b12 (diff) | |
parent | c8eca4e6bfae82013e6bb08e9d8bf66560b36564 (diff) | |
download | iced-d731996342118dccfd50df8db9607741d162a639.tar.gz iced-d731996342118dccfd50df8db9607741d162a639.tar.bz2 iced-d731996342118dccfd50df8db9607741d162a639.zip |
Merge pull request #2123 from iced-rs/text-editor
`TextEditor` widget (or multi-line text input)
Diffstat (limited to 'core/src/mouse')
-rw-r--r-- | core/src/mouse/click.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/mouse/click.rs b/core/src/mouse/click.rs index 9cc44a71..6f3844be 100644 --- a/core/src/mouse/click.rs +++ b/core/src/mouse/click.rs @@ -61,6 +61,11 @@ impl Click { self.kind } + /// Returns the position of the [`Click`]. + pub fn position(&self) -> Point { + self.position + } + fn is_consecutive(&self, new_position: Point, time: Instant) -> bool { let duration = if time > self.time { Some(time - self.time) |