egui_charts/ui/dialogs/drawing_properties/tabs/
mod.rs1mod coordinates;
4mod inputs;
5mod style;
6mod text;
7mod visibility;
8
9pub use coordinates::{CoordinatePoint, CoordinatesState, CoordinatesTab};
10pub use style::StyleTab;
11pub use text::TextTab;
12pub use visibility::VisibilityTab;
13
14use crate::ui_kit::tab_bar::TabLabel;
15
16#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
18pub enum PropertiesTab {
19 #[default]
20 Style,
22 Coordinates,
24 Inputs,
26 Visibility,
28 Text,
30}
31
32impl PropertiesTab {
33 pub fn label(&self) -> &'static str {
35 match self {
36 Self::Style => "Style",
37 Self::Coordinates => "Coordinates",
38 Self::Inputs => "Inputs",
39 Self::Visibility => "Visibility",
40 Self::Text => "Text",
41 }
42 }
43
44 pub fn all() -> [Self; 5] {
46 [
47 Self::Style,
48 Self::Inputs,
49 Self::Coordinates,
50 Self::Visibility,
51 Self::Text,
52 ]
53 }
54}
55
56impl TabLabel for PropertiesTab {
57 fn tab_label(&self) -> &str {
58 self.label()
59 }
60}
61
62pub(super) use inputs::InputsTab;