(&mut self, message: Message)
| 42 | } |
| 43 | |
| 44 | fn update(&mut self, message: Message) { |
| 45 | match message { |
| 46 | Message::Plot(message) => self.widget.update(message), |
| 47 | Message::ThemeSelected(theme_choice) => { |
| 48 | self.theme_choice = theme_choice; |
| 49 | } |
| 50 | Message::StyleSelected(style_choice) => { |
| 51 | self.style_choice = style_choice; |
| 52 | self.widget.set_style(style_choice.style_fn()); |
| 53 | } |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | fn view(&self) -> Element<'_, Message> { |
| 58 | let toolbar = container( |