Holds a set of css style properties.
Public Member Functions | |
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 void | OnChanged (CssProperty property, Value newValue) |
called when the named property changes. 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 | |
Element | Element |
The element that this style belongs to, if any. More... | |
Dictionary< CssProperty, Value > | Properties =new Dictionary<CssProperty,Value>() |
The mapping of css property (e.g. display) to value ("none" as a PowerUI.Css.Value). More... | |
Static Public Attributes | |
static char[] | Delimiter =new char[]{':'} |
The delimiter that seperates the property name from its value in css. More... | |
Properties | |
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 | Set (string cssProperty, string value, int innerIndex, bool important) |
Sets the named property on this style to the given value. An inner value may be set; For example, setting the red component of color-overlay (color-overlay-r) becomes color-overlay and an innerIndex of 0. More... | |
|
inline |
Creates a new style for the given element.
element | The element this style is for. |
|
inline |
Creates a new, empty style definition.
|
inline |
Creates a new style with the given css text string seperated by semicolons.
text | A css text string to apply to this style. |
|
inline |
Gets the value of the given property, if any.
cssProperty | The property to get the value of, e.g. "display". |
|
inlinevirtual |
Gets the computed form of this style.
Reimplemented in PowerUI.Css.ElementStyle.
|
inline |
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.
|
inlinevirtual |
Gets the given property as a css string. May optionally read the given inner index of it as a css string.
property | The property to get as a string. |
innerIndex | The inner value to get from the property. -1 for the whole property. |
Reimplemented in PowerUI.Css.ElementStyle.
|
inlinevirtual |
Gets the given property as a css string.
property | The property to get as a string. |
Reimplemented in PowerUI.Css.ElementStyle.
|
inlinevirtual |
called when the named property changes.
property | The property that changed. |
newValue | It's new fully parsed value. May be null. |
Reimplemented in PowerUI.Css.SelectorStyle, and PowerUI.Css.ElementStyle.
|
inline |
Sets the named property on this style to the given value.
property | The property to set or overwrite. e.g. "display". |
value | The value to set the property to, e.g. "none". |
|
inlineprivate |
Sets the named property on this style to the given value. An inner value may be set; For example, setting the red component of color-overlay (color-overlay-r) becomes color-overlay and an innerIndex of 0.
property | The property to set or overwrite. e.g. "display". |
value | The value to set the property to, e.g. "none". |
innerIndex | The index of the inner value to set, if any. -1 to set the whole property. |
|
inline |
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.
property | The property to set the value of. |
value | The new value for the property. |
|
static |
The delimiter that seperates the property name from its value in css.
Element PowerUI.Css.Style.Element |
The element that this style belongs to, if any.
Dictionary<CssProperty,Value> PowerUI.Css.Style.Properties =new Dictionary<CssProperty,Value>() |
The mapping of css property (e.g. display) to value ("none" as a PowerUI.Css.Value).
|
set |
Sets the css text of this style as a css string seperated by semicolons (;).
|
getset |
Gets or sets the parsed value of this style by property name.
property | The property to get the value for. |
|
getset |
Gets or sets the parsed value of this style by property name.
property | The property to get the value for. |