MCPcopy Create free account
hub / github.com/donkeyteethUX/iced_plot / arrows_to_pan_enabled

Method arrows_to_pan_enabled

src/controls.rs:372–386  ·  view source on GitHub ↗

Return whether all arrow keys are currently bound to pan actions.

(&self)

Source from the content-addressed store, hash-verified

370
371 /// Return whether all arrow keys are currently bound to pan actions.
372 pub fn arrows_to_pan_enabled(&self) -> bool {
373 [
374 keyboard::key::Named::ArrowLeft,
375 keyboard::key::Named::ArrowRight,
376 keyboard::key::Named::ArrowUp,
377 keyboard::key::Named::ArrowDown,
378 ]
379 .into_iter()
380 .all(|key| {
381 matches!(
382 self.key_action(&keyboard::Key::Named(key)),
383 Some(KeyAction::PanBy { .. })
384 )
385 })
386 }
387}
388
389impl PlotControls {

Callers

nothing calls this directly

Calls 1

allMethod · 0.80

Tested by

no test coverage detected