MCPcopy Create free account
hub / github.com/emilk/egui_plot / PlotExample

Interface PlotExample

examples_utils/src/lib.rs:4–30  ·  view source on GitHub ↗

Trait for examples that can be displayed in the demo gallery.

Source from the content-addressed store, hash-verified

2
3/// Trait for examples that can be displayed in the demo gallery.
4pub trait PlotExample {
5 /// The name of the example. Should match directory name.
6 fn name(&self) -> &'static str;
7
8 /// The title of the example.
9 fn title(&self) -> &'static str;
10
11 /// The description of the example.
12 fn description(&self) -> &'static str;
13
14 /// The tags of the example.
15 fn tags(&self) -> &'static [&'static str];
16
17 /// The thumbnail image of the example.
18 /// Should be 192x192 pixels. It is automatically generated from the
19 /// screenshot of the example.
20 fn thumbnail_bytes(&self) -> &'static [u8];
21
22 /// The code of the example.
23 fn code_bytes(&self) -> &'static [u8];
24
25 /// The UI of the example.
26 fn show_ui(&mut self, ui: &mut egui::Ui) -> egui::Response;
27
28 /// The controls for the example.
29 fn show_controls(&mut self, ui: &mut egui::Ui) -> egui::Response;
30}
31
32#[doc(hidden)]
33#[cfg(not(target_arch = "wasm32"))]

Callers

nothing calls this directly

Implementers 15

lib.rsexamples/lines/src/lib.rs
lib.rsexamples/box_plot/src/lib.rs
lib.rsexamples/legend_sort/src/lib.rs
lib.rsexamples/heatmap/src/lib.rs
lib.rsexamples/custom_plot_manipulation/src/
lib.rsexamples/legend/src/lib.rs
lib.rsexamples/filled_area/src/lib.rs
lib.rsexamples/borrow_points/src/lib.rs
lib.rsexamples/performance/src/lib.rs
lib.rsexamples/items/src/lib.rs
lib.rsexamples/markers/src/lib.rs
lib.rsexamples/stacked_bar/src/lib.rs

Calls

no outgoing calls

Tested by

no test coverage detected