Interface GssFunction
- All Known Implementing Classes:
GssFunctions.AddHsbToCssColor,GssFunctions.AddToNumericValue,GssFunctions.AdjustBrightness,GssFunctions.BaseBlendColors,GssFunctions.BlendColorsHsb,GssFunctions.BlendColorsRgb,GssFunctions.Concat,GssFunctions.Darken,GssFunctions.DesaturateColor,GssFunctions.Div,GssFunctions.Greyscale,GssFunctions.Lighten,GssFunctions.MakeContrastingColor,GssFunctions.MakeMutedColor,GssFunctions.MakeTranslucent,GssFunctions.MaxValue,GssFunctions.MinValue,GssFunctions.Mult,GssFunctions.SaturateColor,GssFunctions.SelectFrom,GssFunctions.Spin,GssFunctions.SubtractFromNumericValue
public interface GssFunction
Encapsulates a custom function callable from GSS stylesheet files.
-
Method Summary
Modifier and TypeMethodDescriptiongetCallResultNodes(List<CssValueNode> args, ErrorManager errorManager) Processes a list of function call arguments and returns a list of CssNodes representing this call's output, which replace the input nodes in the AST.getCallResultString(List<String> args) Processes a list of strings as function arguments and returns a string result.Returns the number of parsed arguments that this function takes, ornullif the number of arguments may vary.
-
Method Details
-
getNumExpectedArguments
Integer getNumExpectedArguments()Returns the number of parsed arguments that this function takes, ornullif the number of arguments may vary. -
getCallResultNodes
List<CssValueNode> getCallResultNodes(List<CssValueNode> args, ErrorManager errorManager) throws GssFunctionException Processes a list of function call arguments and returns a list of CssNodes representing this call's output, which replace the input nodes in the AST. Errors will be reported to the ErrorManager.- Throws:
GssFunctionException
-
getCallResultString
Processes a list of strings as function arguments and returns a string result. Errors are reported by throwingGssFunctionException.- Throws:
GssFunctionException
-