Skip to main content

umya_spreadsheet/structs/drawing/
preset_camera_values.rs

1use std::str::FromStr;
2
3use super::super::super::EnumTrait;
4#[derive(Clone, Debug)]
5pub enum PresetCameraValues {
6    IsometricBottomDown,
7    IsometricBottomUp,
8    IsometricLeftDown,
9    IsometricLeftUp,
10    IsometricOffAxis1Left,
11    IsometricOffAxis1Right,
12    IsometricOffAxis1Top,
13    IsometricOffAxis2Left,
14    IsometricOffAxis2Right,
15    IsometricOffAxis2Top,
16    IsometricOffAxis3Bottom,
17    IsometricOffAxis3Left,
18    IsometricOffAxis3Right,
19    IsometricOffAxis4Bottom,
20    IsometricOffAxis4Left,
21    IsometricOffAxis4Right,
22    IsometricRightDown,
23    IsometricRightUp,
24    IsometricTopDown,
25    IsometricTopUp,
26    LegacyObliqueBottom,
27    LegacyObliqueBottomLeft,
28    LegacyObliqueBottomRight,
29    LegacyObliqueFront,
30    LegacyObliqueLeft,
31    LegacyObliqueRight,
32    LegacyObliqueTop,
33    LegacyObliqueTopLeft,
34    LegacyObliqueTopRight,
35    LegacyPerspectiveBottom,
36    LegacyPerspectiveBottomLeft,
37    LegacyPerspectiveBottomRight,
38    LegacyPerspectiveFront,
39    LegacyPerspectiveLeft,
40    LegacyPerspectiveRight,
41    LegacyPerspectiveTop,
42    LegacyPerspectiveTopLeft,
43    LegacyPerspectiveTopRight,
44    ObliqueBottom,
45    ObliqueBottomLeft,
46    ObliqueBottomRight,
47    ObliqueLeft,
48    ObliqueRight,
49    ObliqueTop,
50    ObliqueTopLeft,
51    ObliqueTopRight,
52    OrthographicFront,
53    PerspectiveAbove,
54    PerspectiveAboveLeftFacing,
55    PerspectiveAboveRightFacing,
56    PerspectiveBelow,
57    PerspectiveContrastingLeftFacing,
58    PerspectiveContrastingRightFacing,
59    PerspectiveFront,
60    PerspectiveHeroicExtremeLeftFacing,
61    PerspectiveHeroicExtremeRightFacing,
62    PerspectiveHeroicLeftFacing,
63    PerspectiveHeroicRightFacing,
64    PerspectiveLeft,
65    PerspectiveRelaxed,
66    PerspectiveRelaxedModerately,
67    PerspectiveRight,
68}
69impl Default for PresetCameraValues {
70    #[inline]
71    fn default() -> Self {
72        Self::LegacyObliqueTopLeft
73    }
74}
75impl EnumTrait for PresetCameraValues {
76    #[inline]
77    fn value_string(&self) -> &str {
78        match &self {
79            Self::IsometricBottomDown => "isometricBottomDown",
80            Self::IsometricBottomUp => "isometricBottomUp",
81            Self::IsometricLeftDown => "isometricLeftDown",
82            Self::IsometricLeftUp => "isometricLeftUp",
83            Self::IsometricOffAxis1Left => "isometricOffAxis1Left",
84            Self::IsometricOffAxis1Right => "isometricOffAxis1Right",
85            Self::IsometricOffAxis1Top => "isometricOffAxis1Top",
86            Self::IsometricOffAxis2Left => "isometricOffAxis2Left",
87            Self::IsometricOffAxis2Right => "isometricOffAxis2Right",
88            Self::IsometricOffAxis2Top => "isometricOffAxis2Top",
89            Self::IsometricOffAxis3Bottom => "isometricOffAxis3Bottom",
90            Self::IsometricOffAxis3Left => "isometricOffAxis3Left",
91            Self::IsometricOffAxis3Right => "isometricOffAxis3Right",
92            Self::IsometricOffAxis4Bottom => "isometricOffAxis4Bottom",
93            Self::IsometricOffAxis4Left => "isometricOffAxis4Left",
94            Self::IsometricOffAxis4Right => "isometricOffAxis4Right",
95            Self::IsometricRightDown => "isometricRightDown",
96            Self::IsometricRightUp => "isometricRightUp",
97            Self::IsometricTopDown => "isometricTopDown",
98            Self::IsometricTopUp => "isometricTopUp",
99            Self::LegacyObliqueBottom => "legacyObliqueBottom",
100            Self::LegacyObliqueBottomLeft => "legacyObliqueBottomLeft",
101            Self::LegacyObliqueBottomRight => "legacyObliqueBottomRight",
102            Self::LegacyObliqueFront => "legacyObliqueFront",
103            Self::LegacyObliqueLeft => "legacyObliqueLeft",
104            Self::LegacyObliqueRight => "legacyObliqueRight",
105            Self::LegacyObliqueTop => "legacyObliqueTop",
106            Self::LegacyObliqueTopLeft => "legacyObliqueTopLeft",
107            Self::LegacyObliqueTopRight => "legacyObliqueTopRight",
108            Self::LegacyPerspectiveBottom => "legacyPerspectiveBottom",
109            Self::LegacyPerspectiveBottomLeft => "legacyPerspectiveBottomLeft",
110            Self::LegacyPerspectiveBottomRight => "legacyPerspectiveBottomRight",
111            Self::LegacyPerspectiveFront => "legacyPerspectiveFront",
112            Self::LegacyPerspectiveLeft => "legacyPerspectiveLeft",
113            Self::LegacyPerspectiveRight => "legacyPerspectiveRight",
114            Self::LegacyPerspectiveTop => "legacyPerspectiveTop",
115            Self::LegacyPerspectiveTopLeft => "legacyPerspectiveTopLeft",
116            Self::LegacyPerspectiveTopRight => "legacyPerspectiveTopRight",
117            Self::ObliqueBottom => "obliqueBottom",
118            Self::ObliqueBottomLeft => "obliqueBottomLeft",
119            Self::ObliqueBottomRight => "obliqueBottomRight",
120            Self::ObliqueLeft => "obliqueLeft",
121            Self::ObliqueRight => "obliqueRight",
122            Self::ObliqueTop => "obliqueTop",
123            Self::ObliqueTopLeft => "obliqueTopLeft",
124            Self::ObliqueTopRight => "obliqueTopRight",
125            Self::OrthographicFront => "orthographicFront",
126            Self::PerspectiveAbove => "perspectiveAbove",
127            Self::PerspectiveAboveLeftFacing => "perspectiveAboveLeftFacing",
128            Self::PerspectiveAboveRightFacing => "perspectiveAboveRightFacing",
129            Self::PerspectiveBelow => "perspectiveBelow",
130            Self::PerspectiveContrastingLeftFacing => "perspectiveContrastingLeftFacing",
131            Self::PerspectiveContrastingRightFacing => "perspectiveContrastingRightFacing",
132            Self::PerspectiveFront => "perspectiveFront",
133            Self::PerspectiveHeroicExtremeLeftFacing => "perspectiveHeroicExtremeLeftFacing",
134            Self::PerspectiveHeroicExtremeRightFacing => "perspectiveHeroicExtremeRightFacing",
135            Self::PerspectiveHeroicLeftFacing => "perspectiveHeroicLeftFacing",
136            Self::PerspectiveHeroicRightFacing => "perspectiveHeroicRightFacing",
137            Self::PerspectiveLeft => "perspectiveLeft",
138            Self::PerspectiveRelaxed => "perspectiveRelaxed",
139            Self::PerspectiveRelaxedModerately => "perspectiveRelaxedModerately",
140            Self::PerspectiveRight => "perspectiveRight",
141        }
142    }
143}
144impl FromStr for PresetCameraValues {
145    type Err = ();
146
147    #[inline]
148    fn from_str(input: &str) -> Result<Self, Self::Err> {
149        match input {
150            "isometricBottomDown" => Ok(Self::IsometricBottomDown),
151            "isometricBottomUp" => Ok(Self::IsometricBottomUp),
152            "isometricLeftDown" => Ok(Self::IsometricLeftDown),
153            "isometricLeftUp" => Ok(Self::IsometricLeftUp),
154            "isometricOffAxis1Left" => Ok(Self::IsometricOffAxis1Left),
155            "isometricOffAxis1Right" => Ok(Self::IsometricOffAxis1Right),
156            "isometricOffAxis1Top" => Ok(Self::IsometricOffAxis1Top),
157            "isometricOffAxis2Left" => Ok(Self::IsometricOffAxis2Left),
158            "isometricOffAxis2Right" => Ok(Self::IsometricOffAxis2Right),
159            "isometricOffAxis2Top" => Ok(Self::IsometricOffAxis2Top),
160            "isometricOffAxis3Bottom" => Ok(Self::IsometricOffAxis3Bottom),
161            "isometricOffAxis3Left" => Ok(Self::IsometricOffAxis3Left),
162            "isometricOffAxis3Right" => Ok(Self::IsometricOffAxis3Right),
163            "isometricOffAxis4Bottom" => Ok(Self::IsometricOffAxis4Bottom),
164            "isometricOffAxis4Left" => Ok(Self::IsometricOffAxis4Left),
165            "isometricOffAxis4Right" => Ok(Self::IsometricOffAxis4Right),
166            "isometricRightDown" => Ok(Self::IsometricRightDown),
167            "isometricRightUp" => Ok(Self::IsometricRightUp),
168            "isometricTopDown" => Ok(Self::IsometricTopDown),
169            "isometricTopUp" => Ok(Self::IsometricTopUp),
170            "legacyObliqueBottom" => Ok(Self::LegacyObliqueBottom),
171            "legacyObliqueBottomLeft" => Ok(Self::LegacyObliqueBottomLeft),
172            "legacyObliqueBottomRight" => Ok(Self::LegacyObliqueBottomRight),
173            "legacyObliqueFront" => Ok(Self::LegacyObliqueFront),
174            "legacyObliqueLeft" => Ok(Self::LegacyObliqueLeft),
175            "legacyObliqueRight" => Ok(Self::LegacyObliqueRight),
176            "legacyObliqueTop" => Ok(Self::LegacyObliqueTop),
177            "legacyObliqueTopLeft" => Ok(Self::LegacyObliqueTopLeft),
178            "legacyObliqueTopRight" => Ok(Self::LegacyObliqueTopRight),
179            "legacyPerspectiveBottom" => Ok(Self::LegacyPerspectiveBottom),
180            "legacyPerspectiveBottomLeft" => Ok(Self::LegacyPerspectiveBottomLeft),
181            "legacyPerspectiveBottomRight" => Ok(Self::LegacyPerspectiveBottomRight),
182            "legacyPerspectiveFront" => Ok(Self::LegacyPerspectiveFront),
183            "legacyPerspectiveLeft" => Ok(Self::LegacyPerspectiveLeft),
184            "legacyPerspectiveRight" => Ok(Self::LegacyPerspectiveRight),
185            "legacyPerspectiveTop" => Ok(Self::LegacyPerspectiveTop),
186            "legacyPerspectiveTopLeft" => Ok(Self::LegacyPerspectiveTopLeft),
187            "legacyPerspectiveTopRight" => Ok(Self::LegacyPerspectiveTopRight),
188            "obliqueBottom" => Ok(Self::ObliqueBottom),
189            "obliqueBottomLeft" => Ok(Self::ObliqueBottomLeft),
190            "obliqueBottomRight" => Ok(Self::ObliqueBottomRight),
191            "obliqueLeft" => Ok(Self::ObliqueLeft),
192            "obliqueRight" => Ok(Self::ObliqueRight),
193            "obliqueTop" => Ok(Self::ObliqueTop),
194            "obliqueTopLeft" => Ok(Self::ObliqueTopLeft),
195            "obliqueTopRight" => Ok(Self::ObliqueTopRight),
196            "orthographicFront" => Ok(Self::OrthographicFront),
197            "perspectiveAbove" => Ok(Self::PerspectiveAbove),
198            "perspectiveAboveLeftFacing" => Ok(Self::PerspectiveAboveLeftFacing),
199            "perspectiveAboveRightFacing" => Ok(Self::PerspectiveAboveRightFacing),
200            "perspectiveBelow" => Ok(Self::PerspectiveBelow),
201            "perspectiveContrastingLeftFacing" => Ok(Self::PerspectiveContrastingLeftFacing),
202            "perspectiveContrastingRightFacing" => Ok(Self::PerspectiveContrastingRightFacing),
203            "perspectiveFront" => Ok(Self::PerspectiveFront),
204            "perspectiveHeroicExtremeLeftFacing" => Ok(Self::PerspectiveHeroicExtremeLeftFacing),
205            "perspectiveHeroicExtremeRightFacing" => Ok(Self::PerspectiveHeroicExtremeRightFacing),
206            "perspectiveHeroicLeftFacing" => Ok(Self::PerspectiveHeroicLeftFacing),
207            "perspectiveHeroicRightFacing" => Ok(Self::PerspectiveHeroicRightFacing),
208            "perspectiveLeft" => Ok(Self::PerspectiveLeft),
209            "perspectiveRelaxed" => Ok(Self::PerspectiveRelaxed),
210            "perspectiveRelaxedModerately" => Ok(Self::PerspectiveRelaxedModerately),
211            "perspectiveRight" => Ok(Self::PerspectiveRight),
212            _ => Err(()),
213        }
214    }
215}