summaryrefslogtreecommitdiffstats
path: root/native/src/input
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-22 19:36:57 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-22 19:36:57 +0100
commita7dba612f03e58d7bd9527499d893987986b347c (patch)
treeb8c3d8f997b714aa368bd6eaecf14065f7645c77 /native/src/input
parentba56a561b254c9a5f3d23cb54d23dc311759ab4c (diff)
downloadiced-a7dba612f03e58d7bd9527499d893987986b347c.tar.gz
iced-a7dba612f03e58d7bd9527499d893987986b347c.tar.bz2
iced-a7dba612f03e58d7bd9527499d893987986b347c.zip
Write docs for `iced` and `iced_native`
Diffstat (limited to 'native/src/input')
-rw-r--r--native/src/input/mouse/event.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/native/src/input/mouse/event.rs b/native/src/input/mouse/event.rs
index 478f9b4d..aafc4fe3 100644
--- a/native/src/input/mouse/event.rs
+++ b/native/src/input/mouse/event.rs
@@ -34,11 +34,16 @@ pub enum Event {
},
/// The mouse wheel was scrolled.
- WheelScrolled { delta: ScrollDelta },
+ WheelScrolled {
+ /// The scroll movement.
+ delta: ScrollDelta,
+ },
}
+/// A scroll movement.
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum ScrollDelta {
+ /// A line-based scroll movement
Lines {
/// The number of horizontal lines scrolled
x: f32,
@@ -46,6 +51,7 @@ pub enum ScrollDelta {
/// The number of vertical lines scrolled
y: f32,
},
+ /// A pixel-based scroll movement
Pixels {
/// The number of horizontal pixels scrolled
x: f32,