1 // This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.
2 
3 #pragma once
4 
5 #include <mbgl/style/types.hpp>
6 #include <mbgl/style/layout_property.hpp>
7 #include <mbgl/style/paint_property.hpp>
8 #include <mbgl/style/properties.hpp>
9 #include <mbgl/programs/attributes.hpp>
10 #include <mbgl/programs/uniforms.hpp>
11 
12 namespace mbgl {
13 namespace style {
14 
15 struct SymbolPlacement : LayoutProperty<SymbolPlacementType> {
16     static constexpr const char * key = "symbol-placement";
defaultValuembgl::style::SymbolPlacement17     static SymbolPlacementType defaultValue() { return SymbolPlacementType::Point; }
18 };
19 
20 struct SymbolSpacing : LayoutProperty<float> {
21     static constexpr const char * key = "symbol-spacing";
defaultValuembgl::style::SymbolSpacing22     static float defaultValue() { return 250; }
23 };
24 
25 struct SymbolAvoidEdges : LayoutProperty<bool> {
26     static constexpr const char * key = "symbol-avoid-edges";
defaultValuembgl::style::SymbolAvoidEdges27     static bool defaultValue() { return false; }
28 };
29 
30 struct IconAllowOverlap : LayoutProperty<bool> {
31     static constexpr const char * key = "icon-allow-overlap";
defaultValuembgl::style::IconAllowOverlap32     static bool defaultValue() { return false; }
33 };
34 
35 struct IconIgnorePlacement : LayoutProperty<bool> {
36     static constexpr const char * key = "icon-ignore-placement";
defaultValuembgl::style::IconIgnorePlacement37     static bool defaultValue() { return false; }
38 };
39 
40 struct IconOptional : LayoutProperty<bool> {
41     static constexpr const char * key = "icon-optional";
defaultValuembgl::style::IconOptional42     static bool defaultValue() { return false; }
43 };
44 
45 struct IconRotationAlignment : LayoutProperty<AlignmentType> {
46     static constexpr const char * key = "icon-rotation-alignment";
defaultValuembgl::style::IconRotationAlignment47     static AlignmentType defaultValue() { return AlignmentType::Auto; }
48 };
49 
50 struct IconSize : DataDrivenLayoutProperty<float> {
51     static constexpr const char * key = "icon-size";
defaultValuembgl::style::IconSize52     static float defaultValue() { return 1; }
53 };
54 
55 struct IconTextFit : LayoutProperty<IconTextFitType> {
56     static constexpr const char * key = "icon-text-fit";
defaultValuembgl::style::IconTextFit57     static IconTextFitType defaultValue() { return IconTextFitType::None; }
58 };
59 
60 struct IconTextFitPadding : LayoutProperty<std::array<float, 4>> {
61     static constexpr const char * key = "icon-text-fit-padding";
defaultValuembgl::style::IconTextFitPadding62     static std::array<float, 4> defaultValue() { return {{ 0, 0, 0, 0 }}; }
63 };
64 
65 struct IconImage : DataDrivenLayoutProperty<std::string> {
66     static constexpr const char * key = "icon-image";
defaultValuembgl::style::IconImage67     static std::string defaultValue() { return ""; }
68 };
69 
70 struct IconRotate : DataDrivenLayoutProperty<float> {
71     static constexpr const char * key = "icon-rotate";
defaultValuembgl::style::IconRotate72     static float defaultValue() { return 0; }
73 };
74 
75 struct IconPadding : LayoutProperty<float> {
76     static constexpr const char * key = "icon-padding";
defaultValuembgl::style::IconPadding77     static float defaultValue() { return 2; }
78 };
79 
80 struct IconKeepUpright : LayoutProperty<bool> {
81     static constexpr const char * key = "icon-keep-upright";
defaultValuembgl::style::IconKeepUpright82     static bool defaultValue() { return false; }
83 };
84 
85 struct IconOffset : DataDrivenLayoutProperty<std::array<float, 2>> {
86     static constexpr const char * key = "icon-offset";
defaultValuembgl::style::IconOffset87     static std::array<float, 2> defaultValue() { return {{ 0, 0 }}; }
88 };
89 
90 struct IconAnchor : DataDrivenLayoutProperty<SymbolAnchorType> {
91     static constexpr const char * key = "icon-anchor";
defaultValuembgl::style::IconAnchor92     static SymbolAnchorType defaultValue() { return SymbolAnchorType::Center; }
93 };
94 
95 struct IconPitchAlignment : LayoutProperty<AlignmentType> {
96     static constexpr const char * key = "icon-pitch-alignment";
defaultValuembgl::style::IconPitchAlignment97     static AlignmentType defaultValue() { return AlignmentType::Auto; }
98 };
99 
100 struct TextPitchAlignment : LayoutProperty<AlignmentType> {
101     static constexpr const char * key = "text-pitch-alignment";
defaultValuembgl::style::TextPitchAlignment102     static AlignmentType defaultValue() { return AlignmentType::Auto; }
103 };
104 
105 struct TextRotationAlignment : LayoutProperty<AlignmentType> {
106     static constexpr const char * key = "text-rotation-alignment";
defaultValuembgl::style::TextRotationAlignment107     static AlignmentType defaultValue() { return AlignmentType::Auto; }
108 };
109 
110 struct TextField : DataDrivenLayoutProperty<std::string> {
111     static constexpr const char * key = "text-field";
defaultValuembgl::style::TextField112     static std::string defaultValue() { return ""; }
113 };
114 
115 struct TextFont : DataDrivenLayoutProperty<std::vector<std::string>> {
116     static constexpr const char * key = "text-font";
defaultValuembgl::style::TextFont117     static std::vector<std::string> defaultValue() { return { "Open Sans Regular", "Arial Unicode MS Regular" }; }
118 };
119 
120 struct TextSize : DataDrivenLayoutProperty<float> {
121     static constexpr const char * key = "text-size";
defaultValuembgl::style::TextSize122     static float defaultValue() { return 16; }
123 };
124 
125 struct TextMaxWidth : DataDrivenLayoutProperty<float> {
126     static constexpr const char * key = "text-max-width";
defaultValuembgl::style::TextMaxWidth127     static float defaultValue() { return 10; }
128 };
129 
130 struct TextLineHeight : LayoutProperty<float> {
131     static constexpr const char * key = "text-line-height";
defaultValuembgl::style::TextLineHeight132     static float defaultValue() { return 1.2; }
133 };
134 
135 struct TextLetterSpacing : DataDrivenLayoutProperty<float> {
136     static constexpr const char * key = "text-letter-spacing";
defaultValuembgl::style::TextLetterSpacing137     static float defaultValue() { return 0; }
138 };
139 
140 struct TextJustify : DataDrivenLayoutProperty<TextJustifyType> {
141     static constexpr const char * key = "text-justify";
defaultValuembgl::style::TextJustify142     static TextJustifyType defaultValue() { return TextJustifyType::Center; }
143 };
144 
145 struct TextAnchor : DataDrivenLayoutProperty<SymbolAnchorType> {
146     static constexpr const char * key = "text-anchor";
defaultValuembgl::style::TextAnchor147     static SymbolAnchorType defaultValue() { return SymbolAnchorType::Center; }
148 };
149 
150 struct TextMaxAngle : LayoutProperty<float> {
151     static constexpr const char * key = "text-max-angle";
defaultValuembgl::style::TextMaxAngle152     static float defaultValue() { return 45; }
153 };
154 
155 struct TextRotate : DataDrivenLayoutProperty<float> {
156     static constexpr const char * key = "text-rotate";
defaultValuembgl::style::TextRotate157     static float defaultValue() { return 0; }
158 };
159 
160 struct TextPadding : LayoutProperty<float> {
161     static constexpr const char * key = "text-padding";
defaultValuembgl::style::TextPadding162     static float defaultValue() { return 2; }
163 };
164 
165 struct TextKeepUpright : LayoutProperty<bool> {
166     static constexpr const char * key = "text-keep-upright";
defaultValuembgl::style::TextKeepUpright167     static bool defaultValue() { return true; }
168 };
169 
170 struct TextTransform : DataDrivenLayoutProperty<TextTransformType> {
171     static constexpr const char * key = "text-transform";
defaultValuembgl::style::TextTransform172     static TextTransformType defaultValue() { return TextTransformType::None; }
173 };
174 
175 struct TextOffset : DataDrivenLayoutProperty<std::array<float, 2>> {
176     static constexpr const char * key = "text-offset";
defaultValuembgl::style::TextOffset177     static std::array<float, 2> defaultValue() { return {{ 0, 0 }}; }
178 };
179 
180 struct TextAllowOverlap : LayoutProperty<bool> {
181     static constexpr const char * key = "text-allow-overlap";
defaultValuembgl::style::TextAllowOverlap182     static bool defaultValue() { return false; }
183 };
184 
185 struct TextIgnorePlacement : LayoutProperty<bool> {
186     static constexpr const char * key = "text-ignore-placement";
defaultValuembgl::style::TextIgnorePlacement187     static bool defaultValue() { return false; }
188 };
189 
190 struct TextOptional : LayoutProperty<bool> {
191     static constexpr const char * key = "text-optional";
defaultValuembgl::style::TextOptional192     static bool defaultValue() { return false; }
193 };
194 
195 struct IconOpacity : DataDrivenPaintProperty<float, attributes::a_opacity, uniforms::u_opacity> {
defaultValuembgl::style::IconOpacity196     static float defaultValue() { return 1; }
197 };
198 
199 struct IconColor : DataDrivenPaintProperty<Color, attributes::a_fill_color, uniforms::u_fill_color> {
defaultValuembgl::style::IconColor200     static Color defaultValue() { return Color::black(); }
201 };
202 
203 struct IconHaloColor : DataDrivenPaintProperty<Color, attributes::a_halo_color, uniforms::u_halo_color> {
defaultValuembgl::style::IconHaloColor204     static Color defaultValue() { return {}; }
205 };
206 
207 struct IconHaloWidth : DataDrivenPaintProperty<float, attributes::a_halo_width, uniforms::u_halo_width> {
defaultValuembgl::style::IconHaloWidth208     static float defaultValue() { return 0; }
209 };
210 
211 struct IconHaloBlur : DataDrivenPaintProperty<float, attributes::a_halo_blur, uniforms::u_halo_blur> {
defaultValuembgl::style::IconHaloBlur212     static float defaultValue() { return 0; }
213 };
214 
215 struct IconTranslate : PaintProperty<std::array<float, 2>> {
defaultValuembgl::style::IconTranslate216     static std::array<float, 2> defaultValue() { return {{ 0, 0 }}; }
217 };
218 
219 struct IconTranslateAnchor : PaintProperty<TranslateAnchorType> {
defaultValuembgl::style::IconTranslateAnchor220     static TranslateAnchorType defaultValue() { return TranslateAnchorType::Map; }
221 };
222 
223 struct TextOpacity : DataDrivenPaintProperty<float, attributes::a_opacity, uniforms::u_opacity> {
defaultValuembgl::style::TextOpacity224     static float defaultValue() { return 1; }
225 };
226 
227 struct TextColor : DataDrivenPaintProperty<Color, attributes::a_fill_color, uniforms::u_fill_color> {
defaultValuembgl::style::TextColor228     static Color defaultValue() { return Color::black(); }
229 };
230 
231 struct TextHaloColor : DataDrivenPaintProperty<Color, attributes::a_halo_color, uniforms::u_halo_color> {
defaultValuembgl::style::TextHaloColor232     static Color defaultValue() { return {}; }
233 };
234 
235 struct TextHaloWidth : DataDrivenPaintProperty<float, attributes::a_halo_width, uniforms::u_halo_width> {
defaultValuembgl::style::TextHaloWidth236     static float defaultValue() { return 0; }
237 };
238 
239 struct TextHaloBlur : DataDrivenPaintProperty<float, attributes::a_halo_blur, uniforms::u_halo_blur> {
defaultValuembgl::style::TextHaloBlur240     static float defaultValue() { return 0; }
241 };
242 
243 struct TextTranslate : PaintProperty<std::array<float, 2>> {
defaultValuembgl::style::TextTranslate244     static std::array<float, 2> defaultValue() { return {{ 0, 0 }}; }
245 };
246 
247 struct TextTranslateAnchor : PaintProperty<TranslateAnchorType> {
defaultValuembgl::style::TextTranslateAnchor248     static TranslateAnchorType defaultValue() { return TranslateAnchorType::Map; }
249 };
250 
251 class SymbolLayoutProperties : public Properties<
252     SymbolPlacement,
253     SymbolSpacing,
254     SymbolAvoidEdges,
255     IconAllowOverlap,
256     IconIgnorePlacement,
257     IconOptional,
258     IconRotationAlignment,
259     IconSize,
260     IconTextFit,
261     IconTextFitPadding,
262     IconImage,
263     IconRotate,
264     IconPadding,
265     IconKeepUpright,
266     IconOffset,
267     IconAnchor,
268     IconPitchAlignment,
269     TextPitchAlignment,
270     TextRotationAlignment,
271     TextField,
272     TextFont,
273     TextSize,
274     TextMaxWidth,
275     TextLineHeight,
276     TextLetterSpacing,
277     TextJustify,
278     TextAnchor,
279     TextMaxAngle,
280     TextRotate,
281     TextPadding,
282     TextKeepUpright,
283     TextTransform,
284     TextOffset,
285     TextAllowOverlap,
286     TextIgnorePlacement,
287     TextOptional
288 > {};
289 
290 class SymbolPaintProperties : public Properties<
291     IconOpacity,
292     IconColor,
293     IconHaloColor,
294     IconHaloWidth,
295     IconHaloBlur,
296     IconTranslate,
297     IconTranslateAnchor,
298     TextOpacity,
299     TextColor,
300     TextHaloColor,
301     TextHaloWidth,
302     TextHaloBlur,
303     TextTranslate,
304     TextTranslateAnchor
305 > {};
306 
307 } // namespace style
308 } // namespace mbgl
309