1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
use super::super::super::EnumTrait;
use std::str::FromStr;
#[derive(Clone, Debug)]
pub enum SystemColorValues {
    ActiveBorder,
    ActiveCaption,
    ApplicationWorkspace,
    Background,
    ButtonFace,
    ButtonHighlight,
    ButtonShadow,
    ButtonText,
    CaptionText,
    GradientActiveCaption,
    GradientInactiveCaption,
    GrayText,
    Highlight,
    HighlightText,
    HotLight,
    InactiveBorder,
    InactiveCaption,
    InactiveCaptionText,
    InfoBack,
    InfoText,
    Menu,
    MenuBar,
    MenuHighlight,
    MenuText,
    ScrollBar,
    ThreeDDarkShadow,
    ThreeDLight,
    Window,
    WindowFrame,
    WindowText,
}
impl Default for SystemColorValues {
    fn default() -> Self {
        Self::ScrollBar
    }
}
impl EnumTrait for SystemColorValues {
    fn get_value_string(&self) -> &str {
        match &self {
            Self::ActiveBorder => "activeBorder",
            Self::ActiveCaption => "activeCaption",
            Self::ApplicationWorkspace => "appWorkspace",
            Self::Background => "background",
            Self::ButtonFace => "btnFace",
            Self::ButtonHighlight => "btnHighlight",
            Self::ButtonShadow => "btnShadow",
            Self::ButtonText => "btnText",
            Self::CaptionText => "captionText",
            Self::GradientActiveCaption => "gradientActiveCaption",
            Self::GradientInactiveCaption => "gradientInactiveCaption",
            Self::GrayText => "grayText",
            Self::Highlight => "highlight",
            Self::HighlightText => "highlightText",
            Self::HotLight => "hotLight",
            Self::InactiveBorder => "inactiveBorder",
            Self::InactiveCaption => "inactiveCaption",
            Self::InactiveCaptionText => "inactiveCaptionText",
            Self::InfoBack => "infoBk",
            Self::InfoText => "infoText",
            Self::Menu => "menu",
            Self::MenuBar => "menuBar",
            Self::MenuHighlight => "menuHighlight",
            Self::MenuText => "menuText",
            Self::ScrollBar => "scrollBar",
            Self::ThreeDDarkShadow => "3dDkShadow",
            Self::ThreeDLight => "3dLight",
            Self::Window => "window",
            Self::WindowFrame => "windowFrame",
            Self::WindowText => "windowText",
        }
    }
}
impl FromStr for SystemColorValues {
    type Err = ();
    fn from_str(input: &str) -> Result<Self, Self::Err> {
        match input {
            "activeBorder" => Ok(Self::ActiveBorder),
            "activeCaption" => Ok(Self::ActiveCaption),
            "appWorkspace" => Ok(Self::ApplicationWorkspace),
            "background" => Ok(Self::Background),
            "btnFace" => Ok(Self::ButtonFace),
            "btnHighlight" => Ok(Self::ButtonHighlight),
            "btnShadow" => Ok(Self::ButtonShadow),
            "btnText" => Ok(Self::ButtonText),
            "captionText" => Ok(Self::CaptionText),
            "gradientActiveCaption" => Ok(Self::GradientActiveCaption),
            "gradientInactiveCaption" => Ok(Self::GradientInactiveCaption),
            "grayText" => Ok(Self::GrayText),
            "highlight" => Ok(Self::Highlight),
            "highlightText" => Ok(Self::HighlightText),
            "hotLight" => Ok(Self::HotLight),
            "inactiveBorder" => Ok(Self::InactiveBorder),
            "inactiveCaption" => Ok(Self::InactiveCaption),
            "inactiveCaptionText" => Ok(Self::InactiveCaptionText),
            "infoBk" => Ok(Self::InfoBack),
            "infoText" => Ok(Self::InfoText),
            "menu" => Ok(Self::Menu),
            "menuBar" => Ok(Self::MenuBar),
            "menuHighlight" => Ok(Self::MenuHighlight),
            "menuText" => Ok(Self::MenuText),
            "scrollBar" => Ok(Self::ScrollBar),
            "3dDkShadow" => Ok(Self::ThreeDDarkShadow),
            "3dLight" => Ok(Self::ThreeDLight),
            "window" => Ok(Self::Window),
            "windowFrame" => Ok(Self::WindowFrame),
            "windowText" => Ok(Self::WindowText),
            _ => Err(()),
        }
    }
}