Css.CssPropertyAlias Class Reference

Detailed Description

A CSS property alias. For example, border-top-left-radius is an alias for border-radius[0]. When an alias property is parsed, it maps the value through to the actual target property.

Inheritance diagram for Css.CssPropertyAlias:
Css.CssProperty Css.CssCompositeProperty Css.DirectionAwareProperty Css.Properties.AnimationCompProperty Css.Properties.BackgroundCompProperty Css.Properties.BorderBottomProperty Css.Properties.BorderCompProperty Css.Properties.BorderImageCompProperty Css.Properties.BorderLeftProperty Css.Properties.BorderRightProperty Css.Properties.BorderTopProperty Css.Properties.Cue Css.Properties.FontCompProperty Css.Properties.FontVariantCompProperty Css.Properties.ListStyle Css.Properties.Pause Css.Properties.SlidesCompProperty Css.Properties.TextDecoCompProperty

Public Member Functions

 CssPropertyAlias ()
 
 CssPropertyAlias (CssProperty target, int[] index)
 
virtual int RemapIndex (Css.Style style)
 Used to map a logical index to a physical one. More...
 
override Css.Value GetValue (Style styleBlock)
 Called to get a this properties value from the given style. This exists as it may be an alias property. More...
 
override void OnReadValue (Style styleBlock, Css.Value value)
 Called when a value is read from the CSS stream. More...
 
override Css.Value GetOrCreateValue (Node context, Style styleBlock, bool allowInherit, out Css.Value hostValue)
 Called to get a this properties value from the given style. This exists as it may be an alias property. More...
 
- Public Member Functions inherited from Css.CssProperty
virtual string[] GetProperties ()
 The set of all properties that this one will handle. Usually just one. e.g. "v-align", "vertical-align". More...
 
virtual float GetNormalValue (RenderableData context)
 The value of the 'normal' keyword. More...
 
CssProperty GetAliased (int index)
 Gets the aliased property for the given index. E.g. color-r is index 0 of color. More...
 
CssProperty GetAliased (int index, bool orThis)
 Gets the aliased property for the given index. E.g. color-r is index 0 of color. More...
 
virtual void Aliases ()
 The set of aliases for this property. For example, the border-radius property can declare an alias of border-top-left which maps to e.g. "1", i.e. the first inner index. More...
 
virtual ApplyState Apply (ComputedStyle style, Value value)
 Apply this CSS style to the given computed style. Note that you can grab the element from the computed style if you need that. More...
 
virtual void ApplyText (TextRenderingProperty text, RenderableData data, ComputedStyle style, Value value)
 Apply this CSS style to the given computed style. Note that you can grab the element from the computed style if you need that. More...
 
Css.Value GetOrCreateValue (Node context, Style styleBlock, bool allowInherit)
 Called to get a this properties value from the given style. This overload should not be used with alias properties - it always returns the 'host' value. More...
 
void Reapply (ComputedStyle computed, string propertyName)
 Causes the named property to apply its value. More...
 
void Reapply (ComputedStyle style, CssProperty property)
 Sets the named css property from the given style if the property exists in the style. More...
 
BackgroundImage GetBackground (ComputedStyle style)
 Call this if the current property requires a background image object. More...
 
BorderProperty GetBorder (ComputedStyle style)
 Call this if the current property requies a border object. More...
 
TextRenderingProperty GetText (ComputedStyle style)
 Call this if the current property requires a text object. NOTE: This one may be null. More...
 
TextRenderingProperty3D GetText3D (ComputedStyle style)
 Call this if the current property requires a text object. NOTE: This one may be null. More...
 

Public Attributes

int[] Index
 Inner indices used to map the alias property, e.g. index 0 of border-radius. More...
 
CssProperty Target
 The property that this alias maps to. More...
 
- Public Attributes inherited from Css.CssProperty
int SetSize
 If this property is a known set, the size of the set. This is automatically computed from aliases. More...
 
string Name
 The main property name. Some properties use multiple names (e.g. content and inner-text). More...
 
bool IsAlias
 True if this is an alias. More...
 
bool IsTextual
 Does this css property apply to text? E.g. font-size, color etc. More...
 
string NamespaceName
 Set if this property comes from some other namespace (e.g. "svg"). More...
 
