Struct egui_plotter::MouseConfig
source · pub struct MouseConfig { /* private fields */ }
Expand description
Used to configure how the mouse interacts with the chart.
Usage
MouseConfig allows you to change the ways the user interacts with your chart in the following ways:
drag
,rotate
, &zoom
- Enables dragging, rotating, and zooming in on your plots with mouse controls.pitch_scale
&yaw_scale
- Modifies how quickly the pitch and yaw are rotated when rotating with the mouse.zoom_scale
- Modifies how quickly you zoom in/out.drag_bind
- Mouse button bound to dragging your plot.rotate_bind
- Mouse button bound to rotating your plot.
Implementations§
source§impl MouseConfig
impl MouseConfig
sourcepub fn enabled() -> Self
pub fn enabled() -> Self
Create a new MouseConfig with dragging, rotationg, and zooming enabled.
sourcepub fn enable_all(self) -> Self
pub fn enable_all(self) -> Self
Enables dragging, rotating, and zooming in on your plots. Consumes self.
sourcepub fn set_rotate(&mut self, rotate: bool)
pub fn set_rotate(&mut self, rotate: bool)
Enable/disable rotation of the chart.
sourcepub fn set_pitch_scale(&mut self, scale: f32)
pub fn set_pitch_scale(&mut self, scale: f32)
Change the pitch scale.
sourcepub fn pitch_scale(self, scale: f32) -> Self
pub fn pitch_scale(self, scale: f32) -> Self
Change the pitch scale. Consumes self.
Trait Implementations§
source§impl Clone for MouseConfig
impl Clone for MouseConfig
source§fn clone(&self) -> MouseConfig
fn clone(&self) -> MouseConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MouseConfig
impl Debug for MouseConfig
source§impl Default for MouseConfig
impl Default for MouseConfig
impl Copy for MouseConfig
Auto Trait Implementations§
impl RefUnwindSafe for MouseConfig
impl Send for MouseConfig
impl Sync for MouseConfig
impl Unpin for MouseConfig
impl UnwindSafe for MouseConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more