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

Method pick_highlighted_point

src/plot_state.rs:855–873  ·  view source on GitHub ↗
(
        &mut self,
        widget: &PlotWidget,
        publish_hover_pick: &mut Option<HoverPickEvent>,
    )

Source from the content-addressed store, hash-verified

853 button: mouse::Button,
854 widget: &PlotWidget,
855 publish_hover_pick: &mut Option<HoverPickEvent>,
856 ) -> bool {
857 let now = Instant::now();
858 let double = self.is_double_click(button);
859 let double_action = widget.controls.double_click_action(button);
860 let click_action = widget.controls.click_action(button);
861
862 let handled = if double {
863 double_action
864 .or(click_action)
865 .is_some_and(|action| self.apply_click_action(action, widget, publish_hover_pick))
866 } else {
867 click_action
868 .is_some_and(|action| self.apply_click_action(action, widget, publish_hover_pick))
869 };
870
871 self.last_click_time = Some(now);
872 self.last_click_button = Some(button);
873 handled
874 }
875
876 fn apply_click_action(

Callers 1

apply_click_actionMethod · 0.80

Calls 1

pick_hitMethod · 0.80

Tested by

no test coverage detected