ValueAxis Axis =ValueAxis.None
 True if this property occurs along the x axis. E.g. width, left, right. More...
 
ValueRelativity RelativeTo =ValueRelativity.Dimensions
 What is this property relative to? Most of the time, they're relative to dimensions (e.g. 100% of width). More...
 
bool IsWidthOrHeight
 True if this is width or height only. More...
 
List< CssPropertyAliasedProperties
 The properties that are aliased to this one. For example, color-r is aliased to color. More...
 
bool Inherits
 True if this property inherits. Defaults to false. More...
 
Css.Value InitialValue =NONE
 The initial value for this property. Defaults to a decimal 0 (equiv of 'none' or just '0'). More...
 

Properties

override bool NonStandard [get]
 True if this property is specific to Spark. More...
 
- Properties inherited from Css.CssProperty
bool HasAliases [get]
 True if this property has aliases. More...
 
Css.Spec.Value Specification [get]
 The specification for this properties value. More...
 
virtual bool Internal [get]
 True if this property is for internal use only. More...
 
virtual bool NonStandard [get]
 True if this property is specific to Spark. More...
 
string InitialValueText [set]
 A convenience property for setting up initial values. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Css.CssProperty
virtual Css.Spec.Value GetSpecification ()
 Loads the values spec. More...
 
void ColourAliases (string property, ValueAxis axis, int index)
 Loads a set of colour aliases for a given property name. E.g. name-r,name-g,name-b and name-a. The alias may also be mapped to a sub-index. It must be an empty string otherwise. More...
 
void SquareAliases (string property, int index)
 Loads a set of square aliases. E.g. name-top or name-bottom. More...
 
void ColourAliases ()
 Loads a set of colour aliases. E.g. name-r,name-g,name-b and name-a. More...
 
void PointAliases2D ()
 Loads a set of point aliases. E.g. name-x, name-y and name-z. More...
 
void PointAliases3D ()
 Loads a set of point aliases. E.g. name-x, name-y and name-z. More...
 
void SquareAliases ()
 Loads a set of square aliases. E.g. name-top or name-bottom. More...
 
void LogicalAlias (string name, ValueAxis axis, params int[] target)
 Adds a logical alias for the given CSS property to the given target. A numeric target, e.g. 1, means that inner index of this property, which is a set. More...
 
void Alias (string name, ValueAxis axis, params int[] target)
 Adds an alias for the given CSS property to the given target. A numeric target, e.g. 1, means that inner index of this property, which is a set. More...
 
- Static Package Attributes inherited from Css.CssProperty
static Css.Value NONE =new Css.Keywords.None()
 Shared default values. More...
 
static Css.Value ZERO =new Css.Units.DecimalUnit(0)
 
static Css.Value AUTO =new Css.Keywords.Auto()
 

Constructor & Destructor Documentation

Css.CssPropertyAlias.CssPropertyAlias ( )
inline
Css.CssPropertyAlias.CssPropertyAlias ( CssProperty  target,
int[]  index 
)
inline

Member Function Documentation

override Css.Value Css.CssPropertyAlias.GetOrCreateValue ( Node  context,
Style  styleBlock,
bool  allowInherit,
out Css.Value  hostValue 
)
inlinevirtual

Called to get a this properties value from the given style. This exists as it may be an alias property.

Parameters
hostValueThis can return aliased values. The 'host' value is the actual property. Think the value of 'margin' (host) when calling GetValue on 'margin-left' (returned).

Reimplemented from Css.CssProperty.

override Css.Value Css.CssPropertyAlias.GetValue ( Style  styleBlock)
inlinevirtual

Called to get a this properties value from the given style. This exists as it may be an alias property.

Reimplemented from Css.CssProperty.

override void Css.CssPropertyAlias.OnReadValue ( Style  styleBlock,
Css.Value  value 
)
inlinevirtual
virtual int Css.CssPropertyAlias.RemapIndex ( Css.Style  style)
inlinevirtual

Used to map a logical index to a physical one.

Reimplemented in Css.DirectionAwareProperty.

Member Data Documentation

int [] Css.CssPropertyAlias.Index

Inner indices used to map the alias property, e.g. index 0 of border-radius.

CssProperty Css.CssPropertyAlias.Target

The property that this alias maps to.

Property Documentation

override bool Css.CssPropertyAlias.NonStandard
get

True if this property is specific to Spark.