summaryrefslogtreecommitdiffstats
path: root/core/src/mouse
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2023-10-27 17:36:54 +0200
committerLibravatar GitHub <noreply@github.com>2023-10-27 17:36:54 +0200
commitd731996342118dccfd50df8db9607741d162a639 (patch)
tree9f7db10dea8e6faf25041b19d0fe595acb995e9c /core/src/mouse
parent3ec5ad42251d4f35861f3bed621223e383742b12 (diff)
parentc8eca4e6bfae82013e6bb08e9d8bf66560b36564 (diff)
downloadiced-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.rs5
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)