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

Method set_drag

examples/controls_toggles.rs:84–90  ·  view source on GitHub ↗
(&mut self, button: mouse::Button, action: DragAction, enabled: bool)

Source from the content-addressed store, hash-verified

82 }
83
84 fn set_drag(&mut self, button: mouse::Button, action: DragAction, enabled: bool) {
85 if enabled {
86 self.widget.get_controls_mut().bind_drag(button, action);
87 } else {
88 self.widget.get_controls_mut().unbind_drag(button);
89 }
90 }
91
92 fn drag_enabled(&self, button: mouse::Button, action: DragAction) -> bool {
93 self.widget.get_controls().drag_is_bound(button, action)

Callers 1

updateMethod · 0.80

Calls 3

bind_dragMethod · 0.80
get_controls_mutMethod · 0.80
unbind_dragMethod · 0.80

Tested by

no test coverage detected