Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/SharpVectorCore/Css/ICssStyleDeclaration.cs @ 13067

Last change on this file since 13067 was 12762, checked in by aballeit, 9 years ago

#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)

File size: 4.8 KB
Line 
1// <developer>niklas@protocol7.com</developer>
2// <completed>60</completed> 
3
4using System;
5
6namespace SharpVectors.Dom.Css
7{
8  /// <summary>
9  /// The CSSStyleDeclaration interface represents a single CSS
10  /// declaration block. This interface may be used to determine
11  /// the style properties currently set in a block or to set
12  /// style properties explicitly within the block.
13  /// </summary>
14  public interface ICssStyleDeclaration
15  {
16    /// <summary>
17    /// Used to set a property value and priority within this declaration block.
18    /// </summary>
19    /// <param name="propertyName">The name of the CSS property. See the CSS property index.</param>
20    /// <param name="value">The new value of the property.</param>
21    /// <param name="priority">The new priority of the property (e.g. "important").</param>
22    /// <exception cref="DomException">SYNTAX_ERR: Raised if the specified value has a syntax error and is unparsable.</exception>
23    /// <exception cref="DomException">NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly or the property is readonly.</exception>
24    void SetProperty(string propertyName, string value, string priority);
25 
26    /// <summary>
27    /// Used to retrieve the priority of a CSS property (e.g. the "important" qualifier) if the property has been explicitly set in this declaration block.
28    /// </summary>
29    /// <param name="propertyName">The name of the CSS property. See the CSS property index.</param>
30    /// <returns>A string representing the priority (e.g. "important") if one exists. The empty string if none exists.</returns>
31    string GetPropertyPriority(string propertyName);
32 
33    /// <summary>
34    /// Used to remove a CSS property if it has been explicitly set within this declaration block.
35    /// </summary>
36    /// <param name="propertyName">The name of the CSS property. See the CSS property index.</param>
37    /// <returns>Returns the value of the property if it has been explicitly set for this declaration block. Returns the empty string if the property has not been set or the property name does not correspond to a known CSS property.</returns>
38    /// <exception cref="DomException">NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly or the property is readonly.</exception>
39    string RemoveProperty(string propertyName);
40 
41    /// <summary>
42    /// Used to retrieve the object representation of the value of a CSS property if it has been explicitly set within this declaration block. This method returns null if the property is a shorthand property. Shorthand property values can only be accessed and modified as strings, using the getPropertyValue and setProperty methods.
43    /// </summary>
44    /// <param name="propertyName">The name of the CSS property. See the CSS property index.</param>
45    /// <returns>Returns the value of the property if it has been explicitly set for this declaration block. Returns null if the property has not been set.</returns>
46    ICssValue GetPropertyCssValue(string propertyName);
47 
48    /// <summary>
49    /// Used to retrieve the value of a CSS property if it has been explicitly set within this declaration block.
50    /// </summary>
51    /// <param name="propertyName">The name of the CSS property. See the CSS property index.</param>
52    /// <returns>Returns the value of the property if it has been explicitly set for this declaration block. Returns the empty string if the property has not been set.</returns>
53    string GetPropertyValue(string propertyName);
54 
55    /// <summary>
56    /// The CSS rule that contains this declaration block or null if this CSSStyleDeclaration is not attached to a CSSRule.
57    /// </summary>
58    ICssRule ParentRule
59    {
60      get;
61    }
62 
63    /// <summary>
64    /// The number of properties that have been explicitly set in this declaration block. The range of valid indices is 0 to length-1 inclusive.
65    /// </summary>
66    ulong Length
67    {
68      get;
69    }
70 
71    /// <summary>
72    /// The parsable textual representation of the declaration block (excluding the surrounding curly braces). Setting this attribute will result in the parsing of the new value and resetting of all the properties in the declaration block including the removal or addition of properties.
73    /// </summary>
74    /// <exception cref="DomException">SYNTAX_ERR: Raised if the specified CSS string value has a syntax error and is unparsable.</exception>
75    /// <exception cref="DomException">NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly or a property is readonly.</exception>
76    string CssText
77    {
78      get;
79      set;
80    }
81
82    /// <summary>
83    /// Used to retrieve the properties that have been explicitly set in this declaration block. The order of the properties retrieved using this method does not have to be the order in which they were set. This method can be used to iterate over all properties in this declaration block.
84    /// </summary>
85    string this[ulong index]
86    {
87      get;
88    }
89  }
90}
Note: See TracBrowser for help on using the repository browser.