Detailed Description

Holds a block of css properties for a given selector (e.g. .name and #name are selectors).

Inheritance diagram for PowerUI.Css.SelectorStyle:
PowerUI.Css.Style

Public Member Functions

 SelectorStyle (StyleSheet sheet, string selector, string modifier)
 Creates a new selector style containing the given css property string. More...
 
override void OnChanged (CssProperty property, Value newValue)
 Called when somebody dynamically updates a stylesheet. Currently does nothing. More...
 
void OnLoaded ()
 Called when this style is done loading. More...
 
void BakeToModifiers ()
 
void CopyTo (SelectorStyle otherStyle, bool overwrite)
 Copies this objects properties to the other given style, overwriting existing properties if told to do so. More...
 
override string ToString ()
 Converts this selector to a css formatted string. More...
 
- Public Member Functions inherited from PowerUI.Css.Style
 Style (Element element)
 Creates a new style for the given element. More...
 
 Style ()
 Creates a new, empty style definition. More...
 
 Style (string text)
 Creates a new style with the given css text string seperated by semicolons. More...
 
void SetDirect (string property, string value)
 Directly sets the named property to the given value. Note that this does not refresh the style onscreen in anyway - it simply writes the new property value. Internal to the layout engine only. More...
 
Value Get (string cssProperty)
 Gets the value of the given property, if any. More...
 
void Set (string property, string value)
 Sets the named property on this style to the given value. More...
 
virtual ComputedStyle GetComputed ()
 Gets the computed form of this style. More...
 
Css.Value GetRawValue (CssProperty property, ValueType type)
 Gets or creates the base value for the given property. The base value is essentially the value held directly in this style sheet. E.g. if the value you're setting is the R channel of color-overlay, this sets up the color-overlay value for you. More...
 
virtual string GetString (string cssProperty, int innerIndex)
 Gets the given property as a css string. May optionally read the given inner index of it as a css string. More...
 
virtual string GetString (string cssProperty)
 Gets the given property as a css string. More...
 

Public Attributes

StyleSheet Sheet
 The sheet this style belongs to. More...
 
string Modifier
 This may be a 'something:hover' selector, in which case the modifier is 'hover'. Null otherwise. More...
 
string Selector
 The full selector, e.g. 'something:hover'. More...
 
Document Document
 The document that this selector style belongs to. More...
 
string BaseSelector
 The full selector without the modifier. If the full selector is 'div:hover', this is just 'div'. More...
 
- Public Attributes inherited from PowerUI.Css.Style
Element Element
 The element that this style belongs to, if any. More...
 
Dictionary< CssProperty, ValueProperties =new Dictionary<CssProperty,Value>()
 The mapping of css property (e.g. display) to value ("none" as a PowerUI.Css.Value). More...
 

Properties

Css.SelectorType SelectorType [get]
 Gets the type of element that this selector affects. More...
 
bool Unmodified [get]
 Does this selector have a :modifier or not? More...
 
- Properties inherited from PowerUI.Css.Style
string cssText [set]
 Sets the css text of this style as a css string seperated by semicolons (;). More...
 
Value this[string cssProperty] [get, set]
 Gets or sets the parsed value of this style by property name. More...
 
Value this[CssProperty property] [get, set]
 Gets or sets the parsed value of this style by property name. More...
 

Private Member Functions

void FontFaceReady (DataPackage font)
 

Additional Inherited Members

- Static Public Attributes inherited from PowerUI.Css.Style
static char[] Delimiter =new char[]{':'}
 The delimiter that seperates the property name from its value in css. More...
 

Constructor & Destructor Documentation

PowerUI.Css.SelectorStyle.SelectorStyle ( StyleSheet  sheet,
string  selector,
string  modifier 
)
inline

Creates a new selector style containing the given css property string.

Parameters
sheetThe stylesheet this style belongs to.
selectorThe selector that defines which elements the properties will affect.
modifierThe :modifier for this selector.

Member Function Documentation

void PowerUI.Css.SelectorStyle.BakeToModifiers ( )
inline
void PowerUI.Css.SelectorStyle.CopyTo ( SelectorStyle  otherStyle,
bool  overwrite 
)
inline

Copies this objects properties to the other given style, overwriting existing properties if told to do so.

Parameters
otherStyleThe style to copy this objects properties into.
overwriteTrue if existing properties should be overwriten.
void PowerUI.Css.SelectorStyle.FontFaceReady ( DataPackage  font)
inlineprivate
override void PowerUI.Css.SelectorStyle.OnChanged ( CssProperty  property,
Value  newValue 
)
inlinevirtual

Called when somebody dynamically updates a stylesheet. Currently does nothing.

Reimplemented from PowerUI.Css.Style.

void PowerUI.Css.SelectorStyle.OnLoaded ( )
inline

Called when this style is done loading.

override string PowerUI.Css.SelectorStyle.ToString ( )
inline

Converts this selector to a css formatted string.

Member Data Documentation

string PowerUI.Css.SelectorStyle.BaseSelector

The full selector without the modifier. If the full selector is 'div:hover', this is just 'div'.

Document PowerUI.Css.SelectorStyle.Document

The document that this selector style belongs to.

string PowerUI.Css.SelectorStyle.Modifier

This may be a 'something:hover' selector, in which case the modifier is 'hover'. Null otherwise.

string PowerUI.Css.SelectorStyle.Selector

The full selector, e.g. 'something:hover'.

StyleSheet PowerUI.Css.SelectorStyle.Sheet

The sheet this style belongs to.

Property Documentation

Css.SelectorType PowerUI.Css.SelectorStyle.SelectorType
get

Gets the type of element that this selector affects.

bool PowerUI.Css.SelectorStyle.Unmodified
get

Does this selector have a :modifier or not?