summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 76e0437)
raw | patch | inline | side by side (parent: 76e0437)
author | ishmal <ishmal@users.sourceforge.net> | |
Fri, 25 Apr 2008 16:43:37 +0000 (16:43 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Fri, 25 Apr 2008 16:43:37 +0000 (16:43 +0000) |
src/dom/css.h | patch | blob | history | |
src/dom/smil.h | patch | blob | history | |
src/dom/stylesheets.h | patch | blob | history |
diff --git a/src/dom/css.h b/src/dom/css.h
index aaefeb9ba29c8b07db9a8440e9684d8196611cbe..e0e9c09ec3948cd7c3f8b5ea1f93ae3a65c0578e 100644 (file)
--- a/src/dom/css.h
+++ b/src/dom/css.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2008 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * =======================================================================
+ * NOTES
+ *
+ * Views, Stylesheets and CSS are DOM Level 2 for the purposes of supporting
+ * SVG. Be prepared in the future when they make Level 3 and SVG is likewise
+ * updated. The API here and many of the comments come from this document:
+ * http://www.w3.org/TR/DOM-Level-2-Style/css.html
+
*/
#ifndef __CSS_H__
#########################################################################*/
/**
- *
+ * The CSSRule interface is the abstract base interface for any type of CSS
+ * statement. This includes both rule sets and at-rules. An implementation is
+ * expected to preserve all rules specified in a CSS style sheet, even if the
+ * rule is not recognized by the parser. Unrecognized rules are represented using
+ * the CSSUnknownRule interface.
*/
class CSSRule
{
public:
+ /**
+ * An integer indicating which type of rule this is.
+ */
typedef enum
{
UNKNOWN_RULE = 0,
/**
- *
+ * The type of the rule, as defined above. The expectation is that
+ * binding-specific casting methods can be used to cast down from an instance of
+ * the CSSRule interface to the specific derived interface implied by the type.
*/
virtual unsigned short getType()
{
}
/**
- *
+ * The parsable textual representation of the rule. This reflects the current
+ * state of the rule and not its initial value.
*/
virtual DOMString getCssText()
{
}
/**
- *
+ * The parsable textual representation of the rule. This reflects the current
+ * state of the rule and not its initial value.
+ * Note that setting involves reparsing.
*/
virtual void setCssText(const DOMString &val) throw (dom::DOMException)
{
}
/**
- *
+ * The style sheet that contains this rule.
*/
virtual CSSStyleSheet *getParentStyleSheet()
{
}
/**
- *
+ * If this rule is contained inside another rule (e.g. a style rule inside an
+ * @media block), this is the containing rule. If this rule is not nested inside
+ * any other rules, this returns null.
*/
virtual CSSRule *getParentRule()
{
*
*/
CSSRule(const CSSRule &other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ CSSRule &operator=(const CSSRule &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const CSSRule &other)
{
type = other.type;
cssText = other.cssText;
#########################################################################*/
/**
- *
+ * The CSSRuleList interface provides the abstraction of an ordered collection of
+ * CSS rules.
+ *
+ * The items in the CSSRuleList are accessible via an integral index, starting
+ * from 0.
*/
class CSSRuleList
{
public:
/**
- *
+ * The number of CSSRules in the list. The range of valid child rule indices is 0
+ * to length-1 inclusive.
*/
virtual unsigned long getLength()
{
}
/**
- *
+ * Used to retrieve a CSS rule by ordinal index. The order in this collection
+ * represents the order of the rules in the CSS style sheet. If index is greater
+ * than or equal to the number of rules in the list, this returns null.
*/
virtual CSSRule item(unsigned long index)
{
rules = other.rules;
}
+ /**
+ *
+ */
+ CSSRuleList &operator=(const CSSRuleList &other)
+ {
+ rules = other.rules;
+ return *this;
+ }
+
/**
*
*/
#########################################################################*/
/**
- *
+ * The CSSStyleSheet interface is a concrete interface used to represent a CSS
+ * style sheet i.e., a style sheet whose content type is "text/css".
*/
class CSSStyleSheet : virtual public stylesheets::StyleSheet
{
public:
/**
- *
+ * If this style sheet comes from an @import rule, the ownerRule attribute will
+ * contain the CSSImportRule. In that case, the ownerNode attribute in the
+ * StyleSheet interface will be null. If the style sheet comes from an element or
+ * a processing instruction, the ownerRule attribute will be null and the
+ * ownerNode attribute will contain the Node.
*/
virtual CSSRule *getOwnerRule()
{
}
/**
- *
+ * The list of all CSS rules contained within the style sheet. This
+ * includes both rule sets and at-rules.
*/
virtual CSSRuleList getCssRules()
{
}
/**
- *
+ * Used to insert a new rule into the style sheet. The new rule now
+ * becomes part of the cascade.
*/
virtual unsigned long insertRule(const DOMString &/*ruleStr*/,
unsigned long index)
}
/**
- *
+ * Used to delete a rule from the style sheet.
*/
virtual void deleteRule(unsigned long index)
throw (dom::DOMException)
CSSStyleSheet(const CSSStyleSheet &other) :
stylesheets::StyleSheet(other)
{
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ CSSStyleSheet &operator=(const CSSStyleSheet &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const CSSStyleSheet &other)
+ {
ownerRule = other.ownerRule;
rules = other.rules;
}
#########################################################################*/
/**
- *
+ * The CSSValue interface represents a simple or a complex value. A CSSValue
+ * object only occurs in a context of a CSS property.
*/
class CSSValue
{
public:
/**
- * UnitTypes
+ * An integer indicating which type of unit applies to the value.
*/
- enum
+ typedef enum
{
CSS_INHERIT = 0,
CSS_PRIMITIVE_VALUE = 1,
CSS_VALUE_LIST = 2,
CSS_CUSTOM = 3
- };
+ } UnitTypes;
/**
- *
+ * A code defining the type of the value as defined above.
*/
- virtual DOMString getCssText()
+ virtual unsigned short getCssValueType()
{
- return cssText;
+ return valueType;
}
/**
- *
+ * A string representation of the current value.
*/
- virtual void setCssText(const DOMString &val)
- throw (dom::DOMException)
+ virtual DOMString getCssText()
{
- cssText = val;
+ return cssText;
}
/**
- *
+ * A string representation of the current value.
+ * Note that setting implies parsing.
*/
- virtual unsigned short getCssValueType()
+ virtual void setCssText(const DOMString &val)
+ throw (dom::DOMException)
{
- return valueType;
+ cssText = val;
}
//##################
*
*/
CSSValue(const CSSValue &other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ CSSValue &operator=(const CSSValue &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const CSSValue &other)
{
cssText = other.cssText;
valueType = other.valueType;
## CSSStyleDeclaration
#########################################################################*/
-class CSSStyleDeclarationEntry
-{
-public:
- CSSStyleDeclarationEntry(const DOMString &nameArg,
- const DOMString &valueArg,
- const DOMString &prioArg)
- {
- name = nameArg;
- value = valueArg;
- prio = prioArg;
- }
- virtual ~CSSStyleDeclarationEntry(){}
- DOMString name;
- DOMString value;
- DOMString prio;
-};
-
-
-
/**
- *
+ * The CSSStyleDeclaration interface represents a single CSS declaration block.
+ * This interface may be used to determine the style properties currently set in
+ * a block or to set style properties explicitly within the block.
+ *
+ * While an implementation may not recognize all CSS properties within a CSS
+ * declaration block, it is expected to provide access to all specified
+ * properties in the style sheet through the CSSStyleDeclaration interface.
+ * Furthermore, implementations that support a specific level of CSS should
+ * correctly handle CSS shorthand properties for that level. For a further
+ * discussion of shorthand properties, see the CSS2Properties interface.
+ *
+ * This interface is also used to provide a read-only access to the computed
+ * values of an element. See also the ViewCSS interface.
+ *
+ * Note: The CSS Object Model doesn't provide an access to the specified or
+ * actual values of the CSS cascade.
*/
class CSSStyleDeclaration
{
+private:
+
+ class CSSStyleDeclarationEntry
+ {
+ public:
+ CSSStyleDeclarationEntry(const DOMString &nameArg,
+ const DOMString &valueArg,
+ const DOMString &prioArg)
+ {
+ name = nameArg;
+ value = valueArg;
+ prio = prioArg;
+ }
+ virtual ~CSSStyleDeclarationEntry(){}
+ DOMString name;
+ DOMString value;
+ DOMString prio;
+ };
+
+
public:
/**
- *
+ * The parsable textual representation of the declaration block (excluding the
+ * surrounding curly braces).
*/
virtual DOMString getCssText()
{
}
/**
- *
+ * 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.
*/
virtual void setCssText(const DOMString &val)
throw (dom::DOMException)
}
/**
- *
+ * Used to retrieve the value of a CSS property if it has been explicitly
+ * set within this declaration block.
*/
virtual DOMString getPropertyValue(const DOMString &propertyName)
{
}
/**
- *
+ * 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.
*/
virtual CSSValue getPropertyCSSValue(const DOMString &/*propertyName*/)
{
}
/**
- *
+ * Used to remove a CSS property if it has been explicitly set within
+ * this declaration block.
*/
virtual DOMString removeProperty(const DOMString &propertyName)
throw (dom::DOMException)
}
/**
- *
+ * 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.
*/
virtual DOMString getPropertyPriority(const DOMString &propertyName)
{
}
/**
- *
+ * Used to set a property value and priority within this declaration block.
*/
virtual void setProperty(const DOMString &propertyName,
const DOMString &value,
}
/**
- *
+ * The number of properties that have been explicitly set in this declaration
+ * block. The range of valid indices is 0 to length-1 inclusive.
*/
virtual unsigned long getLength()
{
}
/**
- *
+ * 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.
*/
virtual DOMString item(unsigned long index)
{
}
/**
- *
+ * The CSS rule that contains this declaration block or null if this
+ * CSSStyleDeclaration is not attached to a CSSRule.
*/
virtual CSSRule *getParentRule()
{
/**
*
*/
- CSSStyleDeclaration(const CSSStyleDeclaration &/*other*/)
+ CSSStyleDeclaration(const CSSStyleDeclaration &other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ CSSStyleDeclaration &operator=(const CSSStyleDeclaration &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const CSSStyleDeclaration &other)
{
+ parentRule = other.parentRule;
+ cssText = other.cssText;
+ items = other.items;
}
/**
#########################################################################*/
/**
- *
+ * The CSSStyleRule interface represents a single rule set in a CSS style sheet.
*/
class CSSStyleRule : virtual public CSSRule
{
public:
/**
- *
+ * The textual representation of the selector for the rule set. The
+ * implementation may have stripped out insignificant whitespace while parsing
+ * the selector.
*/
virtual DOMString getSelectorText()
{
}
/**
- *
+ * The textual representation of the selector for the rule set. The
+ * implementation may have stripped out insignificant whitespace while parsing
+ * the selector. Setting implies reparsing.
*/
virtual void setSelectorText(const DOMString &val)
throw (dom::DOMException)
/**
- *
+ * The declaration-block of this rule set.
*/
virtual CSSStyleDeclaration &getStyle()
{
*
*/
CSSStyleRule(const CSSStyleRule &other) : CSSRule(other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ CSSStyleRule &operator=(const CSSStyleRule &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const CSSStyleRule &other)
{
selectorText = other.selectorText;
style = other.style;
#########################################################################*/
/**
- *
+ * The CSSMediaRule interface represents a @media rule in a CSS style sheet. A
+ * @media rule can be used to delimit style rules for specific media types.
*/
class CSSMediaRule : virtual public CSSRule
{
public:
/**
- *
+ * A list of media types for this rule.
*/
virtual stylesheets::MediaList getMedia()
{
}
/**
- *
+ * A list of all CSS rules contained within the media block.
*/
virtual CSSRuleList getCssRules()
{
}
/**
- *
+ * Used to insert a new rule into the media block.
*/
virtual unsigned long insertRule(const DOMString &/*ruleStr*/,
unsigned long index)
}
/**
- *
+ * Used to delete a rule from the media block.
*/
virtual void deleteRule(unsigned long index)
throw(dom::DOMException)
*
*/
CSSMediaRule(const CSSMediaRule &other) : CSSRule(other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ CSSMediaRule &operator=(const CSSMediaRule &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const CSSMediaRule &other)
{
mediaList = other.mediaList;
cssRules = other.cssRules;
#########################################################################*/
/**
- *
+ * The CSSFontFaceRule interface represents a @font-face rule in a CSS style
+ * sheet. The @font-face rule is used to hold a set of font descriptions.
*/
class CSSFontFaceRule : virtual public CSSRule
{
public:
/**
- *
+ * The declaration-block of this rule.
*/
virtual CSSStyleDeclaration getStyle()
{
style = other.style;
}
+ /**
+ *
+ */
+ CSSFontFaceRule &operator=(const CSSFontFaceRule &other)
+ {
+ style = other.style;
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const CSSFontFaceRule &other)
+ {
+ style = other.style;
+ }
+
/**
*
*/
#########################################################################*/
/**
- *
+ * The CSSPageRule interface represents a @page rule within a CSS style sheet.
+ * The @page rule is used to specify the dimensions, orientation, margins, etc.
+ * of a page box for paged media.
*/
class CSSPageRule : virtual public CSSRule
{
public:
/**
- *
+ * The parsable textual representation of the page selector for the rule.
*/
virtual DOMString getSelectorText()
{
}
/**
- *
+ * The parsable textual representation of the page selector for the rule.
+ * Setting implies parsing.
*/
virtual void setSelectorText(const DOMString &val)
throw(dom::DOMException)
/**
- *
+ * The declaration-block of this rule.
*/
virtual CSSStyleDeclaration getStyle()
{
*
*/
CSSPageRule(const CSSPageRule &other) : CSSRule(other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ CSSPageRule &operator=(const CSSPageRule &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const CSSPageRule &other)
{
selectorText = other.selectorText;
style = other.style;
#########################################################################*/
/**
- *
+ * The CSSImportRule interface represents a @import rule within a CSS style
+ * sheet. The @import rule is used to import style rules from other style sheets.
*/
class CSSImportRule : virtual public CSSRule
{
public:
/**
- *
+ * The location of the style sheet to be imported. The attribute will not contain
+ * the "url(...)" specifier around the URI.
*/
virtual DOMString getHref()
{
}
/**
- *
+ * A list of media types for which this style sheet may be used.
*/
virtual stylesheets::MediaList getMedia()
{
}
/**
- *
+ * The style sheet referred to by this rule, if it has been loaded. The value of
+ * this attribute is null if the style sheet has not yet been loaded or if it
+ * will not be loaded (e.g. if the style sheet is for a media type not supported
+ * by the user agent).
*/
virtual CSSStyleSheet getStyleSheet()
{
*
*/
CSSImportRule(const CSSImportRule &other) : CSSRule(other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ CSSImportRule &operator=(const CSSImportRule &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const CSSImportRule &other)
{
mediaList = other.mediaList;
styleSheet = other.styleSheet;
#########################################################################*/
/**
- *
+ * The CSSCharsetRule interface represents a @charset rule in a CSS style sheet.
+ * The value of the encoding attribute does not affect the encoding of text data
+ * in the DOM objects; this encoding is always UTF-16. After a stylesheet is
+ * loaded, the value of the encoding attribute is the value found in the @charset
+ * rule. If there was no @charset in the original document, then no
+ * CSSCharsetRule is created. The value of the encoding attribute may also be
+ * used as a hint for the encoding used on serialization of the style sheet.
+ *
+ * The value of the @charset rule (and therefore of the CSSCharsetRule) may not
+ * correspond to the encoding the document actually came in; character encoding
+ * information e.g. in an HTTP header, has priority (see CSS document
+ * representation) but this is not reflected in the CSSCharsetRule.
*/
class CSSCharsetRule : virtual public CSSRule
{
public:
/**
- *
+ * The encoding information used in this @charset rule.
*/
virtual DOMString getEncoding()
{
}
/**
- *
+ * The encoding information used in this @charset rule.
+ * Setting implies parsing.
*/
virtual void setEncoding(const DOMString &val) throw (dom::DOMException)
{
encoding = other.encoding;
}
+ /**
+ *
+ */
+ CSSCharsetRule &operator=(const CSSCharsetRule &other)
+ {
+ encoding = other.encoding;
+ return *this;
+ }
+
/**
*
*/
#########################################################################*/
/**
- *
+ * The CSSUnknownRule interface represents an at-rule not supported by
+ * this user agent.
*/
class CSSUnknownRule : virtual public CSSRule
{
{
}
+ /**
+ *
+ */
+ CSSUnknownRule &operator=(const CSSUnknownRule &/*other*/)
+ {
+ return *this;
+ }
+
/**
*
*/
#########################################################################*/
/**
- *
+ * The CSSValueList interface provides the abstraction of an ordered collection
+ * of CSS values.
+ *
+ * Some properties allow an empty list into their syntax. In that case, these
+ * properties take the none identifier. So, an empty list means that the property
+ * has the value none.
+ *
+ * The items in the CSSValueList are accessible via an integral index, starting
+ * from 0.
*/
class CSSValueList : virtual public CSSValue
{
public:
/**
- *
+ * The number of CSSValues in the list. The range of valid values of the indices
+ * is 0 to length-1 inclusive.
*/
virtual unsigned long getLength()
{
}
/**
- *
+ * Used to retrieve a CSSValue by ordinal index. The order in this collection
+ * represents the order of the values in the CSS style property. If index is
+ * greater than or equal to the number of values in the list, this returns null.
*/
virtual CSSValue item(unsigned long index)
{
return items[index];
}
+
//##################
//# Non-API methods
//##################
items = other.items;
}
+ /**
+ *
+ */
+ CSSValueList &operator=(const CSSValueList &other)
+ {
+ items = other.items;
+ return *this;
+ }
+
/**
*
*/
#########################################################################*/
/**
- *
+ * The CSSPrimitiveValue interface represents a single CSS value. This interface
+ * may be used to determine the value of a specific style property currently set
+ * in a block or to set a specific style property explicitly within the block. An
+ * instance of this interface might be obtained from the getPropertyCSSValue
+ * method of the CSSStyleDeclaration interface. A CSSPrimitiveValue object only
+ * occurs in a context of a CSS property.
+ *
+ * Conversions are allowed between absolute values (from millimeters to
+ * centimeters, from degrees to radians, and so on) but not between relative
+ * values. (For example, a pixel value cannot be converted to a centimeter value.)
+ * Percentage values can't be converted since they are relative to the parent
+ * value (or another property value). There is one exception for color percentage
+ * values: since a color percentage value is relative to the range 0-255, a color
+ * percentage value can be converted to a number; (see also the RGBColor
+ * interface).
*/
class CSSPrimitiveValue : virtual public CSSValue
{
public:
/**
- * UnitTypes
+ *An integer indicating which type of unit applies to the value.
*/
- enum
+ typedef enum
{
CSS_UNKNOWN = 0,
CSS_NUMBER = 1,
CSS_COUNTER = 23,
CSS_RECT = 24,
CSS_RGBCOLOR = 25
- };
+ } UnitTypes;
/**
- *
+ * The type of the value as defined by the constants specified above.
*/
virtual unsigned short getPrimitiveType()
{
}
/**
- *
+ * A method to set the float value with a specified unit. If the property
+ * attached with this value can not accept the specified unit or the float value,
+ * the value will be unchanged and a DOMException will be raised.
*/
virtual void setFloatValue(unsigned short unitType,
double doubleValueArg)
primitiveType = unitType;
doubleValue = doubleValueArg;
}
+
/**
- *
+ * This method is used to get a float value in a specified unit. If this CSS
+ * value doesn't contain a float value or can't be converted into the specified
+ * unit, a DOMException is raised.
*/
virtual double getFloatValue(unsigned short /*unitType*/)
throw (dom::DOMException)
}
/**
- *
+ * A method to set the string value with the specified unit. If the property
+ * attached to this value can't accept the specified unit or the string value,
+ * the value will be unchanged and a DOMException will be raised.
*/
virtual void setStringValue(unsigned short /*stringType*/,
const DOMString &stringValueArg)
}
/**
- *
+ * This method is used to get the string value. If the CSS value doesn't contain
+ * a string value, a DOMException is raised.
+ *
+ * Note: Some properties (like 'font-family' or 'voice-family') convert a
+ * whitespace separated list of idents to a string.
*/
virtual DOMString getStringValue() throw (dom::DOMException)
{
}
/**
- *
+ * This method is used to get the Counter value. If this CSS value doesn't
+ * contain a counter value, a DOMException is raised. Modification to the
+ * corresponding style property can be achieved using the Counter interface.
*/
virtual Counter *getCounterValue() throw (dom::DOMException)
{
}
/**
- *
+ * This method is used to get the Rect value. If this CSS value doesn't contain a
+ * rect value, a DOMException is raised. Modification to the corresponding style
+ * property can be achieved using the Rect interface.
*/
virtual Rect *getRectValue() throw (dom::DOMException)
{
}
/**
- *
+ * This method is used to get the RGB color. If this CSS value doesn't contain a
+ * RGB color value, a DOMException is raised. Modification to the corresponding
+ * style property can be achieved using the RGBColor interface.
*/
virtual RGBColor *getRGBColorValue() throw (dom::DOMException)
{
{
}
+ /**
+ *
+ */
+ CSSPrimitiveValue &operator=(const CSSPrimitiveValue &/*other*/)
+ {
+ return *this;
+ }
+
/**
*
*/
#########################################################################*/
/**
- *
+ * The RGBColor interface is used to represent any RGB color value. This
+ * interface reflects the values in the underlying style property. Hence,
+ * modifications made to the CSSPrimitiveValue objects modify the style property.
+ *
+ * A specified RGB color is not clipped (even if the number is outside the range
+ * 0-255 or 0%-100%). A computed RGB color is clipped depending on the device.
+ *
+ * Even if a style sheet can only contain an integer for a color value, the
+ * internal storage of this integer is a float, and this can be used as a float
+ * in the specified or the computed style.
+ *
+ * A color percentage value can always be converted to a number and vice versa.
*/
class RGBColor
{
public:
/**
- *
+ * This attribute is used for the red value of the RGB color.
*/
virtual CSSPrimitiveValue getRed()
{
}
/**
- *
+ * This attribute is used for the green value of the RGB color.
*/
virtual CSSPrimitiveValue getGreen()
{
}
/**
- *
+ * This attribute is used for the blue value of the RGB color.
*/
virtual CSSPrimitiveValue getBlue()
{
*
*/
RGBColor(const RGBColor &other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ RGBColor &operator=(const RGBColor &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const RGBColor &other)
{
red = other.red;
green = other.green;
#########################################################################*/
/**
- *
+ * The Rect interface is used to represent any rect value. This interface
+ * reflects the values in the underlying style property. Hence, modifications
+ * made to the CSSPrimitiveValue objects modify the style property.
*/
class Rect
{
public:
/**
- *
+ * This attribute is used for the top of the rect.
*/
virtual CSSPrimitiveValue getTop()
{
}
/**
- *
+ * This attribute is used for the right of the rect.
*/
virtual CSSPrimitiveValue getRight()
{
}
/**
- *
+ * This attribute is used for the bottom of the rect.
*/
virtual CSSPrimitiveValue getBottom()
{
}
/**
- *
+ * This attribute is used for the left of the rect.
*/
virtual CSSPrimitiveValue getLeft()
{
*
*/
Rect(const Rect &other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ Rect &operator=(const Rect &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const Rect &other)
{
top = other.top;
right = other.right;
#########################################################################*/
/**
- *
+ * The Counter interface is used to represent any counter or counters function
+ * value. This interface reflects the values in the underlying style property.
*/
class Counter
{
public:
/**
- *
+ * This attribute is used for the identifier of the counter.
*/
virtual DOMString getIdentifier()
{
}
/**
- *
+ * This attribute is used for the style of the list.
*/
virtual DOMString getListStyle()
{
}
/**
- *
+ * This attribute is used for the separator of the nested counters.
*/
virtual DOMString getSeparator()
{
*
*/
Counter(const Counter &other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ Counter &operator=(const Counter &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const Counter &other)
{
identifier = other.identifier;
listStyle = other.listStyle;
#########################################################################*/
/**
- *
+ * Inline style information attached to elements is exposed through the style
+ * attribute. This represents the contents of the STYLE attribute for HTML
+ * elements (or elements in other schemas or DTDs which use the STYLE attribute
+ * in the same way). The expectation is that an instance of the
+ * ElementCSSInlineStyle interface can be obtained by using binding-specific
+ * casting methods on an instance of the Element interface when the element
+ * supports inline CSS style informations.
*/
class ElementCSSInlineStyle
{
public:
/**
- *
+ * The style attribute.
*/
virtual CSSStyleDeclaration getStyle()
{
style = other.style;
}
+ /**
+ *
+ */
+ ElementCSSInlineStyle &operator=(const ElementCSSInlineStyle &other)
+ {
+ style = other.style;
+ return *this;
+ }
+
/**
*
*/
#########################################################################*/
/**
- *
- */
+ * The CSS2Properties interface represents a convenience mechanism for retrieving
+ * and setting properties within a CSSStyleDeclaration. The attributes of this
+ * interface correspond to all the properties specified in CSS2. Getting an
+ * attribute of this interface is equivalent to calling the getPropertyValue
+ * method of the CSSStyleDeclaration interface. Setting an attribute of this
+ * interface is equivalent to calling the setProperty method of the
+ * CSSStyleDeclaration interface.
+ *
+ * A conformant implementation of the CSS module is not required to implement the
+ * CSS2Properties interface. If an implementation does implement this interface,
+ * the expectation is that language-specific methods can be used to cast from an
+ * instance of the CSSStyleDeclaration interface to the CSS2Properties interface.
+ *
+ * If an implementation does implement this interface, it is expected to
+ * understand the specific syntax of the shorthand properties, and apply their
+ * semantics; when the margin property is set, for example, the marginTop,
+ * marginRight, marginBottom and marginLeft properties are actually being set by
+ * the underlying implementation.
+ *
+ * When dealing with CSS "shorthand" properties, the shorthand properties should
+ * be decomposed into their component longhand properties as appropriate, and
+ * when querying for their value, the form returned should be the shortest form
+ * exactly equivalent to the declarations made in the ruleset. However, if there
+ * is no shorthand declaration that could be added to the ruleset without
+ * changing in any way the rules already declared in the ruleset (i.e., by adding
+ * longhand rules that were previously not declared in the ruleset), then the
+ * empty string should be returned for the shorthand property.
+ *
+ * For example, querying for the font property should not return "normal normal
+ * normal 14pt/normal Arial, sans-serif", when "14pt Arial, sans-serif" suffices.
+ * (The normals are initial values, and are implied by use of the longhand
+ * property.)
+ *
+ * If the values for all the longhand properties that compose a particular string
+ * are the initial values, then a string consisting of all the initial values
+ * should be returned (e.g. a border-width value of "medium" should be returned
+ * as such, not as "").
+ *
+ * For some shorthand properties that take missing values from other sides, such
+ * as the margin, padding, and border-[width|style|color] properties, the minimum
+ * number of sides possible should be used; i.e., "0px 10px" will be returned
+ * instead of "0px 10px 0px 10px".
+ *
+ * If the value of a shorthand property can not be decomposed into its component
+ * longhand properties, as is the case for the font property with a value of
+ * "menu", querying for the values of the component longhand properties should
+ * return the empty string.
+ * */
class CSS2Properties
{
public:
*
*/
CSS2Properties(const CSS2Properties &other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ CSS2Properties &operator=(const CSS2Properties &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const CSS2Properties &other)
{
azimuth = other.azimuth;
background = other.background;
#########################################################################*/
/**
- *
+ * This interface represents a CSS view. The getComputedStyle method provides a
+ * read only access to the computed values of an element.
+ *
+ * The expectation is that an instance of the ViewCSS interface can be obtained
+ * by using binding-specific casting methods on an instance of the AbstractView
+ * interface.
+ *
+ * Since a computed style is related to an Element node, if this element is
+ * removed from the document, the associated CSSStyleDeclaration and CSSValue
+ * related to this declaration are no longer valid.
*/
class ViewCSS : virtual public views::AbstractView
{
public:
/**
- *
+ * This method is used to get the computed style as it is defined in [CSS2].
*/
virtual CSSStyleDeclaration getComputedStyle(const Element &/*elt*/,
const DOMString &/*pseudoElt*/)
{
}
+ /**
+ *
+ */
+ ViewCSS &operator=(const ViewCSS &/*other*/)
+ {
+ return *this;
+ }
+
/**
*
*/
#########################################################################*/
/**
- *
+ * This interface represents a document with a CSS view.
+ *
+ * The getOverrideStyle method provides a mechanism through which a DOM author
+ * could effect immediate change to the style of an element without modifying the
+ * explicitly linked style sheets of a document or the inline style of elements
+ * in the style sheets. This style sheet comes after the author style sheet in
+ * the cascade algorithm and is called override style sheet. The override style
+ * sheet takes precedence over author style sheets. An "!important" declaration
+ * still takes precedence over a normal declaration. Override, author, and user
+ * style sheets all may contain "!important" declarations. User "!important"
+ * rules take precedence over both override and author "!important" rules, and
+ * override "!important" rules take precedence over author "!important" rules.
+ *
+ * The expectation is that an instance of the DocumentCSS interface can be
+ * obtained by using binding-specific casting methods on an instance of the
+ * Document interface.
*/
class DocumentCSS : virtual public stylesheets::DocumentStyle
{
public:
/**
- *
+ * This method is used to retrieve the override style declaration for a specified
+ * element and a specified pseudo-element.
*/
virtual CSSStyleDeclaration getOverrideStyle(const Element */*elt*/,
const DOMString &/*pseudoElt*/)
{
}
+ /**
+ *
+ */
+ DocumentCSS &operator=(const DocumentCSS &/*other*/)
+ {
+ return *this;
+ }
+
/**
*
*/
#########################################################################*/
/**
- *
+ * This interface allows the DOM user to create a CSSStyleSheet outside the
+ * context of a document. There is no way to associate the new CSSStyleSheet with
+ * a document in DOM Level 2.
*/
class DOMImplementationCSS : virtual public DOMImplementation
{
public:
/**
- *
+ * Creates a new CSSStyleSheet.
*/
virtual CSSStyleSheet createCSSStyleSheet(const DOMString &/*title*/,
const DOMString &/*media*/)
{
}
+ /**
+ *
+ */
+ DOMImplementationCSS &operator=(const DOMImplementationCSS &/*other*/)
+ {
+ return *this;
+ }
+
/**
*
*/
} //namespace css
} //namespace dom
-} //namespace org
} //namespace w3c
+} //namespace org
-#endif // __CSS_H__
+#endif /* __CSS_H__ */
/*#########################################################################
## E N D O F F I L E
diff --git a/src/dom/smil.h b/src/dom/smil.h
index 70e1311a81c5666ab70a63a2a0385436f2ba308b..c9de6ccb73747ac8bea1bc4168297bc5eebcc107 100644 (file)
--- a/src/dom/smil.h
+++ b/src/dom/smil.h
*
*/
ElementLayout(const ElementLayout &other)
+ {
+ assign(other);
+ }
+
+ /**
+ *
+ */
+ ElementLayout &operator=(const ElementLayout &other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ /**
+ *
+ */
+ void assign(const ElementLayout &other)
{
title = other.title;
backgroundColor = other.backgroundColor;
{
}
+ /**
+ *
+ */
+ ElementTimeContainer &operator=(const ElementTimeContainer &/*other*/)
+ {
+ return *this;
+ }
+
/**
*
*/
{
}
+ /**
+ *
+ */
+ ElementTimeControl &operator=(const ElementTimeControl &/*other*/)
+ {
+ return *this;
+ }
+
/**
*
*/
diff --git a/src/dom/stylesheets.h b/src/dom/stylesheets.h
index 5fdc44f6444ea37b99362f52ce1bba9a66a1756c..0a96a61d7a4cb844d84e0dc9eacceb671d4c10e2 100644 (file)
--- a/src/dom/stylesheets.h
+++ b/src/dom/stylesheets.h
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2008 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
} //namespace org
-#endif // __STYLESHEETS_H__
+#endif /* __STYLESHEETS_H__ */
/*#########################################################################
## E N D O F F I L E
#########################################################################*/