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

Function control

examples/themes_and_styles.rs:94–106  ·  view source on GitHub ↗
(
    label: &'a str,
    options: &'a [T],
    selected: T,
    on_selected: impl Fn(T) -> Message + 'a,
)

Source from the content-addressed store, hash-verified

92}
93
94fn control<'a, T: Copy + Eq + std::fmt::Display + 'a>(
95 label: &'a str,
96 options: &'a [T],
97 selected: T,
98 on_selected: impl Fn(T) -> Message + 'a,
99) -> Element<'a, Message> {
100 column![
101 text(label).size(14.0),
102 pick_list(options, Some(selected), on_selected).width(Length::Fixed(220.0)),
103 ]
104 .spacing(6.0)
105 .into()
106}
107
108fn plot_widget(style_choice: StyleChoice) -> PlotWidget {
109 let line = Series::line_only(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected