From 63cce78cf1597ba5879227f2298bda52e91e4e04 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 23 Aug 2016 12:49:47 -0700 Subject: [core] Add static getters for property default values (#6124) --- include/mbgl/style/layers/background_layer.hpp | 3 ++ include/mbgl/style/layers/circle_layer.hpp | 7 ++++ include/mbgl/style/layers/fill_layer.hpp | 7 ++++ include/mbgl/style/layers/layer.hpp.ejs | 2 ++ include/mbgl/style/layers/line_layer.hpp | 14 ++++++++ include/mbgl/style/layers/raster_layer.hpp | 7 ++++ include/mbgl/style/layers/symbol_layer.hpp | 48 ++++++++++++++++++++++++++ 7 files changed, 88 insertions(+) (limited to 'include/mbgl/style/layers') diff --git a/include/mbgl/style/layers/background_layer.hpp b/include/mbgl/style/layers/background_layer.hpp index ac97ec2e6d..68aebfd37c 100644 --- a/include/mbgl/style/layers/background_layer.hpp +++ b/include/mbgl/style/layers/background_layer.hpp @@ -18,12 +18,15 @@ public: // Paint properties + static PropertyValue getDefaultBackgroundColor(); PropertyValue getBackgroundColor() const; void setBackgroundColor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultBackgroundPattern(); PropertyValue getBackgroundPattern() const; void setBackgroundPattern(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultBackgroundOpacity(); PropertyValue getBackgroundOpacity() const; void setBackgroundOpacity(PropertyValue, const optional& klass = {}); diff --git a/include/mbgl/style/layers/circle_layer.hpp b/include/mbgl/style/layers/circle_layer.hpp index 873f95bcff..39ea61c5f3 100644 --- a/include/mbgl/style/layers/circle_layer.hpp +++ b/include/mbgl/style/layers/circle_layer.hpp @@ -26,24 +26,31 @@ public: // Paint properties + static PropertyValue getDefaultCircleRadius(); PropertyValue getCircleRadius() const; void setCircleRadius(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultCircleColor(); PropertyValue getCircleColor() const; void setCircleColor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultCircleBlur(); PropertyValue getCircleBlur() const; void setCircleBlur(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultCircleOpacity(); PropertyValue getCircleOpacity() const; void setCircleOpacity(PropertyValue, const optional& klass = {}); + static PropertyValue> getDefaultCircleTranslate(); PropertyValue> getCircleTranslate() const; void setCircleTranslate(PropertyValue>, const optional& klass = {}); + static PropertyValue getDefaultCircleTranslateAnchor(); PropertyValue getCircleTranslateAnchor() const; void setCircleTranslateAnchor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultCirclePitchScale(); PropertyValue getCirclePitchScale() const; void setCirclePitchScale(PropertyValue, const optional& klass = {}); diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp index e70d67f538..72bb7c498f 100644 --- a/include/mbgl/style/layers/fill_layer.hpp +++ b/include/mbgl/style/layers/fill_layer.hpp @@ -26,24 +26,31 @@ public: // Paint properties + static PropertyValue getDefaultFillAntialias(); PropertyValue getFillAntialias() const; void setFillAntialias(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultFillOpacity(); PropertyValue getFillOpacity() const; void setFillOpacity(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultFillColor(); PropertyValue getFillColor() const; void setFillColor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultFillOutlineColor(); PropertyValue getFillOutlineColor() const; void setFillOutlineColor(PropertyValue, const optional& klass = {}); + static PropertyValue> getDefaultFillTranslate(); PropertyValue> getFillTranslate() const; void setFillTranslate(PropertyValue>, const optional& klass = {}); + static PropertyValue getDefaultFillTranslateAnchor(); PropertyValue getFillTranslateAnchor() const; void setFillTranslateAnchor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultFillPattern(); PropertyValue getFillPattern() const; void setFillPattern(PropertyValue, const optional& klass = {}); diff --git a/include/mbgl/style/layers/layer.hpp.ejs b/include/mbgl/style/layers/layer.hpp.ejs index aaae30287c..9d542b75b6 100644 --- a/include/mbgl/style/layers/layer.hpp.ejs +++ b/include/mbgl/style/layers/layer.hpp.ejs @@ -45,6 +45,7 @@ public: // Layout properties <% for (const property of layoutProperties) { -%> + static PropertyValue<<%- propertyType(property) %>> getDefault<%- camelize(property.name) %>(); PropertyValue<<%- propertyType(property) %>> get<%- camelize(property.name) %>() const; void set<%- camelize(property.name) %>(PropertyValue<<%- propertyType(property) %>>); @@ -53,6 +54,7 @@ public: // Paint properties <% for (const property of paintProperties) { -%> + static PropertyValue<<%- propertyType(property) %>> getDefault<%- camelize(property.name) %>(); PropertyValue<<%- propertyType(property) %>> get<%- camelize(property.name) %>() const; void set<%- camelize(property.name) %>(PropertyValue<<%- propertyType(property) %>>, const optional& klass = {}); diff --git a/include/mbgl/style/layers/line_layer.hpp b/include/mbgl/style/layers/line_layer.hpp index abcb425b96..8549ad0a6c 100644 --- a/include/mbgl/style/layers/line_layer.hpp +++ b/include/mbgl/style/layers/line_layer.hpp @@ -28,47 +28,61 @@ public: // Layout properties + static PropertyValue getDefaultLineCap(); PropertyValue getLineCap() const; void setLineCap(PropertyValue); + static PropertyValue getDefaultLineJoin(); PropertyValue getLineJoin() const; void setLineJoin(PropertyValue); + static PropertyValue getDefaultLineMiterLimit(); PropertyValue getLineMiterLimit() const; void setLineMiterLimit(PropertyValue); + static PropertyValue getDefaultLineRoundLimit(); PropertyValue getLineRoundLimit() const; void setLineRoundLimit(PropertyValue); // Paint properties + static PropertyValue getDefaultLineOpacity(); PropertyValue getLineOpacity() const; void setLineOpacity(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultLineColor(); PropertyValue getLineColor() const; void setLineColor(PropertyValue, const optional& klass = {}); + static PropertyValue> getDefaultLineTranslate(); PropertyValue> getLineTranslate() const; void setLineTranslate(PropertyValue>, const optional& klass = {}); + static PropertyValue getDefaultLineTranslateAnchor(); PropertyValue getLineTranslateAnchor() const; void setLineTranslateAnchor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultLineWidth(); PropertyValue getLineWidth() const; void setLineWidth(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultLineGapWidth(); PropertyValue getLineGapWidth() const; void setLineGapWidth(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultLineOffset(); PropertyValue getLineOffset() const; void setLineOffset(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultLineBlur(); PropertyValue getLineBlur() const; void setLineBlur(PropertyValue, const optional& klass = {}); + static PropertyValue> getDefaultLineDasharray(); PropertyValue> getLineDasharray() const; void setLineDasharray(PropertyValue>, const optional& klass = {}); + static PropertyValue getDefaultLinePattern(); PropertyValue getLinePattern() const; void setLinePattern(PropertyValue, const optional& klass = {}); diff --git a/include/mbgl/style/layers/raster_layer.hpp b/include/mbgl/style/layers/raster_layer.hpp index dea0c26bf3..c5479bd2ab 100644 --- a/include/mbgl/style/layers/raster_layer.hpp +++ b/include/mbgl/style/layers/raster_layer.hpp @@ -21,24 +21,31 @@ public: // Paint properties + static PropertyValue getDefaultRasterOpacity(); PropertyValue getRasterOpacity() const; void setRasterOpacity(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultRasterHueRotate(); PropertyValue getRasterHueRotate() const; void setRasterHueRotate(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultRasterBrightnessMin(); PropertyValue getRasterBrightnessMin() const; void setRasterBrightnessMin(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultRasterBrightnessMax(); PropertyValue getRasterBrightnessMax() const; void setRasterBrightnessMax(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultRasterSaturation(); PropertyValue getRasterSaturation() const; void setRasterSaturation(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultRasterContrast(); PropertyValue getRasterContrast() const; void setRasterContrast(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultRasterFadeDuration(); PropertyValue getRasterFadeDuration() const; void setRasterFadeDuration(PropertyValue, const optional& klass = {}); diff --git a/include/mbgl/style/layers/symbol_layer.hpp b/include/mbgl/style/layers/symbol_layer.hpp index 77b63d9b91..5d1882fd4b 100644 --- a/include/mbgl/style/layers/symbol_layer.hpp +++ b/include/mbgl/style/layers/symbol_layer.hpp @@ -28,149 +28,197 @@ public: // Layout properties + static PropertyValue getDefaultSymbolPlacement(); PropertyValue getSymbolPlacement() const; void setSymbolPlacement(PropertyValue); + static PropertyValue getDefaultSymbolSpacing(); PropertyValue getSymbolSpacing() const; void setSymbolSpacing(PropertyValue); + static PropertyValue getDefaultSymbolAvoidEdges(); PropertyValue getSymbolAvoidEdges() const; void setSymbolAvoidEdges(PropertyValue); + static PropertyValue getDefaultIconAllowOverlap(); PropertyValue getIconAllowOverlap() const; void setIconAllowOverlap(PropertyValue); + static PropertyValue getDefaultIconIgnorePlacement(); PropertyValue getIconIgnorePlacement() const; void setIconIgnorePlacement(PropertyValue); + static PropertyValue getDefaultIconOptional(); PropertyValue getIconOptional() const; void setIconOptional(PropertyValue); + static PropertyValue getDefaultIconRotationAlignment(); PropertyValue getIconRotationAlignment() const; void setIconRotationAlignment(PropertyValue); + static PropertyValue getDefaultIconSize(); PropertyValue getIconSize() const; void setIconSize(PropertyValue); + static PropertyValue getDefaultIconTextFit(); PropertyValue getIconTextFit() const; void setIconTextFit(PropertyValue); + static PropertyValue> getDefaultIconTextFitPadding(); PropertyValue> getIconTextFitPadding() const; void setIconTextFitPadding(PropertyValue>); + static PropertyValue getDefaultIconImage(); PropertyValue getIconImage() const; void setIconImage(PropertyValue); + static PropertyValue getDefaultIconRotate(); PropertyValue getIconRotate() const; void setIconRotate(PropertyValue); + static PropertyValue getDefaultIconPadding(); PropertyValue getIconPadding() const; void setIconPadding(PropertyValue); + static PropertyValue getDefaultIconKeepUpright(); PropertyValue getIconKeepUpright() const; void setIconKeepUpright(PropertyValue); + static PropertyValue> getDefaultIconOffset(); PropertyValue> getIconOffset() const; void setIconOffset(PropertyValue>); + static PropertyValue getDefaultTextPitchAlignment(); PropertyValue getTextPitchAlignment() const; void setTextPitchAlignment(PropertyValue); + static PropertyValue getDefaultTextRotationAlignment(); PropertyValue getTextRotationAlignment() const; void setTextRotationAlignment(PropertyValue); + static PropertyValue getDefaultTextField(); PropertyValue getTextField() const; void setTextField(PropertyValue); + static PropertyValue> getDefaultTextFont(); PropertyValue> getTextFont() const; void setTextFont(PropertyValue>); + static PropertyValue getDefaultTextSize(); PropertyValue getTextSize() const; void setTextSize(PropertyValue); + static PropertyValue getDefaultTextMaxWidth(); PropertyValue getTextMaxWidth() const; void setTextMaxWidth(PropertyValue); + static PropertyValue getDefaultTextLineHeight(); PropertyValue getTextLineHeight() const; void setTextLineHeight(PropertyValue); + static PropertyValue getDefaultTextLetterSpacing(); PropertyValue getTextLetterSpacing() const; void setTextLetterSpacing(PropertyValue); + static PropertyValue getDefaultTextJustify(); PropertyValue getTextJustify() const; void setTextJustify(PropertyValue); + static PropertyValue getDefaultTextAnchor(); PropertyValue getTextAnchor() const; void setTextAnchor(PropertyValue); + static PropertyValue getDefaultTextMaxAngle(); PropertyValue getTextMaxAngle() const; void setTextMaxAngle(PropertyValue); + static PropertyValue getDefaultTextRotate(); PropertyValue getTextRotate() const; void setTextRotate(PropertyValue); + static PropertyValue getDefaultTextPadding(); PropertyValue getTextPadding() const; void setTextPadding(PropertyValue); + static PropertyValue getDefaultTextKeepUpright(); PropertyValue getTextKeepUpright() const; void setTextKeepUpright(PropertyValue); + static PropertyValue getDefaultTextTransform(); PropertyValue getTextTransform() const; void setTextTransform(PropertyValue); + static PropertyValue> getDefaultTextOffset(); PropertyValue> getTextOffset() const; void setTextOffset(PropertyValue>); + static PropertyValue getDefaultTextAllowOverlap(); PropertyValue getTextAllowOverlap() const; void setTextAllowOverlap(PropertyValue); + static PropertyValue getDefaultTextIgnorePlacement(); PropertyValue getTextIgnorePlacement() const; void setTextIgnorePlacement(PropertyValue); + static PropertyValue getDefaultTextOptional(); PropertyValue getTextOptional() const; void setTextOptional(PropertyValue); // Paint properties + static PropertyValue getDefaultIconOpacity(); PropertyValue getIconOpacity() const; void setIconOpacity(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultIconColor(); PropertyValue getIconColor() const; void setIconColor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultIconHaloColor(); PropertyValue getIconHaloColor() const; void setIconHaloColor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultIconHaloWidth(); PropertyValue getIconHaloWidth() const; void setIconHaloWidth(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultIconHaloBlur(); PropertyValue getIconHaloBlur() const; void setIconHaloBlur(PropertyValue, const optional& klass = {}); + static PropertyValue> getDefaultIconTranslate(); PropertyValue> getIconTranslate() const; void setIconTranslate(PropertyValue>, const optional& klass = {}); + static PropertyValue getDefaultIconTranslateAnchor(); PropertyValue getIconTranslateAnchor() const; void setIconTranslateAnchor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultTextOpacity(); PropertyValue getTextOpacity() const; void setTextOpacity(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultTextColor(); PropertyValue getTextColor() const; void setTextColor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultTextHaloColor(); PropertyValue getTextHaloColor() const; void setTextHaloColor(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultTextHaloWidth(); PropertyValue getTextHaloWidth() const; void setTextHaloWidth(PropertyValue, const optional& klass = {}); + static PropertyValue getDefaultTextHaloBlur(); PropertyValue getTextHaloBlur() const; void setTextHaloBlur(PropertyValue, const optional& klass = {}); + static PropertyValue> getDefaultTextTranslate(); PropertyValue> getTextTranslate() const; void setTextTranslate(PropertyValue>, const optional& klass = {}); + static PropertyValue getDefaultTextTranslateAnchor(); PropertyValue getTextTranslateAnchor() const; void setTextTranslateAnchor(PropertyValue, const optional& klass = {}); -- cgit v1.2.1