| 7 | /// Configures user interaction behavior for [`crate::PlotWidget`]. |
| 8 | #[derive(Debug, Clone, PartialEq)] |
| 9 | pub struct PlotControls { |
| 10 | /// Mouse button drag bindings. |
| 11 | drag: HashMap<mouse::Button, DragAction>, |
| 12 | |
| 13 | /// Scroll bindings keyed by active keyboard modifiers. |
| 14 | scroll: HashMap<keyboard::Modifiers, ScrollAction>, |
| 15 | |
| 16 | /// Mouse click bindings. |
| 17 | click: HashMap<mouse::Button, ClickAction>, |
| 18 | |
| 19 | /// Mouse double-click bindings. |
| 20 | double_click: HashMap<mouse::Button, ClickAction>, |
| 21 | |
| 22 | /// Keyboard key bindings. |
| 23 | key: HashMap<keyboard::Key, KeyAction>, |
| 24 | |
| 25 | /// Minimum drag distance, in screen pixels, before a drag gesture is treated |
| 26 | /// as intentional instead of a click. |
| 27 | drag_delta_threshold: f32, |
| 28 | |
| 29 | /// Fractional padding added around a completed box-zoom selection. |
| 30 | /// |
| 31 | /// For example, the default `0.02` expands the selected world-space bounds |
| 32 | /// by 2% before applying the new camera bounds. |
| 33 | selection_padding: f64, |
| 34 | } |
| 35 | |
| 36 | /// Action that can be performed during a mouse drag. |
| 37 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] |
nothing calls this directly
no outgoing calls
no test coverage detected