Detailed Description

Represents an instance of a floating point value.

Inheritance diagram for Css.Units.DecimalUnit:
Css.CssUnit Css.Value Css.Units.AngleUnit Css.Units.FontUnit Css.Units.FrequencyUnit Css.Units.IntegerUnit Css.Units.LengthUnit Css.Units.PercentUnit Css.Units.ResolutionUnit Css.Units.TimeUnit Css.Units.ViewPortUnit

Public Member Functions

 DecimalUnit (float value)
 
 DecimalUnit ()
 
override bool Equals (Value value)
 Checks if two values are equal. More...
 
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 ()
 

Public Attributes

float RawValue
 

Protected Member Functions

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

Properties

virtual float DisplayNumber [get]
 
override string HexString [get]
 
- Properties inherited from Css.CssUnit
virtual string[] PreText [get]
 The set of text strings that indicate this unit is about to appear in the CSS stream. #, " etc. More...
 
virtual string[] PostText [get]
 The set of text strings that indicate this unit has just appeared in the CSS stream. px,%,cm etc. More...
 
- Properties inherited from Css.Value
ValueType Type [get, set]
 
bool IsCommaArray [get]
 Checks if this value is a,comma,array. More...
 
virtual bool IsFunction [get]
 Checks if this is a function. More...
 
virtual bool IsAuto [get]
 Checks if this is the 'auto' keyword More...
 
virtual bool IsColour [get]
 Checks if this is a suitable colour. More...
 
virtual bool IsCached [get]
 True if this is a 'cached' value. See CachedIntegerUnit. More...
 
virtual Css.Value CachedOrigin [get]
 The original value of a cached object. More...
 
virtual bool IsAbsolute [get]
 Checks if this is an absolute value and is not a percentage/em/ rectangle containing percents. More...
 
virtual string Identifier [get]
 Used for locating e.g. a function contained within a set. More...
 
string Hash [get]
 Text is e.g. "afile.svg#something". This is either 'something' or null. More...
 
string Text [get]
 Gets context-free text such as font family names. More...
 
virtual int Count [get, set]
 The number of internal values. More...
 
virtual Value this[int index] [get, set]
 
virtual Value this[string index] [get, set]
 
virtual bool IsInherit [get]
 Is this an inheriting value? More...
 
virtual Css.Value Computed [get]
 Resolves through e.g. inherit and initial. More...
 
virtual string HexString [get]
 Converts this value into a hex string that is 2 characters long. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Css.Value
static Css.Value Load (string text)
 
- Protected Attributes inherited from Css.Value
ValueType Type_ =ValueType.Null
 The type of value this is. More...
 
- Static Package Attributes inherited from Css.Value
static readonly Value Empty =new Units.DecimalUnit(0)
 Represents an empty value. More...
 

Constructor & Destructor Documentation

Css.Units.DecimalUnit.DecimalUnit ( float  value)
inline
Css.Units.DecimalUnit.DecimalUnit ( )
inline

Member Function Documentation

override bool Css.Units.DecimalUnit.Equals ( Value  value)
inlinevirtual

Checks if two values are equal.

Parameters
valueThe value to check for equality with this. Always returns false if null.
Returns
True if this and the given value are equal; false otherwise.

Reimplemented from Css.Value.

override bool Css.Units.DecimalUnit.GetBoolean ( RenderableData  context,
CssProperty  property 
)
inlinevirtual

If this is a boolean, the raw bool value.

Reimplemented from Css.Value.

override float Css.Units.DecimalUnit.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.

Reimplemented in Css.Units.PercentUnit, Css.Units.EmUnit, Css.Units.ViewPortMaxUnit, Css.Units.ViewPortMinUnit, Css.Units.ViewPortHeightUnit, Css.Units.ViewPortWidthUnit, Css.Units.ExUnit, Css.Units.RemUnit, and Css.Units.LengthUnit.

override float Css.Units.DecimalUnit.GetRawDecimal ( )
inlinevirtual

Obtains the underlying decimal value, if there is one.

Reimplemented from Css.Value.

override string Css.Units.DecimalUnit.GetText ( RenderableData  context,
CssProperty  property 
)
inlinevirtual

If this is a text value, e.g. "auto", the raw text value.

Reimplemented from Css.Value.

override void Css.Units.DecimalUnit.SetRawDecimal ( float  value)
inlinevirtual

Sets a raw decimal value to this object. Used by the animation system.

Reimplemented from Css.Value.

Reimplemented in Css.Units.IntegerUnit.

override string Css.Units.DecimalUnit.ToString ( )
inline

Member Data Documentation

float Css.Units.DecimalUnit.RawValue

Property Documentation

virtual float Css.Units.DecimalUnit.DisplayNumber
get
override string Css.Units.DecimalUnit.HexString
get