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

Method with_cursor_provider

src/plot_widget_builder.rs:141–147  ·  view source on GitHub ↗

Provide a custom formatter for the cursor overlay. Called with (x, y) world coordinates and should return the formatted string.

(mut self, provider: F)

Source from the content-addressed store, hash-verified

139 /// Provide a custom formatter for the cursor overlay. Called with
140 /// (x, y) world coordinates and should return the formatted string.
141 pub fn with_cursor_provider<F>(mut self, provider: F) -> Self
142 where
143 F: Fn(f64, f64) -> String + Send + Sync + 'static,
144 {
145 self.cursor_provider = Some(Arc::new(provider));
146 self
147 }
148
149 /// Enable or disable crosshairs that follow the cursor position.
150 pub fn with_crosshairs(mut self, enabled: bool) -> Self {

Callers 4

newFunction · 0.80
new_plotFunction · 0.80
newFunction · 0.80
newFunction · 0.80

Calls 1

newFunction · 0.50

Tested by

no test coverage detected