summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLStyleValue.h
Commit message (Collapse)AuthorAgeFilesLines
* [darwin] Use FOUNDATION_EXTERN instead of plain externJason Wray2018-07-241-2/+2
| | | | FOUNDATION_EXTERN is an alias for extern in most cases, but also covers us in the event that a method could be mismangled by the compiler as C++ (when we want C-style mangling, for Obj-C compatibility).
* Install aftermarket expression functions (#11472)Minh Nguyễn2018-03-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Introduced more ergonomic expression concatenation syntax * [ios, macos] Fixed mgl_join: * [ios, macos] Simplified expression document headings * [ios, macos] Documented mgl_join: * [ios, macos] Convert length operator to length: for strings Only works for literal strings. * [ios, macos] Implemented type conversion using CAST() * [ios, macos] Aftermarket let expressions * [ios, macos] Refactored aftermarket expression functions Refactored the installation of aftermarket expression functions to use macros. It is no longer necessary to handwrite the type encoding of a function. Also added aftermarket functions for interpolating and stepping. * [ios, macos] Updated documentation, tests, demo apps * [ios, macos] Added generic expression function * [ios, macos] Add MGL_MATCH function placeholder. * [ios, macos] Add MGL_SWITCH expression operator. * [ios, macos] Add mgl_coalesce: as expression function. * [ios, macos] Update style documentation. * [ios, macos] Add conventional custom function support. * [ios, macos] Updated example code * [ios, macos] Add mgl_coalesce conventional custom function support. * [ios, macos] Add aftermarket function to 'has' operator. * [ios, macos] Add documentation for lookup and feature operators. * [ios, macos] Documented simple lookup * [ios, macos] Renamed, reversed has expression Renamed mgl_hasProperty:properties: to mgl_does:have: for better readability and consistency with the conventional mgl_has: function. Documented both forms of mgl_has:. * [ios, macos] Restored OEM conditionals where available This is the preferred syntax for simple conditionals on iOS 9 and above, because you can inline the predicate instead of wrapping it in a constant value expression, which means you can write a conditional in a single format string. * [ios, macos] Update style docs. Co-authored-by: Fabian Guerra <fabian.guerra@mapbox.com>
* Reimplement style values atop NSExpression (#10726)Minh Nguyễn2018-01-241-456/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Import headers, not implementation files * [core] Added accessors for various expression parameters Added missing parameter accessors to various expression operator classes, as well as a method on InterpolatorBase and Step that enumerates the stops and their values. * [ios, macos] Silenced warning in test of error condition * [ios, macos] Made MGLSphericalPosition boxable * [ios, macos] Implemented array enumeration during conversion * [ios, macos] Temporarily ignore heatmap layer type * [ios, macos] Migrated MGLSymbolStyleLayer.text to NSExpression MGLSymbolStyleLayer.text is now of type NSExpression instead of MGLStyleValue, as a first step toward migrating the entire layer API from style values to expressions. Implemented conversions from NSExpression to JSON arrays and vice versa. The most common NSExpression functions are now converted into style expressions, but not all of the most common style expression operators are supported yet. * [ios, macos] Implemented string coercion * [ios, macos] Color literals * [ios, macos] Null constant expressions * [ios, macos] Convert dictionary literals * [ios, macos] Interpolation expressions * [ios, macos] to-boolean, to-number, get from object * [ios, macos] Variable expressions Implemented custom expression functions for assigning and referring to variables within the context of an expression. Variables are assigned via a “context dictionary” and applied to an subexpression that is given as another argument to the same expression. Also implemented built-in variable expressions for zoom level and heatmap density. * [ios, macos] Convert colors, offsets, padding in expressions to JSON objects * [ios, macos] Expression-based style property getters Implemented a conversion from mbgl::style::PropertyValues to Objective-C JSON objects, which are then converted to NSExpressions. * [ios, macos] Consolidated property value–expression conversion in MGLStyleValueTransformer * [ios, macos] Predicate and expression guide Extracted documentation about predicates from a documentation comment in MGLVectorStyleLayer.h to a new jazzy guide. Added details about NSExpression support as well. Began updating the “For Style Authors” guide to reflect the transition from style values to expressions. * [ios, macos] Updated style authoring guide Updated the Information for Style Authors guide to discuss expressions instead of style functions. Included a table mapping style specification expression operators to NSExpression syntaxes. * [ios, macos] Migrated codegen templates to expressions * [ios, macos] Applied expression changes via codegen Ran make darwin-style-code. * [macos] Migrated macosapp to expressions * [ios, macos] Updated style function guide This guide needs to be thoroughly rewritten, but for now the example code has been migrated to expressions. * [ios, macos] Eviscerated style function tests * [ios, macos] Updated changelogs * [ios] Migrated iosapp to expressions * [ios, macos] Exposed JSON conversion methods publicly * [ios, macos] Removed MGLStyleValue, MGLStyleFunction
* [ios, macos] Revised descriptions for abstract classes (#9095)Jordan Kiley2017-06-141-5/+4
| | | Addresses https://github.com/mapbox/mapbox-gl-native/issues/8635
* [ios, macos] edited identity interpolation mode documentation (#8657)Jordan Kiley2017-05-151-3/+3
|
* [ios, macos] update iOS SDK guides (#8354)Jordan Kiley2017-03-171-4/+4
| | | | - Added DDS guide - Updated "For Style Authors" guide
* [ios, macos] Add more information to interpolation mode docs (#8425)Jordan Kiley2017-03-151-6/+13
| | | Addresses #8192 until #8354 lands.
* [ios, macos] Fixed documentation parameter mismatchesMinh Nguyễn2017-03-131-3/+4
| | | | Also enabled compiler warnings about incorrect Doxygen commands.
* [ios, macos] Alias MGLStyleConstantValue to MGLConstantStyleValueJesse Bounds2017-03-031-0/+2
|
* [ios, macos] Rename MGLStyleConstantValue to MGLConstantStyleValueJesse Bounds2017-03-031-12/+12
|
* [ios, macos] Document DDS enumerations (#7931)Jesse Bounds2017-02-081-4/+56
| | | | [ios, macos] Document DDS enumerations
* Add back MGLStyleFunction and re-document MGLStyleValue (#7943)Jesse Bounds2017-02-081-52/+270
| | | | [ios, macos] Add back MGLStyleFunction and re-document MGLStyleValue
* [ios, macos] Add support for data-driven property functionsJesse Bounds2017-02-021-57/+87
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-14/+14
|
* Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.0-beta.7Minh Nguyễn2017-01-161-22/+22
|\
| * [ios] Correct formatting and typos in MGLStyleValue documentation (#7515)Jason Wray2016-12-211-6/+6
| |
| * [ios, macos] Rename base to interpolationBase (#7486)Jesse Bounds2016-12-191-16/+16
| |
* | [build] add -fvisibility=hidden to macOS dynamic framework and export ↵Konstantin Käfer2017-01-041-0/+5
|/ | | | required symbols
* [ios, macos] Corrected MGLStyleValue inheritanceMinh Nguyễn2016-10-261-2/+2
| | | | | | MGLStyleConstantValue and MGLStyleFunction now inherit from MGLStyleValue with a generic argument matching the child class’s own generic argument. Fixes #6823.
* [ios, macos] Documented MGLStyleValueMinh Nguyễn2016-10-171-2/+143
|
* [ios, macos] Designated initializersMinh Nguyễn2016-10-171-2/+5
| | | | Added designated initializers to MGLStyleValue and friends. Restored custom equality and descriptions to MGLStyleFunction. Raise an exception if an unrecognized subclass of MGLStyleValue or MGLStyleValue itself is passed into a style attribute property.
* [ios, macos] Expand changes to entire APIMinh Nguyễn2016-10-171-0/+32