Detailed Description

Represents the calc() css function.

Inheritance diagram for Css.Functions.Calc:
Css.CssFunction Css.ValueSet Css.CssUnit Css.Value

Public Member Functions

 Calc ()
 
override void OnValueReady (CssLexer lexer)
 Called after a value has been loaded from the stream. Functions etc get it too. This is used to, for example, map a value to a faster internal representation. More...
 
override string[] GetNames ()
 The set of all function names that this one will handle. Usually just one. Lowercase. e.g. "rgb", "rgba". More...
 
override float GetDecimal (RenderableData context, CssProperty property)
 If this is a decimal, the raw decimal value. This is generally the main output. More...
 
- Public Member Functions inherited from Css.CssFunction
override string ToString ()
 
- Public Member Functions inherited from Css.ValueSet
 ValueSet ()
 
void Add (Value val)
 Adds the given value to the set. More...
 
 ValueSet (int count)
 
 ValueSet (Value[] s)
 
override void SetRawDecimal (float value)
 Sets a raw decimal value to this object. Used by the animation system. More...
 
override float GetRawDecimal ()
 Obtains the underlying decimal value, if there is one. More...
 
override float GetDecimal (RenderableData context, CssProperty property)
 If this is a decimal, the raw decimal value. This is generally the main output. More...
 
override string GetText (RenderableData context, CssProperty property)
 If this is a text value, e.g. "auto", the raw text value. More...
 
override bool GetBoolean (RenderableData context, CssProperty property)
 If this is a boolean, the raw bool value. More...
 
override string ToString ()
 
override IEnumerator< ValueGetEnumerator ()
 
override bool Equals (Value value)
 Checks if two values are equal. More...
 
Value[] CopyInnerValues ()
 

Static Public Member Functions

static void RequireOperators ()
 Require the operators lookup to be created. More...
 

Public Attributes

Css.Value Operator
 The internal "compiled" operator. More...
 
- Public Attributes inherited from Css.CssFunction
bool LiteralValue
 True if this functions value should be read literally. More...
 
string Name
 The main name of this function. Originates from the first result returned by GetNames. More...
 
- Public Attributes inherited from Css.ValueSet
string Spacer =" "
 The spacer for this value set. More...
 

Static Public Attributes

static Dictionary< string, int > Operators
 The global operators set. More...
 

Protected Member Functions

override Css.Value Clone ()
 Duplicates this value. More...
 

Private Member Functions

Css.Value BuildOperator (Css.Value value)
 
Css.Value BuildOperator (Css.Value value, int start, int max)
 

Static Private Attributes

static char[] Precedence =new char[]{'-','+','*','/'}
 The operator precedence list. More...
 

Additional Inherited Members

- Protected Attributes inherited from Css.Value
ValueType Type_ =ValueType.Null
 The type of value this is. More...
 
- Package Attributes inherited from Css.ValueSet
Value[] Values
 The set of internal values, such as each individual value of padding. More...
 
- Static Package Attributes inherited from Css.Value
static readonly Value Empty =new Units.DecimalUnit(0)
 Represents an empty value. More...
 
- Properties inherited from Css.CssFunction
override bool IsFunction [get]
 
override string Identifier [get]
 

Constructor & Destructor Documentation

Css.Functions.Calc.Calc ( )
inline

Member Function Documentation

Css.Value Css.Functions.Calc.BuildOperator ( Css.Value  value)
inlineprivate
Css.Value Css.Functions.Calc.BuildOperator ( Css.Value  value,
int  start,
int  max 
)
inlineprivate
override Css.Value Css.Functions.Calc.Clone ( )
inlineprotectedvirtual

Duplicates this value.

Returns
A duplicated copy of this value. Note that if this value has inner values, they are copied too.

Reimplemented from Css.Value.

override float Css.Functions.Calc.GetDecimal ( RenderableData  context,
CssProperty  property 
)
inlinevirtual

If this is a decimal, the raw decimal value. This is generally the main output.

Reimplemented from Css.Value.

override string [] Css.Functions.Calc.GetNames ( )
inlinevirtual

The set of all function names that this one will handle. Usually just one. Lowercase. e.g. "rgb", "rgba".

Reimplemented from Css.CssFunction.

override void Css.Functions.Calc.OnValueReady ( CssLexer  lexer)
inlinevirtual

Called after a value has been loaded from the stream. Functions etc get it too. This is used to, for example, map a value to a faster internal representation.

Reimplemented from Css.Value.

static void Css.Functions.Calc.RequireOperators ( )
inlinestatic

Require the operators lookup to be created.

Member Data Documentation

Css.Value Css.Functions.Calc.Operator

The internal "compiled" operator.

Dictionary<string,int> Css.Functions.Calc.Operators
static

The global operators set.

char [] Css.Functions.Calc.Precedence =new char[]{'-','+','*','/'}
staticprivate

The operator precedence list.