Code

now that selection description includes style (filtered, clipped), we need to update...
[inkscape.git] / src / dom / css.h
1 /**
2  * Phoebe DOM Implementation.
3  *
4  * This is a C++ approximation of the W3C DOM model, which follows
5  * fairly closely the specifications in the various .idl files, copies of
6  * which are provided for reference.  Most important is this one:
7  *
8  * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
9  *
10  * Authors:
11  *   Bob Jamison
12  *
13  * Copyright (C) 2005-2008 Bob Jamison
14  *
15  *  This library is free software; you can redistribute it and/or
16  *  modify it under the terms of the GNU Lesser General Public
17  *  License as published by the Free Software Foundation; either
18  *  version 2.1 of the License, or (at your option) any later version.
19  *
20  *  This library is distributed in the hope that it will be useful,
21  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23  *  Lesser General Public License for more details.
24  *
25  *  You should have received a copy of the GNU Lesser General Public
26  *  License along with this library; if not, write to the Free Software
27  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
28  *  
29  * =======================================================================
30  * NOTES
31  * 
32  * Views, Stylesheets and CSS are DOM Level 2 for the purposes of supporting
33  * SVG.  Be prepared in the future when they make Level 3 and SVG is likewise
34  * updated.  The API here and many of the comments come from this document:
35  * http://www.w3.org/TR/DOM-Level-2-Style/css.html    
36      
37  */
39 #ifndef __CSS_H__
40 #define __CSS_H__
42 #include "dom.h"
43 #include "stylesheets.h"
44 #include "views.h"
46 #include <vector>
47 #include <map>
50 namespace org {
51 namespace w3c {
52 namespace dom {
53 namespace css {
58 //Make local definitions
59 typedef dom::DOMString DOMString;
60 typedef dom::Element Element;
61 typedef dom::DOMImplementation DOMImplementation;
63 //forward declarations
64 class CSSRule;
65 class CSSStyleSheet;
66 class CSSStyleDeclaration;
67 class CSSValue;
68 class Counter;
69 class Rect;
70 class RGBColor;
76 /*#########################################################################
77 ## CSSRule
78 #########################################################################*/
80 /**
81  * The CSSRule interface is the abstract base interface for any type of CSS 
82  * statement. This includes both rule sets and at-rules. An implementation is 
83  * expected to preserve all rules specified in a CSS style sheet, even if the 
84  * rule is not recognized by the parser. Unrecognized rules are represented using 
85  * the CSSUnknownRule interface.
86  */
87 class CSSRule
88 {
89 public:
91     /**
92      * An integer indicating which type of rule this is.
93      */      
94     typedef enum
95         {
96         UNKNOWN_RULE    = 0,
97         STYLE_RULE      = 1,
98         CHARSET_RULE    = 2,
99         IMPORT_RULE     = 3,
100         MEDIA_RULE      = 4,
101         FONT_FACE_RULE  = 5,
102         PAGE_RULE       = 6
103         } RuleType;
106     /**
107      * The type of the rule, as defined above. The expectation is that 
108      * binding-specific casting methods can be used to cast down from an instance of 
109      * the CSSRule interface to the specific derived interface implied by the type.
110      */
111     virtual unsigned short getType()
112         {
113         return type;
114         }
116     /**
117      * The parsable textual representation of the rule. This reflects the current 
118      * state of the rule and not its initial value.
119      */
120     virtual DOMString getCssText()
121         {
122         return cssText;
123         }
125     /**
126      * The parsable textual representation of the rule. This reflects the current 
127      * state of the rule and not its initial value.
128      * Note that setting involves reparsing.     
129      */
130     virtual void setCssText(const DOMString &val) throw (dom::DOMException)
131         {
132         cssText = val;
133         }
135     /**
136      * The style sheet that contains this rule.
137      */
138     virtual CSSStyleSheet *getParentStyleSheet()
139         {
140         return parentStyleSheet;
141         }
143     /**
144      * If this rule is contained inside another rule (e.g. a style rule inside an 
145      * @media block), this is the containing rule. If this rule is not nested inside 
146      * any other rules, this returns null.
147      */
148     virtual CSSRule *getParentRule()
149         {
150         return parentRule;
151         }
155     //##################
156     //# Non-API methods
157     //##################
159     /**
160      *
161      */
162     CSSRule()
163         {
164         type             = UNKNOWN_RULE;
165         cssText          = "";
166         parentStyleSheet = NULL;
167         parentRule       = NULL;
168         }
170     /**
171      *
172      */
173     CSSRule(const CSSRule &other)
174         {
175         assign(other);
176         }
178     /**
179      *
180      */
181     CSSRule &operator=(const CSSRule &other)
182         {
183         assign(other);
184         return *this;
185         }
187     /**
188      *
189      */
190     void assign(const CSSRule &other)
191         {
192         type             = other.type;
193         cssText          = other.cssText;
194         parentStyleSheet = other.parentStyleSheet;
195         parentRule       = other.parentRule;
196         }
198     /**
199      *
200      */
201     virtual ~CSSRule() {}
203 protected:
205     int type;
207     DOMString cssText;
209     CSSStyleSheet *parentStyleSheet;
211     CSSRule *parentRule;
212 };
216 /*#########################################################################
217 ## CSSRuleList
218 #########################################################################*/
220 /**
221  * The CSSRuleList interface provides the abstraction of an ordered collection of 
222  * CSS rules.
223  * 
224  * The items in the CSSRuleList are accessible via an integral index, starting 
225  * from 0.
226  */
227 class CSSRuleList
229 public:
231     /**
232      * The number of CSSRules in the list. The range of valid child rule indices is 0 
233      * to length-1 inclusive.
234      */
235     virtual unsigned long getLength()
236         {
237         return rules.size();
238         }
240     /**
241      * Used to retrieve a CSS rule by ordinal index. The order in this collection 
242      * represents the order of the rules in the CSS style sheet. If index is greater 
243      * than or equal to the number of rules in the list, this returns null.
244      */
245     virtual CSSRule item(unsigned long index)
246         {
247         if (index>=rules.size())
248             {
249             CSSRule rule;
250             return rule;
251             }
252         return rules[index];
253         }
256     //##################
257     //# Non-API methods
258     //##################
260     /**
261      *
262      */
263     CSSRuleList() {}
266     /**
267      *
268      */
269     CSSRuleList(const CSSRuleList &other)
270         {
271         rules = other.rules;
272         }
274     /**
275      *
276      */
277     CSSRuleList &operator=(const CSSRuleList &other)
278         {
279         rules = other.rules;
280         return *this;
281         }
283     /**
284      *
285      */
286     virtual ~CSSRuleList() {}
288 protected:
290 friend class CSSMediaRule;
291 friend class CSSStyleSheet;
293     /**
294      *
295      */
296     virtual void addRule(const CSSRule &rule)
297         {
298         rules.push_back(rule);
299         }
302     /**
303      *
304      */
305     virtual void deleteRule(unsigned long index)
306         {
307         if (index>=rules.size())
308             return;
309         std::vector<CSSRule>::iterator iter = rules.begin() + index;
310         rules.erase(iter);
311         }
314     /**
315      *
316      */
317     virtual long insertRule(const CSSRule &rule, unsigned long index)
318         {
319         if (index>=rules.size())
320             return -1;
321         std::vector<CSSRule>::iterator iter = rules.begin() + index;
322         rules.insert(iter, rule);
323         return index;
324         }
326     std::vector<CSSRule>rules;
327 };
330 /*#########################################################################
331 ## CSSStyleSheet
332 #########################################################################*/
334 /**
335  * The CSSStyleSheet interface is a concrete interface used to represent a CSS 
336  * style sheet i.e., a style sheet whose content type is "text/css".
337  */
338 class CSSStyleSheet : virtual public stylesheets::StyleSheet
340 public:
342     /**
343      * If this style sheet comes from an @import rule, the ownerRule attribute will 
344      * contain the CSSImportRule. In that case, the ownerNode attribute in the 
345      * StyleSheet interface will be null. If the style sheet comes from an element or 
346      * a processing instruction, the ownerRule attribute will be null and the 
347      * ownerNode attribute will contain the Node.
348      */
349     virtual CSSRule *getOwnerRule()
350         {
351         return ownerRule;
352         }
354     /**
355      * The list of all CSS rules contained within the style sheet. This
356      *   includes both rule sets and at-rules.
357      */
358     virtual CSSRuleList getCssRules()
359         {
360         return rules;
361         }
363     /**
364      * Used to insert a new rule into the style sheet. The new rule now
365      *   becomes part of the cascade. 
366      */
367     virtual unsigned long insertRule(const DOMString &/*ruleStr*/,
368                                      unsigned long index)
369                                      throw (dom::DOMException)
370         {
371         CSSRule rule;
372         return rules.insertRule(rule, index);
373         }
375     /**
376      * Used to delete a rule from the style sheet. 
377      */
378     virtual void deleteRule(unsigned long index)
379                             throw (dom::DOMException)
380         {
381         rules.deleteRule(index);
382         }
384     //##################
385     //# Non-API methods
386     //##################
388     /**
389      *
390      */
391     CSSStyleSheet() : stylesheets::StyleSheet()
392         {
393         }
395     /**
396      *
397      */
398     CSSStyleSheet(const CSSStyleSheet &other) :
399                   stylesheets::StyleSheet(other)
400         {
401         assign(other);
402         }
404     /**
405      *
406      */
407     CSSStyleSheet &operator=(const CSSStyleSheet &other)
408         {
409         assign(other);
410         return *this;
411         }
413     /**
414      *
415      */
416     void assign(const CSSStyleSheet &other)
417         {
418         ownerRule = other.ownerRule;
419         rules     = other.rules;
420         }
422     /**
423      *
424      */
425     virtual ~CSSStyleSheet() {}
427 protected:
429     CSSRule *ownerRule;
431     CSSRuleList rules;
432 };
435 /*#########################################################################
436 ## CSSValue
437 #########################################################################*/
439 /**
440  * The CSSValue interface represents a simple or a complex value. A CSSValue 
441  * object only occurs in a context of a CSS property.
442  */
443 class CSSValue
445 public:
447     /**
448      * An integer indicating which type of unit applies to the value.
449      */
450     typedef enum
451         {
452         CSS_INHERIT         = 0,
453         CSS_PRIMITIVE_VALUE = 1,
454         CSS_VALUE_LIST      = 2,
455         CSS_CUSTOM          = 3
456         } UnitTypes;
458     /**
459      * A code defining the type of the value as defined above.
460      */
461     virtual unsigned short getCssValueType()
462         {
463         return valueType;
464         }
466     /**
467      * A string representation of the current value.
468      */
469     virtual DOMString getCssText()
470         {
471         return cssText;
472         }
474     /**
475      * A string representation of the current value.
476      * Note that setting implies parsing.     
477      */
478     virtual void setCssText(const DOMString &val)
479                             throw (dom::DOMException)
480         {
481         cssText = val;
482         }
484     //##################
485     //# Non-API methods
486     //##################
488     /**
489      *
490      */
491     CSSValue()
492         {
493         valueType = CSS_INHERIT;
494         }
496     /**
497      *
498      */
499     CSSValue(const CSSValue &other)
500         {
501         assign(other);
502         }
504     /**
505      *
506      */
507     CSSValue &operator=(const CSSValue &other)
508         {
509         assign(other);
510         return *this;
511         }
513     /**
514      *
515      */
516     void assign(const CSSValue &other)
517         {
518         cssText   = other.cssText;
519         valueType = other.valueType;
520         }
522     /**
523      *
524      */
525     virtual ~CSSValue() {}
527 protected:
529     DOMString cssText;
530     int valueType;
531 };
537 /*#########################################################################
538 ## CSSStyleDeclaration
539 #########################################################################*/
541 /**
542  * The CSSStyleDeclaration interface represents a single CSS declaration block. 
543  * This interface may be used to determine the style properties currently set in 
544  * a block or to set style properties explicitly within the block.
545  * 
546  * While an implementation may not recognize all CSS properties within a CSS 
547  * declaration block, it is expected to provide access to all specified 
548  * properties in the style sheet through the CSSStyleDeclaration interface. 
549  * Furthermore, implementations that support a specific level of CSS should 
550  * correctly handle CSS shorthand properties for that level. For a further 
551  * discussion of shorthand properties, see the CSS2Properties interface.
552  * 
553  * This interface is also used to provide a read-only access to the computed 
554  * values of an element. See also the ViewCSS interface.
555  * 
556  * Note: The CSS Object Model doesn't provide an access to the specified or 
557  * actual values of the CSS cascade.
558  */
559 class CSSStyleDeclaration
561 private:
563         class CSSStyleDeclarationEntry
564         {
565         public:
566             CSSStyleDeclarationEntry(const DOMString &nameArg,
567                                      const DOMString &valueArg,
568                                      const DOMString &prioArg)
569                 {
570                 name  = nameArg;
571                 value = valueArg;
572                 prio  = prioArg;
573                 }
574             virtual ~CSSStyleDeclarationEntry(){}
575             DOMString name;
576             DOMString value;
577             DOMString prio;
578         };
579         
581 public:
583     /**
584      * The parsable textual representation of the declaration block (excluding the 
585      * surrounding curly braces).
586      */
587     virtual DOMString getCssText()
588         {
589         return cssText;
590         }
592     /**
593      * The parsable textual representation of the declaration block (excluding the 
594      * surrounding curly braces). Setting this attribute will result in the parsing 
595      * of the new value and resetting of all the properties in the declaration block 
596      * including the removal or addition of properties.
597      */
598     virtual void setCssText(const DOMString &val)
599                             throw (dom::DOMException)
600         {
601         cssText = val;
602         }
604     /**
605      * Used to retrieve the value of a CSS property if it has been explicitly
606      *   set within this declaration block. 
607      */
608     virtual DOMString getPropertyValue(const DOMString &propertyName)
609         {
610         std::vector<CSSStyleDeclarationEntry>::iterator iter;
611         for (iter=items.begin() ; iter!=items.end() ; iter++)
612             {
613             if (iter->name == propertyName)
614                 return iter->value;
615             }
616         return "";
617         }
619     /**
620      * Used to retrieve the object representation of the value of a CSS property if 
621      * it has been explicitly set within this declaration block. This method returns 
622      * null if the property is a shorthand property. Shorthand property values can 
623      * only be accessed and modified as strings, using the getPropertyValue and 
624      * setProperty methods.
625      */
626     virtual CSSValue getPropertyCSSValue(const DOMString &/*propertyName*/)
627         {
628         CSSValue value;
629         return value;
630         }
632     /**
633      * Used to remove a CSS property if it has been explicitly set within
634      *   this declaration block. 
635      */
636     virtual DOMString removeProperty(const DOMString &propertyName)
637                                      throw (dom::DOMException)
638         {
639         std::vector<CSSStyleDeclarationEntry>::iterator iter;
640         for (iter=items.begin() ; iter!=items.end() ; iter++)
641             {
642             if (iter->name == propertyName)
643                 items.erase(iter);
644             }
645         return propertyName;
646         }
648     /**
649      * Used to retrieve the priority of a CSS property (e.g. the "important" 
650      * qualifier) if the property has been explicitly set in this declaration block.
651      */
652     virtual DOMString getPropertyPriority(const DOMString &propertyName)
653         {
654         std::vector<CSSStyleDeclarationEntry>::iterator iter;
655         for (iter=items.begin() ; iter!=items.end() ; iter++)
656             {
657             if (iter->name == propertyName)
658                 return iter->prio;
659             }
660         return "";
661         }
663     /**
664      * Used to set a property value and priority within this declaration block. 
665      */
666     virtual void setProperty(const DOMString &propertyName,
667                              const DOMString &value,
668                              const DOMString &priority)
669                              throw (dom::DOMException)
670         {
671         std::vector<CSSStyleDeclarationEntry>::iterator iter;
672         for (iter=items.begin() ; iter!=items.end() ; iter++)
673             {
674             if (iter->name == propertyName)
675                 {
676                 iter->name  = propertyName;
677                 iter->value = value;
678                 iter->prio  = priority;
679                 return;
680                 }
681             }
682         CSSStyleDeclarationEntry entry(propertyName, value, priority);
683         items.push_back(entry);
684         }
686     /**
687      * The number of properties that have been explicitly set in this declaration 
688      * block. The range of valid indices is 0 to length-1 inclusive.
689      */
690     virtual unsigned long getLength()
691         {
692         return items.size();
693         }
695     /**
696      * Used to retrieve the properties that have been explicitly set in this 
697      * declaration block. The order of the properties retrieved using this method 
698      * does not have to be the order in which they were set. This method can be used 
699      * to iterate over all properties in this declaration block.
700      */
701     virtual DOMString item(unsigned long index)
702         {
703         if (index>=items.size())
704             return "";
705         DOMString ret = items[index].name;
706         ret.append(":");
707         ret.append(items[index].value);
708         return ret;
709         }
711     /**
712      * The CSS rule that contains this declaration block or null if this 
713      * CSSStyleDeclaration is not attached to a CSSRule.
714      */
715     virtual CSSRule *getParentRule()
716         {
717         return parentRule;
718         }
720     //##################
721     //# Non-API methods
722     //##################
724     /**
725      *
726      */
727     CSSStyleDeclaration()
728         {
729         parentRule = NULL;
730         }
732     /**
733      *
734      */
735     CSSStyleDeclaration(const CSSStyleDeclaration &other)
736         {
737         assign(other);
738         }
740     /**
741      *
742      */
743     CSSStyleDeclaration &operator=(const CSSStyleDeclaration &other)
744         {
745         assign(other);
746         return *this;
747         }
749     /**
750      *
751      */
752     void assign(const CSSStyleDeclaration &other)
753         {
754         parentRule = other.parentRule;
755         cssText    = other.cssText;
756         items      = other.items;
757         }
759     /**
760      *
761      */
762     virtual ~CSSStyleDeclaration() {}
764 protected:
766    DOMString cssText;
768    CSSRule *parentRule;
770    std::vector<CSSStyleDeclarationEntry> items;
771 };
776 /*#########################################################################
777 ## CSSStyleRule
778 #########################################################################*/
780 /**
781  * The CSSStyleRule interface represents a single rule set in a CSS style sheet.
782  */
783 class CSSStyleRule : virtual public CSSRule
785 public:
787     /**
788      * The textual representation of the selector for the rule set. The 
789      * implementation may have stripped out insignificant whitespace while parsing 
790      * the selector.
791      */
792     virtual DOMString getSelectorText()
793         {
794         return selectorText;
795         }
797     /**
798      * The textual representation of the selector for the rule set. The 
799      * implementation may have stripped out insignificant whitespace while parsing 
800      * the selector.  Setting implies reparsing.
801      */
802     virtual void setSelectorText(const DOMString &val)
803                 throw (dom::DOMException)
804         {
805         selectorText = val;
806         }
809     /**
810      * The declaration-block of this rule set.
811      */
812     virtual CSSStyleDeclaration &getStyle()
813         {
814         return style;
815         }
817     //##################
818     //# Non-API methods
819     //##################
821     /**
822      *
823      */
824     CSSStyleRule() : CSSRule()
825         {
826         type = STYLE_RULE;
827         selectorText = "";
828         }
831     /**
832      *
833      */
834     CSSStyleRule(const CSSStyleRule &other) : CSSRule(other)
835         {
836         assign(other);
837         }
839     /**
840      *
841      */
842     CSSStyleRule &operator=(const CSSStyleRule &other)
843         {
844         assign(other);
845         return *this;
846         }
848     /**
849      *
850      */
851     void assign(const CSSStyleRule &other)
852         {
853         selectorText = other.selectorText;
854         style        = other.style;
855         }
857     /**
858      *
859      */
860     virtual ~CSSStyleRule() {}
862 protected:
864     DOMString selectorText;
866     CSSStyleDeclaration style;
868 };
870 /*#########################################################################
871 ## CSSMediaRule
872 #########################################################################*/
874 /**
875  * The CSSMediaRule interface represents a @media rule in a CSS style sheet. A 
876  * @media rule can be used to delimit style rules for specific media types.
877  */
878 class CSSMediaRule : virtual public CSSRule
880 public:
882     /**
883      * A list of media types for this rule.
884      */
885     virtual stylesheets::MediaList getMedia()
886         {
887         return mediaList;
888         }
890     /**
891      * A list of all CSS rules contained within the media block.
892      */
893     virtual CSSRuleList getCssRules()
894         {
895         return cssRules;
896         }
898     /**
899      * Used to insert a new rule into the media block. 
900      */
901     virtual unsigned long insertRule(const DOMString &/*ruleStr*/,
902                                      unsigned long index)
903                                      throw (dom::DOMException)
904         {
905         if (index>cssRules.getLength())
906             return 0;
907         CSSRule rule;
908         cssRules.insertRule(rule, index);
909         return index;
910         }
912     /**
913      * Used to delete a rule from the media block. 
914      */
915     virtual void deleteRule(unsigned long index)
916                             throw(dom::DOMException)
917         {
918         cssRules.deleteRule(index);
919         }
921     //##################
922     //# Non-API methods
923     //##################
925     /**
926      *
927      */
928     CSSMediaRule() : CSSRule()
929         {
930         type = MEDIA_RULE;
931         }
933     /**
934      *
935      */
936     CSSMediaRule(const CSSMediaRule &other) : CSSRule(other)
937         {
938         assign(other);
939         }
941     /**
942      *
943      */
944     CSSMediaRule &operator=(const CSSMediaRule &other)
945         {
946         assign(other);
947         return *this;
948         }
950     /**
951      *
952      */
953     void assign(const CSSMediaRule &other)
954         {
955         mediaList = other.mediaList;
956         cssRules  = other.cssRules;
957         }
959     /**
960      *
961      */
962     virtual ~CSSMediaRule() {}
964 protected:
966     stylesheets::MediaList mediaList;
968     CSSRuleList cssRules;
969 };
974 /*#########################################################################
975 ## CSSFontFaceRule
976 #########################################################################*/
978 /**
979  * The CSSFontFaceRule interface represents a @font-face rule in a CSS style 
980  * sheet. The @font-face rule is used to hold a set of font descriptions.
981  */
982 class CSSFontFaceRule : virtual public CSSRule
984 public:
986     /**
987      * The declaration-block of this rule.
988      */
989     virtual CSSStyleDeclaration getStyle()
990         {
991         return style;
992         }
995     //##################
996     //# Non-API methods
997     //##################
999     /**
1000      *
1001      */
1002     CSSFontFaceRule() : CSSRule()
1003         {
1004         type = FONT_FACE_RULE;
1005         }
1007     /**
1008      *
1009      */
1010     CSSFontFaceRule(const CSSFontFaceRule &other) : CSSRule(other)
1011         {
1012         style = other.style;
1013         }
1015     /**
1016      *
1017      */
1018     CSSFontFaceRule &operator=(const CSSFontFaceRule &other)
1019         {
1020         style = other.style;
1021         return *this;
1022         }
1024     /**
1025      *
1026      */
1027     void assign(const CSSFontFaceRule &other)
1028         {
1029         style = other.style;
1030         }
1032     /**
1033      *
1034      */
1035     virtual ~CSSFontFaceRule() {}
1037 protected:
1039     CSSStyleDeclaration style;
1040 };
1045 /*#########################################################################
1046 ## CSSPageRule
1047 #########################################################################*/
1049 /**
1050  * The CSSPageRule interface represents a @page rule within a CSS style sheet. 
1051  * The @page rule is used to specify the dimensions, orientation, margins, etc. 
1052  * of a page box for paged media.
1053  */
1054 class CSSPageRule : virtual public CSSRule
1056 public:
1058     /**
1059      * The parsable textual representation of the page selector for the rule.
1060      */
1061     virtual DOMString getSelectorText()
1062         {
1063         return selectorText;
1064         }
1066     /**
1067      * The parsable textual representation of the page selector for the rule.
1068      * Setting implies parsing.     
1069      */
1070     virtual void setSelectorText(const DOMString &val)
1071                          throw(dom::DOMException)
1072         {
1073         selectorText = val;
1074         }
1077     /**
1078      * The declaration-block of this rule.
1079      */
1080     virtual CSSStyleDeclaration getStyle()
1081         {
1082         return style;
1083         }
1086     //##################
1087     //# Non-API methods
1088     //##################
1090     /**
1091      *
1092      */
1093     CSSPageRule() : CSSRule()
1094         {
1095         type = PAGE_RULE;
1096         }
1098     /**
1099      *
1100      */
1101     CSSPageRule(const CSSPageRule &other) : CSSRule(other)
1102         {
1103         assign(other);
1104         }
1106     /**
1107      *
1108      */
1109     CSSPageRule &operator=(const CSSPageRule &other)
1110         {
1111         assign(other);
1112         return *this;
1113         }
1115     /**
1116      *
1117      */
1118     void assign(const CSSPageRule &other)
1119         {
1120         selectorText = other.selectorText;
1121         style        = other.style;
1122         }
1124     /**
1125      *
1126      */
1127     virtual ~CSSPageRule() {}
1129 protected:
1131     DOMString selectorText;
1133     CSSStyleDeclaration style;
1134 };
1140 /*#########################################################################
1141 ## CSSImportRule
1142 #########################################################################*/
1144 /**
1145  * The CSSImportRule interface represents a @import rule within a CSS style 
1146  * sheet. The @import rule is used to import style rules from other style sheets.
1147  */
1148 class CSSImportRule : virtual public CSSRule
1150 public:
1152     /**
1153      * The location of the style sheet to be imported. The attribute will not contain 
1154      * the "url(...)" specifier around the URI.
1155      */
1156     virtual DOMString getHref()
1157         {
1158         return href;
1159         }
1161     /**
1162      * A list of media types for which this style sheet may be used.
1163      */
1164     virtual stylesheets::MediaList getMedia()
1165         {
1166         return mediaList;
1167         }
1169     /**
1170      * The style sheet referred to by this rule, if it has been loaded. The value of 
1171      * this attribute is null if the style sheet has not yet been loaded or if it 
1172      * will not be loaded (e.g. if the style sheet is for a media type not supported 
1173      * by the user agent).
1174      */
1175     virtual CSSStyleSheet getStyleSheet()
1176         {
1177         return styleSheet;
1178         }
1181     //##################
1182     //# Non-API methods
1183     //##################
1185     /**
1186      *
1187      */
1188     CSSImportRule() : CSSRule()
1189         {
1190         type = IMPORT_RULE;
1191         }
1193     /**
1194      *
1195      */
1196     CSSImportRule(const CSSImportRule &other) : CSSRule(other)
1197         {
1198         assign(other);
1199         }
1201     /**
1202      *
1203      */
1204     CSSImportRule &operator=(const CSSImportRule &other)
1205         {
1206         assign(other);
1207         return *this;
1208         }
1210     /**
1211      *
1212      */
1213     void assign(const CSSImportRule &other)
1214         {
1215         mediaList  = other.mediaList;
1216         styleSheet = other.styleSheet;
1217         }
1219     /**
1220      *
1221      */
1222     virtual ~CSSImportRule() {}
1224 protected:
1226     DOMString href;
1228     stylesheets::MediaList mediaList;
1230     CSSStyleSheet styleSheet;
1231 };
1238 /*#########################################################################
1239 ## CSSCharsetRule
1240 #########################################################################*/
1242 /**
1243  * The CSSCharsetRule interface represents a @charset rule in a CSS style sheet. 
1244  * The value of the encoding attribute does not affect the encoding of text data 
1245  * in the DOM objects; this encoding is always UTF-16. After a stylesheet is 
1246  * loaded, the value of the encoding attribute is the value found in the @charset 
1247  * rule. If there was no @charset in the original document, then no 
1248  * CSSCharsetRule is created. The value of the encoding attribute may also be 
1249  * used as a hint for the encoding used on serialization of the style sheet.
1250  * 
1251  * The value of the @charset rule (and therefore of the CSSCharsetRule) may not 
1252  * correspond to the encoding the document actually came in; character encoding 
1253  * information e.g. in an HTTP header, has priority (see CSS document 
1254  * representation) but this is not reflected in the CSSCharsetRule.
1255  */
1256 class CSSCharsetRule : virtual public CSSRule
1258 public:
1260     /**
1261      * The encoding information used in this @charset rule.
1262      */
1263     virtual DOMString getEncoding()
1264         {
1265         return encoding;
1266         }
1268     /**
1269      * The encoding information used in this @charset rule.
1270      * Setting implies parsing.     
1271      */
1272     virtual void setEncoding(const DOMString &val) throw (dom::DOMException)
1273         {
1274         encoding = val;
1275         }
1277     //##################
1278     //# Non-API methods
1279     //##################
1281     /**
1282      *
1283      */
1284     CSSCharsetRule() : CSSRule()
1285         {
1286         type = CHARSET_RULE;
1287         }
1289     /**
1290      *
1291      */
1292     CSSCharsetRule(const CSSCharsetRule &other) : CSSRule(other)
1293         {
1294         encoding = other.encoding;
1295         }
1297     /**
1298      *
1299      */
1300     CSSCharsetRule &operator=(const CSSCharsetRule &other)
1301         {
1302         encoding = other.encoding;
1303         return *this;
1304         }
1306     /**
1307      *
1308      */
1309     virtual ~CSSCharsetRule() {}
1311 protected:
1313     DOMString encoding;
1315 };
1321 /*#########################################################################
1322 ## CSSUnknownRule
1323 #########################################################################*/
1325 /**
1326  * The CSSUnknownRule interface represents an at-rule not supported by
1327  *  this user agent.
1328  */
1329 class CSSUnknownRule : virtual public CSSRule
1331 public:
1333     //##################
1334     //# Non-API methods
1335     //##################
1337     /**
1338      *
1339      */
1340     CSSUnknownRule() : CSSRule()
1341         {
1342         type = UNKNOWN_RULE;
1343         }
1345     /**
1346      *
1347      */
1348     CSSUnknownRule(const CSSUnknownRule &other) : CSSRule(other)
1349         {
1350         }
1352     /**
1353      *
1354      */
1355     CSSUnknownRule &operator=(const CSSUnknownRule &/*other*/)
1356         {
1357         return *this;
1358         }
1360     /**
1361      *
1362      */
1363     virtual ~CSSUnknownRule() {}
1364 };
1372 /*#########################################################################
1373 ## CSSValueList
1374 #########################################################################*/
1376 /**
1377  * The CSSValueList interface provides the abstraction of an ordered collection 
1378  * of CSS values.
1379  * 
1380  * Some properties allow an empty list into their syntax. In that case, these 
1381  * properties take the none identifier. So, an empty list means that the property 
1382  * has the value none.
1383  * 
1384  * The items in the CSSValueList are accessible via an integral index, starting 
1385  * from 0.
1386  */
1387 class CSSValueList : virtual public CSSValue
1389 public:
1391     /**
1392      * The number of CSSValues in the list. The range of valid values of the indices 
1393      * is 0 to length-1 inclusive.
1394      */
1395     virtual unsigned long getLength()
1396         {
1397         return items.size();
1398         }
1400     /**
1401      * Used to retrieve a CSSValue by ordinal index. The order in this collection 
1402      * represents the order of the values in the CSS style property. If index is 
1403      * greater than or equal to the number of values in the list, this returns null.
1404      */
1405     virtual CSSValue item(unsigned long index)
1406         {
1407         if (index>=items.size())
1408             {
1409             CSSValue dummy;
1410             return dummy;
1411             }
1412         return items[index];
1413         }
1416     //##################
1417     //# Non-API methods
1418     //##################
1420     /**
1421      *
1422      */
1423     CSSValueList()
1424         {
1425         }
1427     /**
1428      *
1429      */
1430     CSSValueList(const CSSValueList &other) : CSSValue(other)
1431         {
1432         items = other.items;
1433         }
1435     /**
1436      *
1437      */
1438     CSSValueList &operator=(const CSSValueList &other)
1439         {
1440         items = other.items;
1441         return *this;
1442         }
1444     /**
1445      *
1446      */
1447     virtual ~CSSValueList() {}
1449 protected:
1451     std::vector<CSSValue> items;
1452 };
1457 /*#########################################################################
1458 ## CSSPrimitiveValue
1459 #########################################################################*/
1461 /**
1462  * The CSSPrimitiveValue interface represents a single CSS value. This interface 
1463  * may be used to determine the value of a specific style property currently set 
1464  * in a block or to set a specific style property explicitly within the block. An 
1465  * instance of this interface might be obtained from the getPropertyCSSValue 
1466  * method of the CSSStyleDeclaration interface. A CSSPrimitiveValue object only 
1467  * occurs in a context of a CSS property.
1468  * 
1469  * Conversions are allowed between absolute values (from millimeters to 
1470  * centimeters, from degrees to radians, and so on) but not between relative 
1471  * values. (For example, a pixel value cannot be converted to a centimeter value.)
1472  * Percentage values can't be converted since they are relative to the parent 
1473  * value (or another property value). There is one exception for color percentage 
1474  * values: since a color percentage value is relative to the range 0-255, a color 
1475  * percentage value can be converted to a number; (see also the RGBColor 
1476  * interface).
1477  */
1478 class CSSPrimitiveValue : virtual public CSSValue
1480 public:
1482     /**
1483      *An integer indicating which type of unit applies to the value.
1484      */
1485     typedef enum
1486         {
1487         CSS_UNKNOWN    = 0,
1488         CSS_NUMBER     = 1,
1489         CSS_PERCENTAGE = 2,
1490         CSS_EMS        = 3,
1491         CSS_EXS        = 4,
1492         CSS_PX         = 5,
1493         CSS_CM         = 6,
1494         CSS_MM         = 7,
1495         CSS_IN         = 8,
1496         CSS_PT         = 9,
1497         CSS_PC         = 10,
1498         CSS_DEG        = 11,
1499         CSS_RAD        = 12,
1500         CSS_GRAD       = 13,
1501         CSS_MS         = 14,
1502         CSS_S          = 15,
1503         CSS_HZ         = 16,
1504         CSS_KHZ        = 17,
1505         CSS_DIMENSION  = 18,
1506         CSS_STRING     = 19,
1507         CSS_URI        = 20,
1508         CSS_IDENT      = 21,
1509         CSS_ATTR       = 22,
1510         CSS_COUNTER    = 23,
1511         CSS_RECT       = 24,
1512         CSS_RGBCOLOR   = 25
1513         } UnitTypes;
1516     /**
1517      * The type of the value as defined by the constants specified above.
1518      */
1519     virtual unsigned short getPrimitiveType()
1520         {
1521         return primitiveType;
1522         }
1524     /**
1525      * A method to set the float value with a specified unit. If the property 
1526      * attached with this value can not accept the specified unit or the float value, 
1527      * the value will be unchanged and a DOMException will be raised.
1528      */
1529     virtual void setFloatValue(unsigned short unitType,
1530                                double doubleValueArg)
1531                                throw (dom::DOMException)
1532         {
1533         primitiveType = unitType;
1534         doubleValue = doubleValueArg;
1535         }
1537     /**
1538      * This method is used to get a float value in a specified unit. If this CSS 
1539      * value doesn't contain a float value or can't be converted into the specified 
1540      * unit, a DOMException is raised.
1541      */
1542     virtual double getFloatValue(unsigned short /*unitType*/)
1543                                 throw (dom::DOMException)
1544         {
1545         return doubleValue;
1546         }
1548     /**
1549      * A method to set the string value with the specified unit. If the property 
1550      * attached to this value can't accept the specified unit or the string value, 
1551      * the value will be unchanged and a DOMException will be raised.
1552      */
1553     virtual void setStringValue(unsigned short /*stringType*/,
1554                                 const DOMString &stringValueArg)
1555                                 throw (dom::DOMException)
1556         {
1557         stringValue = stringValueArg;
1558         }
1560     /**
1561      * This method is used to get the string value. If the CSS value doesn't contain 
1562      * a string value, a DOMException is raised.
1563      * 
1564      * Note: Some properties (like 'font-family' or 'voice-family') convert a 
1565      * whitespace separated list of idents to a string.
1566      */
1567     virtual DOMString getStringValue() throw (dom::DOMException)
1568         {
1569         return stringValue;
1570         }
1572     /**
1573      * This method is used to get the Counter value. If this CSS value doesn't 
1574      * contain a counter value, a DOMException is raised. Modification to the 
1575      * corresponding style property can be achieved using the Counter interface.
1576      */
1577     virtual Counter *getCounterValue() throw (dom::DOMException)
1578         {
1579         return NULL;
1580         }
1582     /**
1583      * This method is used to get the Rect value. If this CSS value doesn't contain a 
1584      * rect value, a DOMException is raised. Modification to the corresponding style 
1585      * property can be achieved using the Rect interface.
1586      */
1587     virtual Rect *getRectValue() throw (dom::DOMException)
1588         {
1589         return NULL;
1590         }
1592     /**
1593      * This method is used to get the RGB color. If this CSS value doesn't contain a 
1594      * RGB color value, a DOMException is raised. Modification to the corresponding 
1595      * style property can be achieved using the RGBColor interface.
1596      */
1597     virtual RGBColor *getRGBColorValue() throw (dom::DOMException)
1598         {
1599         return NULL;
1600         }
1602     //##################
1603     //# Non-API methods
1604     //##################
1606     /**
1607      *
1608      */
1609     CSSPrimitiveValue() : CSSValue()
1610         {
1611         }
1613     /**
1614      *
1615      */
1616     CSSPrimitiveValue(const CSSPrimitiveValue &other) : CSSValue(other)
1617         {
1618         }
1620     /**
1621      *
1622      */
1623     CSSPrimitiveValue &operator=(const CSSPrimitiveValue &/*other*/)
1624         {
1625         return *this;
1626         }
1628     /**
1629      *
1630      */
1631     virtual ~CSSPrimitiveValue() {}
1633 protected:
1635     int primitiveType;
1637     double doubleValue;
1639     DOMString stringValue;
1642 };
1646 /*#########################################################################
1647 ## RGBColor
1648 #########################################################################*/
1650 /**
1651  * The RGBColor interface is used to represent any RGB color value. This 
1652  * interface reflects the values in the underlying style property. Hence, 
1653  * modifications made to the CSSPrimitiveValue objects modify the style property.
1654  * 
1655  * A specified RGB color is not clipped (even if the number is outside the range 
1656  * 0-255 or 0%-100%). A computed RGB color is clipped depending on the device.
1657  * 
1658  * Even if a style sheet can only contain an integer for a color value, the 
1659  * internal storage of this integer is a float, and this can be used as a float 
1660  * in the specified or the computed style.
1661  * 
1662  * A color percentage value can always be converted to a number and vice versa.
1663  */
1664 class RGBColor
1666 public:
1668     /**
1669      * This attribute is used for the red value of the RGB color.
1670      */
1671     virtual CSSPrimitiveValue getRed()
1672         {
1673         return red;
1674         }
1676     /**
1677      * This attribute is used for the green value of the RGB color.
1678      */
1679     virtual CSSPrimitiveValue getGreen()
1680         {
1681         return green;
1682         }
1684     /**
1685      * This attribute is used for the blue value of the RGB color.
1686      */
1687     virtual CSSPrimitiveValue getBlue()
1688         {
1689         return blue;
1690         }
1692     /**
1693      * REPLACES: RGBColor CSSPrimitiveValue::getRGBColorValue() throw (dom::DOMException)
1694      */
1695     static RGBColor getRGBColorValue(const CSSPrimitiveValue &/*val*/)
1696         {
1697         RGBColor col;
1698         return col;
1699         }
1701     //##################
1702     //# Non-API methods
1703     //##################
1705     /**
1706      *
1707      */
1708     RGBColor() {}
1710     /**
1711      *
1712      */
1713     RGBColor(const RGBColor &other)
1714         {
1715         assign(other);
1716         }
1718     /**
1719      *
1720      */
1721     RGBColor &operator=(const RGBColor &other)
1722         {
1723         assign(other);
1724         return *this;
1725         }
1727     /**
1728      *
1729      */
1730     void assign(const RGBColor &other)
1731         {
1732         red   = other.red;
1733         green = other.green;
1734         blue  = other.blue;
1735         }
1737     /**
1738      *
1739      */
1740     virtual ~RGBColor() {}
1742 protected:
1744     CSSPrimitiveValue red;
1745     CSSPrimitiveValue green;
1746     CSSPrimitiveValue blue;
1747 };
1752 /*#########################################################################
1753 ## Rect
1754 #########################################################################*/
1756 /**
1757  * The Rect interface is used to represent any rect value. This interface 
1758  * reflects the values in the underlying style property. Hence, modifications 
1759  * made to the CSSPrimitiveValue objects modify the style property.
1760  */
1761 class Rect
1763 public:
1765     /**
1766      * This attribute is used for the top of the rect.
1767      */
1768     virtual CSSPrimitiveValue getTop()
1769         {
1770         return top;
1771         }
1773     /**
1774      * This attribute is used for the right of the rect.
1775      */
1776     virtual CSSPrimitiveValue getRight()
1777         {
1778         return right;
1779         }
1781     /**
1782      * This attribute is used for the bottom of the rect.
1783      */
1784     virtual CSSPrimitiveValue getBottom()
1785         {
1786         return bottom;
1787         }
1789     /**
1790      * This attribute is used for the left of the rect.
1791      */
1792     virtual CSSPrimitiveValue getLeft()
1793         {
1794         return left;
1795         }
1797     /**
1798      * REPLACES: Rect CSSPrimitiveValue::getRectValue() throw (dom::DOMException)
1799      */
1800     static Rect getRectValue(const CSSPrimitiveValue &/*val*/)
1801         {
1802         Rect rect;
1803         return rect;
1804         }
1806     //##################
1807     //# Non-API methods
1808     //##################
1810     /**
1811      *
1812      */
1813     Rect() {}
1815     /**
1816      *
1817      */
1818     Rect(const Rect &other)
1819         {
1820         assign(other);
1821         }
1823     /**
1824      *
1825      */
1826     Rect &operator=(const Rect &other)
1827         {
1828         assign(other);
1829         return *this;
1830         }
1832     /**
1833      *
1834      */
1835     void assign(const Rect &other)
1836         {
1837         top    = other.top;
1838         right  = other.right;
1839         bottom = other.bottom;
1840         left   = other.left;
1841         }
1843     /**
1844      *
1845      */
1846     virtual ~Rect() {}
1848 protected:
1850     CSSPrimitiveValue top;
1851     CSSPrimitiveValue right;
1852     CSSPrimitiveValue bottom;
1853     CSSPrimitiveValue left;
1854 };
1861 /*#########################################################################
1862 ## Counter
1863 #########################################################################*/
1865 /**
1866  * The Counter interface is used to represent any counter or counters function 
1867  * value. This interface reflects the values in the underlying style property.
1868  */
1869 class Counter
1871 public:
1873     /**
1874      * This attribute is used for the identifier of the counter.
1875      */
1876     virtual DOMString getIdentifier()
1877         {
1878         return identifier;
1879         }
1881     /**
1882      * This attribute is used for the style of the list.
1883      */
1884     virtual DOMString getListStyle()
1885         {
1886         return listStyle;
1887         }
1889     /**
1890      * This attribute is used for the separator of the nested counters.
1891      */
1892     virtual DOMString getSeparator()
1893         {
1894         return separator;
1895         }
1897     /**
1898      * REPLACES: Counter CSSPrimitiveValue::getCounterValue() throw (dom::DOMException)
1899      */
1900     static Counter getCounterValue(const CSSPrimitiveValue &/*val*/)
1901         {
1902         Counter counter;
1903         return counter;
1904         }
1906     //##################
1907     //# Non-API methods
1908     //##################
1910     /**
1911      *
1912      */
1913     Counter() {}
1915     /**
1916      *
1917      */
1918     Counter(const Counter &other)
1919         {
1920         assign(other);
1921         }
1923     /**
1924      *
1925      */
1926     Counter &operator=(const Counter &other)
1927         {
1928         assign(other);
1929         return *this;
1930         }
1932     /**
1933      *
1934      */
1935     void assign(const Counter &other)
1936         {
1937         identifier = other.identifier;
1938         listStyle  = other.listStyle;
1939         separator  = other.separator;
1940         }
1942     /**
1943      *
1944      */
1945     virtual ~Counter() {}
1947 protected:
1949     DOMString identifier;
1950     DOMString listStyle;
1951     DOMString separator;
1953 };
1958 /*#########################################################################
1959 ## ElementCSSInlineStyle
1960 #########################################################################*/
1962 /**
1963  * Inline style information attached to elements is exposed through the style 
1964  * attribute. This represents the contents of the STYLE attribute for HTML 
1965  * elements (or elements in other schemas or DTDs which use the STYLE attribute 
1966  * in the same way). The expectation is that an instance of the 
1967  * ElementCSSInlineStyle interface can be obtained by using binding-specific 
1968  * casting methods on an instance of the Element interface when the element 
1969  * supports inline CSS style informations.
1970  */
1971 class ElementCSSInlineStyle
1973 public:
1975     /**
1976      * The style attribute.
1977      */
1978     virtual CSSStyleDeclaration getStyle()
1979         {
1980         return style;
1981         }
1983     //##################
1984     //# Non-API methods
1985     //##################
1987     /**
1988      *
1989      */
1990     ElementCSSInlineStyle() {}
1992     /**
1993      *
1994      */
1995     ElementCSSInlineStyle(const ElementCSSInlineStyle &other)
1996         {
1997         style = other.style;
1998         }
2000     /**
2001      *
2002      */
2003     ElementCSSInlineStyle &operator=(const ElementCSSInlineStyle &other)
2004         {
2005         style = other.style;
2006         return *this;
2007         }
2009     /**
2010      *
2011      */
2012     virtual ~ElementCSSInlineStyle() {}
2014 protected:
2016     CSSStyleDeclaration style;
2017 };
2024 /*#########################################################################
2025 ## CSS2Properties
2026 #########################################################################*/
2028 /**
2029  * The CSS2Properties interface represents a convenience mechanism for retrieving 
2030  * and setting properties within a CSSStyleDeclaration. The attributes of this 
2031  * interface correspond to all the properties specified in CSS2. Getting an 
2032  * attribute of this interface is equivalent to calling the getPropertyValue 
2033  * method of the CSSStyleDeclaration interface. Setting an attribute of this 
2034  * interface is equivalent to calling the setProperty method of the 
2035  * CSSStyleDeclaration interface.
2036  * 
2037  * A conformant implementation of the CSS module is not required to implement the 
2038  * CSS2Properties interface. If an implementation does implement this interface, 
2039  * the expectation is that language-specific methods can be used to cast from an 
2040  * instance of the CSSStyleDeclaration interface to the CSS2Properties interface.
2041  * 
2042  * If an implementation does implement this interface, it is expected to 
2043  * understand the specific syntax of the shorthand properties, and apply their 
2044  * semantics; when the margin property is set, for example, the marginTop, 
2045  * marginRight, marginBottom and marginLeft properties are actually being set by 
2046  * the underlying implementation.
2047  * 
2048  * When dealing with CSS "shorthand" properties, the shorthand properties should 
2049  * be decomposed into their component longhand properties as appropriate, and 
2050  * when querying for their value, the form returned should be the shortest form 
2051  * exactly equivalent to the declarations made in the ruleset. However, if there 
2052  * is no shorthand declaration that could be added to the ruleset without 
2053  * changing in any way the rules already declared in the ruleset (i.e., by adding 
2054  * longhand rules that were previously not declared in the ruleset), then the 
2055  * empty string should be returned for the shorthand property.
2056  * 
2057  * For example, querying for the font property should not return "normal normal 
2058  * normal 14pt/normal Arial, sans-serif", when "14pt Arial, sans-serif" suffices. 
2059  * (The normals are initial values, and are implied by use of the longhand 
2060  * property.)
2061  * 
2062  * If the values for all the longhand properties that compose a particular string 
2063  * are the initial values, then a string consisting of all the initial values 
2064  * should be returned (e.g. a border-width value of "medium" should be returned 
2065  * as such, not as "").
2066  * 
2067  * For some shorthand properties that take missing values from other sides, such 
2068  * as the margin, padding, and border-[width|style|color] properties, the minimum 
2069  * number of sides possible should be used; i.e., "0px 10px" will be returned 
2070  * instead of "0px 10px 0px 10px".
2071  * 
2072  * If the value of a shorthand property can not be decomposed into its component 
2073  * longhand properties, as is the case for the font property with a value of 
2074  * "menu", querying for the values of the component longhand properties should 
2075  * return the empty string.
2076  *  */
2077 class CSS2Properties
2079 public:
2082     /**
2083      *  return the 'azimuth' property
2084      */
2085     virtual DOMString getAzimuth()
2086         {
2087         return azimuth;
2088         }
2090     /**
2091      *  set the 'azimuth' property
2092      */
2093     virtual void setAzimuth(const DOMString &val)
2094                          throw (dom::DOMException)
2095         {
2096         azimuth = val;
2097         }
2099     /**
2100      *  return the 'background' property
2101      */
2102     virtual DOMString getBackground()
2103         {
2104         return background;
2105         }
2107     /**
2108      *  set the 'background' property
2109      */
2110     virtual void setBackground(const DOMString &val)
2111                          throw (dom::DOMException)
2112         {
2113         background = val;
2114         }
2116     /**
2117      *  return the 'backgroundAttachment' property
2118      */
2119     virtual DOMString getBackgroundAttachment()
2120         {
2121         return backgroundAttachment;
2122         }
2124     /**
2125      *  set the 'backgroundAttachment' property
2126      */
2127     virtual void setBackgroundAttachment(const DOMString &val)
2128                          throw (dom::DOMException)
2129         {
2130         backgroundAttachment = val;
2131         }
2133     /**
2134      *  return the 'backgroundColor' property
2135      */
2136     virtual DOMString getBackgroundColor()
2137         {
2138         return backgroundColor;
2139         }
2141     /**
2142      *  set the 'backgroundColor' property
2143      */
2144     virtual void setBackgroundColor(const DOMString &val)
2145                          throw (dom::DOMException)
2146         {
2147         backgroundColor = val;
2148         }
2150     /**
2151      *  return the 'backgroundImage' property
2152      */
2153     virtual DOMString getBackgroundImage()
2154         {
2155         return backgroundImage;
2156         }
2158     /**
2159      *  set the 'backgroundImage' property
2160      */
2161     virtual void setBackgroundImage(const DOMString &val)
2162                          throw (dom::DOMException)
2163         {
2164         backgroundImage = val;
2165         }
2167     /**
2168      *  return the 'backgroundPosition' property
2169      */
2170     virtual DOMString getBackgroundPosition()
2171         {
2172         return backgroundPosition;
2173         }
2175     /**
2176      *  set the 'backgroundPosition' property
2177      */
2178     virtual void setBackgroundPosition(const DOMString &val)
2179                          throw (dom::DOMException)
2180         {
2181         backgroundPosition = val;
2182         }
2184     /**
2185      *  return the 'backgroundRepeat' property
2186      */
2187     virtual DOMString getBackgroundRepeat()
2188         {
2189         return backgroundRepeat;
2190         }
2192     /**
2193      *  set the 'backgroundRepeat' property
2194      */
2195     virtual void setBackgroundRepeat(const DOMString &val)
2196                          throw (dom::DOMException)
2197         {
2198         backgroundRepeat = val;
2199         }
2201     /**
2202      *  return the 'border' property
2203      */
2204     virtual DOMString getBorder()
2205         {
2206         return border;
2207         }
2209     /**
2210      *  set the 'border' property
2211      */
2212     virtual void setBorder(const DOMString &val)
2213                          throw (dom::DOMException)
2214         {
2215         border = val;
2216         }
2218     /**
2219      *  return the 'borderCollapse' property
2220      */
2221     virtual DOMString getBorderCollapse()
2222         {
2223         return borderCollapse;
2224         }
2226     /**
2227      *  set the 'borderCollapse' property
2228      */
2229     virtual void setBorderCollapse(const DOMString &val)
2230                          throw (dom::DOMException)
2231         {
2232         borderCollapse = val;
2233         }
2235     /**
2236      *  return the 'borderColor' property
2237      */
2238     virtual DOMString getBorderColor()
2239         {
2240         return borderColor;
2241         }
2243     /**
2244      *  set the 'borderColor' property
2245      */
2246     virtual void setBorderColor(const DOMString &val)
2247                          throw (dom::DOMException)
2248         {
2249         borderColor = val;
2250         }
2252     /**
2253      *  return the 'borderSpacing' property
2254      */
2255     virtual DOMString getBorderSpacing()
2256         {
2257         return borderSpacing;
2258         }
2260     /**
2261      *  set the 'borderSpacing' property
2262      */
2263     virtual void setBorderSpacing(const DOMString &val)
2264                          throw (dom::DOMException)
2265         {
2266         borderSpacing = val;
2267         }
2269     /**
2270      *  return the 'borderStyle' property
2271      */
2272     virtual DOMString getBorderStyle()
2273         {
2274         return borderStyle;
2275         }
2277     /**
2278      *  set the 'borderStyle' property
2279      */
2280     virtual void setBorderStyle(const DOMString &val)
2281                          throw (dom::DOMException)
2282         {
2283         borderStyle = val;
2284         }
2286     /**
2287      *  return the 'borderTop' property
2288      */
2289     virtual DOMString getBorderTop()
2290         {
2291         return borderTop;
2292         }
2294     /**
2295      *  set the 'borderTop' property
2296      */
2297     virtual void setBorderTop(const DOMString &val)
2298                          throw (dom::DOMException)
2299         {
2300         borderTop = val;
2301         }
2303     /**
2304      *  return the 'borderRight' property
2305      */
2306     virtual DOMString getBorderRight()
2307         {
2308         return borderRight;
2309         }
2311     /**
2312      *  set the 'borderRight' property
2313      */
2314     virtual void setBorderRight(const DOMString &val)
2315                          throw (dom::DOMException)
2316         {
2317         borderRight = val;
2318         }
2320     /**
2321      *  return the 'borderBottom' property
2322      */
2323     virtual DOMString getBorderBottom()
2324         {
2325         return borderBottom;
2326         }
2328     /**
2329      *  set the 'borderBottom' property
2330      */
2331     virtual void setBorderBottom(const DOMString &val)
2332                          throw (dom::DOMException)
2333         {
2334         borderBottom = val;
2335         }
2337     /**
2338      *  return the 'borderLeft' property
2339      */
2340     virtual DOMString getBorderLeft()
2341         {
2342         return borderLeft;
2343         }
2345     /**
2346      *  set the 'borderLeft' property
2347      */
2348     virtual void setBorderLeft(const DOMString &val)
2349                          throw (dom::DOMException)
2350         {
2351         borderLeft = val;
2352         }
2354     /**
2355      *  return the 'borderTopColor' property
2356      */
2357     virtual DOMString getBorderTopColor()
2358         {
2359         return borderTopColor;
2360         }
2362     /**
2363      *  set the 'borderTopColor' property
2364      */
2365     virtual void setBorderTopColor(const DOMString &val)
2366                          throw (dom::DOMException)
2367         {
2368     borderTopColor = val;
2369         }
2371     /**
2372      *  return the 'borderRightColor' property
2373      */
2374     virtual DOMString getBorderRightColor()
2375         {
2376         return borderRightColor;
2377         }
2379     /**
2380      *  set the 'borderRightColor' property
2381      */
2382     virtual void setBorderRightColor(const DOMString &val)
2383                          throw (dom::DOMException)
2384         {
2385         borderRightColor = val;
2386         }
2388     /**
2389      *  return the 'borderBottomColor' property
2390      */
2391     virtual DOMString getBorderBottomColor()
2392         {
2393         return borderBottomColor;
2394         }
2396     /**
2397      *  set the 'borderBottomColor' property
2398      */
2399     virtual void setBorderBottomColor(const DOMString &val)
2400                          throw (dom::DOMException)
2401         {
2402         borderBottomColor = val;
2403         }
2405     /**
2406      *  return the 'borderLeftColor' property
2407      */
2408     virtual DOMString getBorderLeftColor()
2409         {
2410         return borderLeftColor;
2411         }
2413     /**
2414      *  set the 'borderLeftColor' property
2415      */
2416     virtual void setBorderLeftColor(const DOMString &val)
2417                          throw (dom::DOMException)
2418         {
2419         borderLeftColor = val;
2420         }
2422     /**
2423      *  return the 'borderTopStyle' property
2424      */
2425     virtual DOMString getBorderTopStyle()
2426         {
2427         return borderTopStyle;
2428         }
2430     /**
2431      *  set the 'borderTopStyle' property
2432      */
2433     virtual void setBorderTopStyle(const DOMString &val)
2434                          throw (dom::DOMException)
2435         {
2436         borderTopStyle = val;
2437         }
2439     /**
2440      *  return the 'borderRightStyle' property
2441      */
2442     virtual DOMString getBorderRightStyle()
2443         {
2444         return borderRightStyle;
2445         }
2447     /**
2448      *  set the 'borderRightStyle' property
2449      */
2450     virtual void setBorderRightStyle(const DOMString &val)
2451                          throw (dom::DOMException)
2452         {
2453         borderRightStyle = val;
2454         }
2456     /**
2457      *  return the 'borderBottomStyle' property
2458      */
2459     virtual DOMString getBorderBottomStyle()
2460         {
2461         return borderBottomStyle;
2462         }
2464     /**
2465      *  set the 'borderBottomStyle' property
2466      */
2467     virtual void setBorderBottomStyle(const DOMString &val)
2468                          throw (dom::DOMException)
2469         {
2470         borderBottomStyle = val;
2471         }
2473     /**
2474      *  return the 'borderLeftStyle' property
2475      */
2476     virtual DOMString getBorderLeftStyle()
2477         {
2478         return borderLeftStyle;
2479         }
2481     /**
2482      *  set the 'borderLeftStyle' property
2483      */
2484     virtual void setBorderLeftStyle(const DOMString &val)
2485                          throw (dom::DOMException)
2486         {
2487         borderLeftStyle = val;
2488         }
2490     /**
2491      *  return the 'borderTopWidth' property
2492      */
2493     virtual DOMString getBorderTopWidth()
2494         {
2495         return borderTopWidth;
2496         }
2498     /**
2499      *  set the 'borderTopWidth' property
2500      */
2501     virtual void setBorderTopWidth(const DOMString &val)
2502                          throw (dom::DOMException)
2503         {
2504         borderTopWidth = val;
2505         }
2507     /**
2508      *  return the 'borderRightWidth' property
2509      */
2510     virtual DOMString getBorderRightWidth()
2511         {
2512         return borderRightWidth;
2513         }
2515     /**
2516      *  set the 'borderRightWidth' property
2517      */
2518     virtual void setBorderRightWidth(const DOMString &val)
2519                          throw (dom::DOMException)
2520         {
2521         borderRightWidth = val;
2522         }
2524     /**
2525      *  return the 'borderBottomWidth' property
2526      */
2527     virtual DOMString getBorderBottomWidth()
2528         {
2529         return borderBottomWidth;
2530         }
2532     /**
2533      *  set the 'borderBottomWidth' property
2534      */
2535     virtual void setBorderBottomWidth(const DOMString &val)
2536                          throw (dom::DOMException)
2537         {
2538         borderBottomWidth = val;
2539         }
2541     /**
2542      *  return the 'borderLeftWidth' property
2543      */
2544     virtual DOMString getBorderLeftWidth()
2545         {
2546         return borderLeftWidth;
2547         }
2549     /**
2550      *  set the 'borderLeftWidth' property
2551      */
2552     virtual void setBorderLeftWidth(const DOMString &val)
2553                          throw (dom::DOMException)
2554         {
2555         borderLeftWidth = val;
2556         }
2558     /**
2559      *  return the 'borderWidth' property
2560      */
2561     virtual DOMString getBorderWidth()
2562         {
2563         return borderWidth;
2564         }
2566     /**
2567      *  set the 'borderWidth' property
2568      */
2569     virtual void setBorderWidth(const DOMString &val)
2570                          throw (dom::DOMException)
2571         {
2572         borderWidth = val;
2573         }
2575     /**
2576      *  return the 'bottom' property
2577      */
2578     virtual DOMString getBottom()
2579         {
2580         return bottom;
2581         }
2583     /**
2584      *  set the 'bottom' property
2585      */
2586     virtual void setBottom(const DOMString &val)
2587                          throw (dom::DOMException)
2588         {
2589         bottom = val;
2590         }
2592     /**
2593      *  return the 'captionSide' property
2594      */
2595     virtual DOMString getCaptionSide()
2596         {
2597         return captionSide;
2598         }
2600     /**
2601      *  set the 'captionSide' property
2602      */
2603     virtual void setCaptionSide(const DOMString &val)
2604                          throw (dom::DOMException)
2605         {
2606         captionSide = val;
2607         }
2609     /**
2610      *  return the 'clear' property
2611      */
2612     virtual DOMString getClear()
2613         {
2614         return clear;
2615         }
2617     /**
2618      *  set the 'clear' property
2619      */
2620     virtual void setClear(const DOMString &val)
2621                          throw (dom::DOMException)
2622         {
2623         clear = val;
2624         }
2626     /**
2627      *  return the 'clip' property
2628      */
2629     virtual DOMString getClip()
2630         {
2631         return clip;
2632         }
2634     /**
2635      *  set the 'clip' property
2636      */
2637     virtual void setClip(const DOMString &val)
2638                          throw (dom::DOMException)
2639         {
2640         clip = val;
2641         }
2643     /**
2644      *  return the 'color' property
2645      */
2646     virtual DOMString getColor()
2647         {
2648         return color;
2649         }
2651     /**
2652      *  set the 'color' property
2653      */
2654     virtual void setColor(const DOMString &val)
2655                          throw (dom::DOMException)
2656         {
2657         color = val;
2658         }
2660     /**
2661      *  return the 'content' property
2662      */
2663     virtual DOMString getContent()
2664         {
2665         return content;
2666         }
2668     /**
2669      *  set the 'content' property
2670      */
2671     virtual void setContent(const DOMString &val)
2672                          throw (dom::DOMException)
2673         {
2674         content = val;
2675         }
2677     /**
2678      *  return the 'counterIncrement' property
2679      */
2680     virtual DOMString getCounterIncrement()
2681         {
2682         return counterIncrement;
2683         }
2685     /**
2686      *  set the 'counterIncrement' property
2687      */
2688     virtual void setCounterIncrement(const DOMString &val)
2689                          throw (dom::DOMException)
2690         {
2691         counterIncrement = val;
2692         }
2694     /**
2695      *  return the 'counterReset' property
2696      */
2697     virtual DOMString getCounterReset()
2698         {
2699         return counterReset;
2700         }
2702     /**
2703      *  set the 'counterReset' property
2704      */
2705     virtual void setCounterReset(const DOMString &val)
2706                          throw (dom::DOMException)
2707         {
2708         counterReset = val;
2709         }
2711     /**
2712      *  return the 'cue' property
2713      */
2714     virtual DOMString getCue()
2715         {
2716         return cue;
2717         }
2719     /**
2720      *  set the 'cue' property
2721      */
2722     virtual void setCue(const DOMString &val)
2723                          throw (dom::DOMException)
2724         {
2725         cue = val;
2726         }
2728     /**
2729      *  return the 'cueAfter' property
2730      */
2731     virtual DOMString getCueAfter()
2732         {
2733         return cueAfter;
2734         }
2736     /**
2737      *  set the 'cueAfter' property
2738      */
2739     virtual void setCueAfter(const DOMString &val)
2740                          throw (dom::DOMException)
2741         {
2742         cueAfter = val;
2743         }
2745     /**
2746      *  return the 'cueBefore' property
2747      */
2748     virtual DOMString getCueBefore()
2749         {
2750         return cueBefore;
2751         }
2753     /**
2754      *  set the 'cueBefore' property
2755      */
2756     virtual void setCueBefore(const DOMString &val)
2757                          throw (dom::DOMException)
2758         {
2759         cueBefore = val;
2760         }
2762     /**
2763      *  return the 'cursor' property
2764      */
2765     virtual DOMString getCursor()
2766         {
2767         return cursor;
2768         }
2770     /**
2771      *  set the 'cursor' property
2772      */
2773     virtual void setCursor(const DOMString &val)
2774                          throw (dom::DOMException)
2775         {
2776         cursor = val;
2777         }
2779     /**
2780      *  return the 'direction' property
2781      */
2782     virtual DOMString getDirection()
2783         {
2784         return direction;
2785         }
2787     /**
2788      *  set the 'direction' property
2789      */
2790     virtual void setDirection(const DOMString &val)
2791                          throw (dom::DOMException)
2792         {
2793         direction = val;
2794         }
2796     /**
2797      *  return the 'display' property
2798      */
2799     virtual DOMString getDisplay()
2800         {
2801         return display;
2802         }
2804     /**
2805      *  set the 'display' property
2806      */
2807     virtual void setDisplay(const DOMString &val)
2808                          throw (dom::DOMException)
2809         {
2810         display = val;
2811         }
2813     /**
2814      *  return the 'elevation' property
2815      */
2816     virtual DOMString getElevation()
2817         {
2818         return elevation;
2819         }
2821     /**
2822      *  set the 'elevation' property
2823      */
2824     virtual void setElevation(const DOMString &val)
2825                          throw (dom::DOMException)
2826         {
2827         elevation = val;
2828         }
2830     /**
2831      *  return the 'emptyCells' property
2832      */
2833     virtual DOMString getEmptyCells()
2834         {
2835         return emptyCells;
2836         }
2838     /**
2839      *  set the 'emptyCells' property
2840      */
2841     virtual void setEmptyCells(const DOMString &val)
2842                          throw (dom::DOMException)
2843         {
2844         emptyCells = val;
2845         }
2847     /**
2848      *  return the 'cssFloat' property
2849      */
2850     virtual DOMString getCssFloat()
2851         {
2852         return cssFloat;
2853         }
2855     /**
2856      *  set the 'cssFloat' property
2857      */
2858     virtual void setCssFloat(const DOMString &val)
2859                          throw (dom::DOMException)
2860         {
2861         cssFloat = val;
2862         }
2864     /**
2865      *  return the 'font' property
2866      */
2867     virtual DOMString getFont()
2868         {
2869         return font;
2870         }
2872     /**
2873      *  set the 'font' property
2874      */
2875     virtual void setFont(const DOMString &val)
2876                          throw (dom::DOMException)
2877         {
2878         font = val;
2879         }
2881     /**
2882      *  return the 'fontFamily' property
2883      */
2884     virtual DOMString getFontFamily()
2885         {
2886         return fontFamily;
2887         }
2889     /**
2890      *  set the 'fontFamily' property
2891      */
2892     virtual void setFontFamily(const DOMString &val)
2893                          throw (dom::DOMException)
2894         {
2895         fontFamily = val;
2896         }
2898     /**
2899      *  return the 'fontSize' property
2900      */
2901     virtual DOMString getFontSize()
2902         {
2903         return fontSize;
2904         }
2906     /**
2907      *  set the 'fontSize' property
2908      */
2909     virtual void setFontSize(const DOMString &val)
2910                          throw (dom::DOMException)
2911         {
2912         fontSize = val;
2913         }
2915     /**
2916      *  return the 'fontSizeAdjust' property
2917      */
2918     virtual DOMString getFontSizeAdjust()
2919         {
2920         return fontSizeAdjust;
2921         }
2923     /**
2924      *  set the 'fontSizeAdjust' property
2925      */
2926     virtual void setFontSizeAdjust(const DOMString &val)
2927                          throw (dom::DOMException)
2928         {
2929         fontSizeAdjust = val;
2930         }
2932     /**
2933      *  return the 'fontStretch' property
2934      */
2935     virtual DOMString getFontStretch()
2936         {
2937         return fontStretch;
2938         }
2940     /**
2941      *  set the 'fontStretch' property
2942      */
2943     virtual void setFontStretch(const DOMString &val)
2944                          throw (dom::DOMException)
2945         {
2946         fontStretch = val;
2947         }
2949     /**
2950      *  return the 'fontStyle' property
2951      */
2952     virtual DOMString getFontStyle()
2953         {
2954         return fontStyle;
2955         }
2957     /**
2958      *  set the 'fontStyle' property
2959      */
2960     virtual void setFontStyle(const DOMString &val)
2961                          throw (dom::DOMException)
2962         {
2963         fontStyle = val;
2964         }
2966     /**
2967      *  return the 'fontVariant' property
2968      */
2969     virtual DOMString getFontVariant()
2970         {
2971         return fontVariant;
2972         }
2974     /**
2975      *  set the 'fontVariant' property
2976      */
2977     virtual void setFontVariant(const DOMString &val)
2978                          throw (dom::DOMException)
2979         {
2980         fontVariant = val;
2981         }
2983     /**
2984      *  return the 'fontWeight' property
2985      */
2986     virtual DOMString getFontWeight()
2987         {
2988         return fontWeight;
2989         }
2991     /**
2992      *  set the 'fontWeight' property
2993      */
2994     virtual void setFontWeight(const DOMString &val)
2995                          throw (dom::DOMException)
2996         {
2997         fontWeight = val;
2998         }
3000     /**
3001      *  return the 'height' property
3002      */
3003     virtual DOMString getHeight()
3004         {
3005         return height;
3006         }
3008     /**
3009      *  set the 'height' property
3010      */
3011     virtual void setHeight(const DOMString &val)
3012                          throw (dom::DOMException)
3013         {
3014         height = val;
3015         }
3017     /**
3018      *  return the 'left' property
3019      */
3020     virtual DOMString getLeft()
3021         {
3022         return left;
3023         }
3025     /**
3026      *  set the 'left' property
3027      */
3028     virtual void setLeft(const DOMString &val)
3029                          throw (dom::DOMException)
3030         {
3031         left = val;
3032         }
3034     /**
3035      *  return the 'letterSpacing' property
3036      */
3037     virtual DOMString getLetterSpacing()
3038         {
3039         return letterSpacing;
3040         }
3042     /**
3043      *  set the 'letterSpacing' property
3044      */
3045     virtual void setLetterSpacing(const DOMString &val)
3046                          throw (dom::DOMException)
3047         {
3048         letterSpacing = val;
3049         }
3051     /**
3052      *  return the 'lineHeight' property
3053      */
3054     virtual DOMString getLineHeight()
3055         {
3056         return lineHeight;
3057         }
3059     /**
3060      *  set the 'lineHeight' property
3061      */
3062     virtual void setLineHeight(const DOMString &val)
3063                          throw (dom::DOMException)
3064         {
3065         lineHeight = val;
3066         }
3068     /**
3069      *  return the 'listStyle' property
3070      */
3071     virtual DOMString getListStyle()
3072         {
3073         return listStyle;
3074         }
3076     /**
3077      *  set the 'listStyle' property
3078      */
3079     virtual void setListStyle(const DOMString &val)
3080                          throw (dom::DOMException)
3081         {
3082         listStyle = val;
3083         }
3085     /**
3086      *  return the 'listStyleImage' property
3087      */
3088     virtual DOMString getListStyleImage()
3089         {
3090         return listStyleImage;
3091         }
3093     /**
3094      *  set the 'listStyleImage' property
3095      */
3096     virtual void setListStyleImage(const DOMString &val)
3097                          throw (dom::DOMException)
3098         {
3099         listStyleImage = val;
3100         }
3102     /**
3103      *  return the 'listStylePosition' property
3104      */
3105     virtual DOMString getListStylePosition()
3106         {
3107         return listStylePosition;
3108         }
3110     /**
3111      *  set the 'listStylePosition' property
3112      */
3113     virtual void setListStylePosition(const DOMString &val)
3114                          throw (dom::DOMException)
3115         {
3116         listStylePosition = val;
3117         }
3119     /**
3120      *  return the 'listStyleType' property
3121      */
3122     virtual DOMString getListStyleType()
3123         {
3124         return listStyleType;
3125         }
3127     /**
3128      *  set the 'listStyleType' property
3129      */
3130     virtual void setListStyleType(const DOMString &val)
3131                          throw (dom::DOMException)
3132         {
3133         listStyleType = val;
3134         }
3136     /**
3137      *  return the 'margin' property
3138      */
3139     virtual DOMString getMargin()
3140         {
3141         return margin;
3142         }
3144     /**
3145      *  set the 'margin' property
3146      */
3147     virtual void setMargin(const DOMString &val)
3148                          throw (dom::DOMException)
3149         {
3150         margin = val;
3151         }
3153     /**
3154      *  return the 'marginTop' property
3155      */
3156     virtual DOMString getMarginTop()
3157         {
3158         return marginTop;
3159         }
3161     /**
3162      *  set the 'marginTop' property
3163      */
3164     virtual void setMarginTop(const DOMString &val)
3165                          throw (dom::DOMException)
3166         {
3167         marginTop = val;
3168         }
3170     /**
3171      *  return the 'marginRight' property
3172      */
3173     virtual DOMString getMarginRight()
3174         {
3175         return marginRight;
3176         }
3178     /**
3179      *  set the 'marginRight' property
3180      */
3181     virtual void setMarginRight(const DOMString &val)
3182                          throw (dom::DOMException)
3183         {
3184         marginRight = val;
3185         }
3187     /**
3188      *  return the 'marginBottom' property
3189      */
3190     virtual DOMString getMarginBottom()
3191         {
3192         return marginBottom;
3193         }
3195     /**
3196      *  set the 'marginBottom' property
3197      */
3198     virtual void setMarginBottom(const DOMString &val)
3199                          throw (dom::DOMException)
3200         {
3201         marginBottom = val;
3202         }
3204     /**
3205      *  return the 'marginLeft' property
3206      */
3207     virtual DOMString getMarginLeft()
3208         {
3209         return marginLeft;
3210         }
3212     /**
3213      *  set the 'marginLeft' property
3214      */
3215     virtual void setMarginLeft(const DOMString &val)
3216                          throw (dom::DOMException)
3217         {
3218         marginLeft = val;
3219         }
3221     /**
3222      *  return the 'markerOffset' property
3223      */
3224     virtual DOMString getMarkerOffset()
3225         {
3226         return markerOffset;
3227         }
3229     /**
3230      *  set the 'markerOffset' property
3231      */
3232     virtual void setMarkerOffset(const DOMString &val)
3233                          throw (dom::DOMException)
3234         {
3235         markerOffset = val;
3236         }
3238     /**
3239      *  return the 'marks' property
3240      */
3241     virtual DOMString getMarks()
3242         {
3243         return marks;
3244         }
3246     /**
3247      *  set the 'marks' property
3248      */
3249     virtual void setMarks(const DOMString &val)
3250                          throw (dom::DOMException)
3251         {
3252         marks = val;
3253         }
3255     /**
3256      *  return the 'maxHeight' property
3257      */
3258     virtual DOMString getMaxHeight()
3259         {
3260         return maxHeight;
3261         }
3263     /**
3264      *  set the 'maxHeight' property
3265      */
3266     virtual void setMaxHeight(const DOMString &val)
3267                          throw (dom::DOMException)
3268         {
3269         maxHeight = val;
3270         }
3272     /**
3273      *  return the 'maxWidth' property
3274      */
3275     virtual DOMString getMaxWidth()
3276         {
3277         return maxWidth;
3278         }
3280     /**
3281      *  set the 'maxWidth' property
3282      */
3283     virtual void setMaxWidth(const DOMString &val)
3284                          throw (dom::DOMException)
3285         {
3286         maxWidth = val;
3287         }
3289     /**
3290      *  return the 'minHeight' property
3291      */
3292     virtual DOMString getMinHeight()
3293         {
3294         return minHeight;
3295         }
3297     /**
3298      *  set the 'minHeight' property
3299      */
3300     virtual void setMinHeight(const DOMString &val)
3301                          throw (dom::DOMException)
3302         {
3303         minHeight = val;
3304         }
3306     /**
3307      *  return the 'minWidth' property
3308      */
3309     virtual DOMString getMinWidth()
3310         {
3311         return minWidth;
3312         }
3314     /**
3315      *  set the 'minWidth' property
3316      */
3317     virtual void setMinWidth(const DOMString &val)
3318                          throw (dom::DOMException)
3319         {
3320         minWidth = val;
3321         }
3323     /**
3324      *  return the 'orphans' property
3325      */
3326     virtual DOMString getOrphans()
3327         {
3328         return orphans;
3329         }
3331     /**
3332      *  set the 'orphans' property
3333      */
3334     virtual void setOrphans(const DOMString &val)
3335                          throw (dom::DOMException)
3336         {
3337         orphans = val;
3338         }
3340     /**
3341      *  return the 'outline' property
3342      */
3343     virtual DOMString getOutline()
3344         {
3345         return outline;
3346         }
3348     /**
3349      *  set the 'outline' property
3350      */
3351     virtual void setOutline(const DOMString &val)
3352                          throw (dom::DOMException)
3353         {
3354         outline = val;
3355         }
3357     /**
3358      *  return the 'outlineColor' property
3359      */
3360     virtual DOMString getOutlineColor()
3361         {
3362         return outlineColor;
3363         }
3365     /**
3366      *  set the 'outlineColor' property
3367      */
3368     virtual void setOutlineColor(const DOMString &val)
3369                          throw (dom::DOMException)
3370         {
3371         outlineColor = val;
3372         }
3374     /**
3375      *  return the 'outlineStyle' property
3376      */
3377     virtual DOMString getOutlineStyle()
3378         {
3379         return outlineStyle;
3380         }
3382     /**
3383      *  set the 'outlineStyle' property
3384      */
3385     virtual void setOutlineStyle(const DOMString &val)
3386                          throw (dom::DOMException)
3387         {
3388         outlineStyle = val;
3389         }
3391     /**
3392      *  return the 'outlineWidth' property
3393      */
3394     virtual DOMString getOutlineWidth()
3395         {
3396         return outlineWidth;
3397         }
3399     /**
3400      *  set the 'outlineWidth' property
3401      */
3402     virtual void setOutlineWidth(const DOMString &val)
3403                          throw (dom::DOMException)
3404         {
3405         outlineWidth = val;
3406         }
3408     /**
3409      *  return the 'overflow' property
3410      */
3411     virtual DOMString getOverflow()
3412         {
3413         return overflow;
3414         }
3416     /**
3417      *  set the 'overflow' property
3418      */
3419     virtual void setOverflow(const DOMString &val)
3420                          throw (dom::DOMException)
3421         {
3422         overflow = val;
3423         }
3425     /**
3426      *  return the 'padding' property
3427      */
3428     virtual DOMString getPadding()
3429         {
3430         return padding;
3431         }
3433     /**
3434      *  set the 'padding' property
3435      */
3436     virtual void setPadding(const DOMString &val)
3437                          throw (dom::DOMException)
3438         {
3439         padding = val;
3440         }
3442     /**
3443      *  return the 'paddingTop' property
3444      */
3445     virtual DOMString getPaddingTop()
3446         {
3447         return paddingTop;
3448         }
3450     /**
3451      *  set the 'paddingTop' property
3452      */
3453     virtual void setPaddingTop(const DOMString &val)
3454                          throw (dom::DOMException)
3455         {
3456         paddingTop = val;
3457         }
3459     /**
3460      *  return the 'paddingRight' property
3461      */
3462     virtual DOMString getPaddingRight()
3463         {
3464         return paddingRight;
3465         }
3467     /**
3468      *  set the 'paddingRight' property
3469      */
3470     virtual void setPaddingRight(const DOMString &val)
3471                          throw (dom::DOMException)
3472         {
3473         paddingRight = val;
3474         }
3476     /**
3477      *  return the 'paddingBottom' property
3478      */
3479     virtual DOMString getPaddingBottom()
3480         {
3481         return paddingBottom;
3482         }
3484     /**
3485      *  set the 'paddingBottom' property
3486      */
3487     virtual void setPaddingBottom(const DOMString &val)
3488                          throw (dom::DOMException)
3489         {
3490         paddingBottom = val;
3491         }
3493     /**
3494      *  return the 'paddingLeft' property
3495      */
3496     virtual DOMString getPaddingLeft()
3497         {
3498         return paddingLeft;
3499         }
3501     /**
3502      *  set the 'paddingLeft' property
3503      */
3504     virtual void setPaddingLeft(const DOMString &val)
3505                          throw (dom::DOMException)
3506         {
3507         paddingLeft = val;
3508         }
3510     /**
3511      *  return the 'page' property
3512      */
3513     virtual DOMString getPage()
3514         {
3515         return page;
3516         }
3518     /**
3519      *  set the 'page' property
3520      */
3521     virtual void setPage(const DOMString &val)
3522                          throw (dom::DOMException)
3523         {
3524         page = val;
3525         }
3527     /**
3528      *  return the 'pageBreakAfter' property
3529      */
3530     virtual DOMString getPageBreakAfter()
3531         {
3532         return pageBreakAfter;
3533         }
3535     /**
3536      *  set the 'pageBreakAfter' property
3537      */
3538     virtual void setPageBreakAfter(const DOMString &val)
3539                          throw (dom::DOMException)
3540         {
3541         pageBreakAfter = val;
3542         }
3544     /**
3545      *  return the 'pageBreakBefore' property
3546      */
3547     virtual DOMString getPageBreakBefore()
3548         {
3549         return pageBreakBefore;
3550         }
3552     /**
3553      *  set the 'pageBreakBefore' property
3554      */
3555     virtual void setPageBreakBefore(const DOMString &val)
3556                          throw (dom::DOMException)
3557         {
3558         pageBreakBefore = val;
3559         }
3561     /**
3562      *  return the 'pageBreakInside' property
3563      */
3564     virtual DOMString getPageBreakInside()
3565         {
3566         return pageBreakInside;
3567         }
3569     /**
3570      *  set the 'pageBreakInside' property
3571      */
3572     virtual void setPageBreakInside(const DOMString &val)
3573                          throw (dom::DOMException)
3574         {
3575         pageBreakInside = val;
3576         }
3578     /**
3579      *  return the 'pause' property
3580      */
3581     virtual DOMString getPause()
3582         {
3583         return pause;
3584         }
3586     /**
3587      *  set the 'pause' property
3588      */
3589     virtual void setPause(const DOMString &val)
3590                          throw (dom::DOMException)
3591         {
3592         pause = val;
3593         }
3595     /**
3596      *  return the 'pauseAfter' property
3597      */
3598     virtual DOMString getPauseAfter()
3599         {
3600         return pauseAfter;
3601         }
3603     /**
3604      *  set the 'pauseAfter' property
3605      */
3606     virtual void setPauseAfter(const DOMString &val)
3607                          throw (dom::DOMException)
3608         {
3609         pauseAfter = val;
3610         }
3612     /**
3613      *  return the 'pauseBefore' property
3614      */
3615     virtual DOMString getPauseBefore()
3616         {
3617         return pauseBefore;
3618         }
3620     /**
3621      *  set the 'pauseBefore' property
3622      */
3623     virtual void setPauseBefore(const DOMString &val)
3624                          throw (dom::DOMException)
3625         {
3626         pauseBefore = val;
3627         }
3629     /**
3630      *  return the 'pitch' property
3631      */
3632     virtual DOMString getPitch()
3633         {
3634         return pitch;
3635         }
3637     /**
3638      *  set the 'pitch' property
3639      */
3640     virtual void setPitch(const DOMString &val)
3641                          throw (dom::DOMException)
3642         {
3643         pitch = val;
3644         }
3646     /**
3647      *  return the 'pitchRange' property
3648      */
3649     virtual DOMString getPitchRange()
3650         {
3651         return pitchRange;
3652         }
3654     /**
3655      *  set the 'pitchRange' property
3656      */
3657     virtual void setPitchRange(const DOMString &val)
3658                          throw (dom::DOMException)
3659         {
3660         pitchRange = val;
3661         }
3663     /**
3664      *  return the 'playDuring' property
3665      */
3666     virtual DOMString getPlayDuring()
3667         {
3668         return playDuring;
3669         }
3671     /**
3672      *  set the 'playDuring' property
3673      */
3674     virtual void setPlayDuring(const DOMString &val)
3675                          throw (dom::DOMException)
3676         {
3677         playDuring = val;
3678         }
3680     /**
3681      *  return the 'position' property
3682      */
3683     virtual DOMString getPosition()
3684         {
3685         return position;
3686         }
3688     /**
3689      *  set the 'position' property
3690      */
3691     virtual void setPosition(const DOMString &val)
3692                          throw (dom::DOMException)
3693         {
3694         position = val;
3695         }
3697     /**
3698      *  return the 'quotes' property
3699      */
3700     virtual DOMString getQuotes()
3701         {
3702         return quotes;
3703         }
3705     /**
3706      *  set the 'quotes' property
3707      */
3708     virtual void setQuotes(const DOMString &val)
3709                          throw (dom::DOMException)
3710         {
3711         quotes = val;
3712         }
3714     /**
3715      *  return the 'richness' property
3716      */
3717     virtual DOMString getRichness()
3718         {
3719         return richness;
3720         }
3722     /**
3723      *  set the 'richness' property
3724      */
3725     virtual void setRichness(const DOMString &val)
3726                          throw (dom::DOMException)
3727         {
3728         richness = val;
3729         }
3731     /**
3732      *  return the 'right' property
3733      */
3734     virtual DOMString getRight()
3735         {
3736         return right;
3737         }
3739     /**
3740      *  set the 'right' property
3741      */
3742     virtual void setRight(const DOMString &val)
3743                          throw (dom::DOMException)
3744         {
3745         right = val;
3746         }
3748     /**
3749      *  return the 'size' property
3750      */
3751     virtual DOMString getSize()
3752         {
3753         return size;
3754         }
3756     /**
3757      *  set the 'size' property
3758      */
3759     virtual void setSize(const DOMString &val)
3760                          throw (dom::DOMException)
3761         {
3762         size = val;
3763         }
3765     /**
3766      *  return the 'speak' property
3767      */
3768     virtual DOMString getSpeak()
3769         {
3770         return speak;
3771         }
3773     /**
3774      *  set the 'speak' property
3775      */
3776     virtual void setSpeak(const DOMString &val)
3777                          throw (dom::DOMException)
3778         {
3779         speak = val;
3780         }
3782     /**
3783      *  return the 'speakHeader' property
3784      */
3785     virtual DOMString getSpeakHeader()
3786         {
3787         return speakHeader;
3788         }
3790     /**
3791      *  set the 'speakHeader' property
3792      */
3793     virtual void setSpeakHeader(const DOMString &val)
3794                          throw (dom::DOMException)
3795         {
3796         speakHeader = val;
3797         }
3799     /**
3800      *  return the 'speakNumeral' property
3801      */
3802     virtual DOMString getSpeakNumeral()
3803         {
3804         return speakNumeral;
3805         }
3807     /**
3808      *  set the 'speakNumeral' property
3809      */
3810     virtual void setSpeakNumeral(const DOMString &val)
3811                          throw (dom::DOMException)
3812         {
3813         speakNumeral = val;
3814         }
3816     /**
3817      *  return the 'speakPunctuation' property
3818      */
3819     virtual DOMString getSpeakPunctuation()
3820         {
3821         return speakPunctuation;
3822         }
3824     /**
3825      *  set the 'speakPunctuation' property
3826      */
3827     virtual void setSpeakPunctuation(const DOMString &val)
3828                          throw (dom::DOMException)
3829         {
3830         speakPunctuation = val;
3831         }
3833     /**
3834      *  return the 'speechRate' property
3835      */
3836     virtual DOMString getSpeechRate()
3837         {
3838         return speechRate;
3839         }
3841     /**
3842      *  set the 'speechRate' property
3843      */
3844     virtual void setSpeechRate(const DOMString &val)
3845                          throw (dom::DOMException)
3846         {
3847         speechRate = val;
3848         }
3850     /**
3851      *  return the 'stress' property
3852      */
3853     virtual DOMString getStress()
3854         {
3855         return stress;
3856         }
3858     /**
3859      *  set the 'stress' property
3860      */
3861     virtual void setStress(const DOMString &val)
3862                          throw (dom::DOMException)
3863         {
3864         stress = val;
3865         }
3867     /**
3868      *  return the 'tableLayout' property
3869      */
3870     virtual DOMString getTableLayout()
3871         {
3872         return tableLayout;
3873         }
3875     /**
3876      *  set the 'tableLayout' property
3877      */
3878     virtual void setTableLayout(const DOMString &val)
3879                          throw (dom::DOMException)
3880         {
3881         tableLayout = val;
3882         }
3884     /**
3885      *  return the 'textAlign' property
3886      */
3887     virtual DOMString getTextAlign()
3888         {
3889         return textAlign;
3890         }
3892     /**
3893      *  set the 'textAlign' property
3894      */
3895     virtual void setTextAlign(const DOMString &val)
3896                          throw (dom::DOMException)
3897         {
3898         textAlign = val;
3899         }
3901     /**
3902      *  return the 'textDecoration' property
3903      */
3904     virtual DOMString getTextDecoration()
3905         {
3906         return textDecoration;
3907         }
3909     /**
3910      *  set the 'textDecoration' property
3911      */
3912     virtual void setTextDecoration(const DOMString &val)
3913                          throw (dom::DOMException)
3914         {
3915         textDecoration = val;
3916         }
3918     /**
3919      *  return the 'textIndent' property
3920      */
3921     virtual DOMString getTextIndent()
3922         {
3923         return textIndent;
3924         }
3926     /**
3927      *  set the 'textIndent' property
3928      */
3929     virtual void setTextIndent(const DOMString &val)
3930                          throw (dom::DOMException)
3931         {
3932         textIndent = val;
3933         }
3935     /**
3936      *  return the 'textShadow' property
3937      */
3938     virtual DOMString getTextShadow()
3939         {
3940         return textShadow;
3941         }
3943     /**
3944      *  set the 'textShadow' property
3945      */
3946     virtual void setTextShadow(const DOMString &val)
3947                          throw (dom::DOMException)
3948         {
3949         textShadow = val;
3950         }
3952     /**
3953      *  return the 'textTransform' property
3954      */
3955     virtual DOMString getTextTransform()
3956         {
3957         return textTransform;
3958         }
3960     /**
3961      *  set the 'textTransform' property
3962      */
3963     virtual void setTextTransform(const DOMString &val)
3964                          throw (dom::DOMException)
3965         {
3966         textTransform = val;
3967         }
3969     /**
3970      *  return the 'top' property
3971      */
3972     virtual DOMString getTop()
3973         {
3974         return top;
3975         }
3977     /**
3978      *  set the 'top' property
3979      */
3980     virtual void setTop(const DOMString &val)
3981                          throw (dom::DOMException)
3982         {
3983         top = val;
3984         }
3986     /**
3987      *  return the 'unicodeBidi' property
3988      */
3989     virtual DOMString getUnicodeBidi()
3990         {
3991         return unicodeBidi;
3992         }
3994     /**
3995      *  set the 'unicodeBidi' property
3996      */
3997     virtual void setUnicodeBidi(const DOMString &val)
3998                          throw (dom::DOMException)
3999         {
4000         unicodeBidi = val;
4001         }
4003     /**
4004      *  return the 'verticalAlign' property
4005      */
4006     virtual DOMString getVerticalAlign()
4007         {
4008         return verticalAlign;
4009         }
4011     /**
4012      *  set the 'verticalAlign' property
4013      */
4014     virtual void setVerticalAlign(const DOMString &val)
4015                          throw (dom::DOMException)
4016         {
4017         verticalAlign = val;
4018         }
4020     /**
4021      *  return the 'visibility' property
4022      */
4023     virtual DOMString getVisibility()
4024         {
4025         return visibility;
4026         }
4028     /**
4029      *  set the 'visibility' property
4030      */
4031     virtual void setVisibility(const DOMString &val)
4032                          throw (dom::DOMException)
4033         {
4034         visibility = val;
4035         }
4037     /**
4038      *  return the 'voiceFamily' property
4039      */
4040     virtual DOMString getVoiceFamily()
4041         {
4042         return voiceFamily;
4043         }
4045     /**
4046      *  set the 'voiceFamily' property
4047      */
4048     virtual void setVoiceFamily(const DOMString &val)
4049                          throw (dom::DOMException)
4050         {
4051         voiceFamily = val;
4052         }
4054     /**
4055      *  return the 'volume' property
4056      */
4057     virtual DOMString getVolume()
4058         {
4059         return volume;
4060         }
4062     /**
4063      *  set the 'volume' property
4064      */
4065     virtual void setVolume(const DOMString &val)
4066                          throw (dom::DOMException)
4067         {
4068         volume = val;
4069         }
4071     /**
4072      *  return the 'whiteSpace' property
4073      */
4074     virtual DOMString getWhiteSpace()
4075         {
4076         return whiteSpace;
4077         }
4079     /**
4080      *  set the 'whiteSpace' property
4081      */
4082     virtual void setWhiteSpace(const DOMString &val)
4083                          throw (dom::DOMException)
4084         {
4085         whiteSpace = val;
4086         }
4088     /**
4089      *  return the 'widows' property
4090      */
4091     virtual DOMString getWidows()
4092         {
4093         return widows;
4094         }
4096     /**
4097      *  set the 'widows' property
4098      */
4099     virtual void setWidows(const DOMString &val)
4100                          throw (dom::DOMException)
4101         {
4102         widows = val;
4103         }
4105     /**
4106      *  return the 'width' property
4107      */
4108     virtual DOMString getWidth()
4109         {
4110         return width;
4111         }
4113     /**
4114      *  set the 'width' property
4115      */
4116     virtual void setWidth(const DOMString &val)
4117                          throw (dom::DOMException)
4118         {
4119         width = val;
4120         }
4122     /**
4123      *  return the 'wordSpacing' property
4124      */
4125     virtual DOMString getWordSpacing()
4126         {
4127         return wordSpacing;
4128         }
4130     /**
4131      *  set the 'wordSpacing' property
4132      */
4133     virtual void setWordSpacing(const DOMString &val)
4134                          throw (dom::DOMException)
4135         {
4136         wordSpacing = val;
4137         }
4139     /**
4140      *  return the 'zIndex' property
4141      */
4142     virtual DOMString getZIndex()
4143         {
4144         return zIndex;
4145         }
4147     /**
4148      *  set the 'zIndex' property
4149      */
4150     virtual void setZIndex(const DOMString &val)
4151                          throw (dom::DOMException)
4152         {
4153         zIndex = val;
4154         }
4158     //##################
4159     //# Non-API methods
4160     //##################
4162     /**
4163      *
4164      */
4165     CSS2Properties()
4166         {
4167         }
4169     /**
4170      *
4171      */
4172     CSS2Properties(const CSS2Properties &other)
4173         {
4174         assign(other);
4175         }
4177     /**
4178      *
4179      */
4180     CSS2Properties &operator=(const CSS2Properties &other)
4181         {
4182         assign(other);
4183         return *this;
4184         }
4186     /**
4187      *
4188      */
4189     void assign(const CSS2Properties &other)
4190         {
4191         azimuth              = other.azimuth;
4192         background           = other.background;
4193         backgroundAttachment = other.backgroundAttachment;
4194         backgroundColor      = other.backgroundColor;
4195         backgroundImage      = other.backgroundImage;
4196         backgroundPosition   = other.backgroundPosition;
4197         backgroundRepeat     = other.backgroundRepeat;
4198         border               = other.border;
4199         borderCollapse       = other.borderCollapse;
4200         borderColor          = other.borderColor;
4201         borderSpacing        = other.borderSpacing;
4202         borderStyle          = other.borderStyle;
4203         borderTop            = other.borderTop;
4204         borderRight          = other.borderRight;
4205         borderBottom         = other.borderBottom;
4206         borderLeft           = other.borderLeft;
4207         borderTopColor       = other.borderTopColor;
4208         borderRightColor     = other.borderRightColor;
4209         borderBottomColor    = other.borderBottomColor;
4210         borderLeftColor      = other.borderLeftColor;
4211         borderTopStyle       = other.borderTopStyle;
4212         borderRightStyle     = other.borderRightStyle;
4213         borderBottomStyle    = other.borderBottomStyle;
4214         borderLeftStyle      = other.borderLeftStyle;
4215         borderTopWidth       = other.borderTopWidth;
4216         borderRightWidth     = other.borderRightWidth;
4217         borderBottomWidth    = other.borderBottomWidth;
4218         borderLeftWidth      = other.borderLeftWidth;
4219         borderWidth          = other.borderWidth;
4220         bottom               = other.bottom;
4221         captionSide          = other.captionSide;
4222         clear                = other.clear;
4223         clip                 = other.clip;
4224         color                = other.color;
4225         content              = other.content;
4226         counterIncrement     = other.counterIncrement;
4227         counterReset         = other.counterReset;
4228         cue                  = other.cue;
4229         cueAfter             = other.cueAfter;
4230         cueBefore            = other.cueBefore;
4231         cursor               = other.cursor;
4232         direction            = other.direction;
4233         display              = other.display;
4234         elevation            = other.elevation;
4235         emptyCells           = other.emptyCells;
4236         cssFloat             = other.cssFloat;
4237         font                 = other.font;
4238         fontFamily           = other.fontFamily;
4239         fontSize             = other.fontSize;
4240         fontSizeAdjust       = other.fontSizeAdjust;
4241         fontStretch          = other.fontStretch;
4242         fontStyle            = other.fontStyle;
4243         fontVariant          = other.fontVariant;
4244         fontWeight           = other.fontWeight;
4245         height               = other.height;
4246         left                 = other.left;
4247         letterSpacing        = other.letterSpacing;
4248         lineHeight           = other.lineHeight;
4249         listStyle            = other.listStyle;
4250         listStyleImage       = other.listStyleImage;
4251         listStylePosition    = other.listStylePosition;
4252         listStyleType        = other.listStyleType;
4253         margin               = other.margin;
4254         marginTop            = other.marginTop;
4255         marginRight          = other.marginRight;
4256         marginBottom         = other.marginBottom;
4257         marginLeft           = other.marginLeft;
4258         markerOffset         = other.markerOffset;
4259         marks                = other.marks;
4260         maxHeight            = other.maxHeight;
4261         maxWidth             = other.maxWidth;
4262         minHeight            = other.minHeight;
4263         minWidth             = other.minWidth;
4264         orphans              = other.orphans;
4265         outline              = other.outline;
4266         outlineColor         = other.outlineColor;
4267         outlineStyle         = other.outlineStyle;
4268         outlineWidth         = other.outlineWidth;
4269         overflow             = other.overflow;
4270         padding              = other.padding;
4271         paddingTop           = other.paddingTop;
4272         paddingRight         = other.paddingRight;
4273         paddingBottom        = other.paddingBottom;
4274         paddingLeft          = other.paddingLeft;
4275         page                 = other.page;
4276         pageBreakAfter       = other.pageBreakAfter;
4277         pageBreakBefore      = other.pageBreakBefore;
4278         pageBreakInside      = other.pageBreakInside;
4279         pause                = other.pause;
4280         pauseAfter           = other.pauseAfter;
4281         pauseBefore          = other.pauseBefore;
4282         pitch                = other.pitch;
4283         pitchRange           = other.pitchRange;
4284         playDuring           = other.playDuring;
4285         position             = other.position;
4286         quotes               = other.quotes;
4287         richness             = other.richness;
4288         right                = other.right;
4289         size                 = other.size;
4290         speak                = other.speak;
4291         speakHeader          = other.speakHeader;
4292         speakNumeral         = other.speakNumeral;
4293         speakPunctuation     = other.speakPunctuation;
4294         speechRate           = other.speechRate;
4295         stress               = other.stress;
4296         tableLayout          = other.tableLayout;
4297         textAlign            = other.textAlign;
4298         textDecoration       = other.textDecoration;
4299         textIndent           = other.textIndent;
4300         textShadow           = other.textShadow;
4301         textTransform        = other.textTransform;
4302         top                  = other.top;
4303         unicodeBidi          = other.unicodeBidi;
4304         verticalAlign        = other.verticalAlign;
4305         visibility           = other.visibility;
4306         voiceFamily          = other.voiceFamily;
4307         volume               = other.volume;
4308         whiteSpace           = other.whiteSpace;
4309         widows               = other.widows;
4310         width                = other.width;
4311         wordSpacing          = other.wordSpacing;
4312         zIndex               = other.zIndex;
4313         }
4315     /**
4316      *
4317      */
4318     virtual ~CSS2Properties() {}
4320 protected:
4322     //######################
4323     //# P R O P E R T I E S
4324     //######################
4325     DOMString azimuth;
4326     DOMString background;
4327     DOMString backgroundAttachment;
4328     DOMString backgroundColor;
4329     DOMString backgroundImage;
4330     DOMString backgroundPosition;
4331     DOMString backgroundRepeat;
4332     DOMString border;
4333     DOMString borderCollapse;
4334     DOMString borderColor;
4335     DOMString borderSpacing;
4336     DOMString borderStyle;
4337     DOMString borderTop;
4338     DOMString borderRight;
4339     DOMString borderBottom;
4340     DOMString borderLeft;
4341     DOMString borderTopColor;
4342     DOMString borderRightColor;
4343     DOMString borderBottomColor;
4344     DOMString borderLeftColor;
4345     DOMString borderTopStyle;
4346     DOMString borderRightStyle;
4347     DOMString borderBottomStyle;
4348     DOMString borderLeftStyle;
4349     DOMString borderTopWidth;
4350     DOMString borderRightWidth;
4351     DOMString borderBottomWidth;
4352     DOMString borderLeftWidth;
4353     DOMString borderWidth;
4354     DOMString bottom;
4355     DOMString captionSide;
4356     DOMString clear;
4357     DOMString clip;
4358     DOMString color;
4359     DOMString content;
4360     DOMString counterIncrement;
4361     DOMString counterReset;
4362     DOMString cue;
4363     DOMString cueAfter;
4364     DOMString cueBefore;
4365     DOMString cursor;
4366     DOMString direction;
4367     DOMString display;
4368     DOMString elevation;
4369     DOMString emptyCells;
4370     DOMString cssFloat;
4371     DOMString font;
4372     DOMString fontFamily;
4373     DOMString fontSize;
4374     DOMString fontSizeAdjust;
4375     DOMString fontStretch;
4376     DOMString fontStyle;
4377     DOMString fontVariant;
4378     DOMString fontWeight;
4379     DOMString height;
4380     DOMString left;
4381     DOMString letterSpacing;
4382     DOMString lineHeight;
4383     DOMString listStyle;
4384     DOMString listStyleImage;
4385     DOMString listStylePosition;
4386     DOMString listStyleType;
4387     DOMString margin;
4388     DOMString marginTop;
4389     DOMString marginRight;
4390     DOMString marginBottom;
4391     DOMString marginLeft;
4392     DOMString markerOffset;
4393     DOMString marks;
4394     DOMString maxHeight;
4395     DOMString maxWidth;
4396     DOMString minHeight;
4397     DOMString minWidth;
4398     DOMString orphans;
4399     DOMString outline;
4400     DOMString outlineColor;
4401     DOMString outlineStyle;
4402     DOMString outlineWidth;
4403     DOMString overflow;
4404     DOMString padding;
4405     DOMString paddingTop;
4406     DOMString paddingRight;
4407     DOMString paddingBottom;
4408     DOMString paddingLeft;
4409     DOMString page;
4410     DOMString pageBreakAfter;
4411     DOMString pageBreakBefore;
4412     DOMString pageBreakInside;
4413     DOMString pause;
4414     DOMString pauseAfter;
4415     DOMString pauseBefore;
4416     DOMString pitch;
4417     DOMString pitchRange;
4418     DOMString playDuring;
4419     DOMString position;
4420     DOMString quotes;
4421     DOMString richness;
4422     DOMString right;
4423     DOMString size;
4424     DOMString speak;
4425     DOMString speakHeader;
4426     DOMString speakNumeral;
4427     DOMString speakPunctuation;
4428     DOMString speechRate;
4429     DOMString stress;
4430     DOMString tableLayout;
4431     DOMString textAlign;
4432     DOMString textDecoration;
4433     DOMString textIndent;
4434     DOMString textShadow;
4435     DOMString textTransform;
4436     DOMString top;
4437     DOMString unicodeBidi;
4438     DOMString verticalAlign;
4439     DOMString visibility;
4440     DOMString voiceFamily;
4441     DOMString volume;
4442     DOMString whiteSpace;
4443     DOMString widows;
4444     DOMString width;
4445     DOMString wordSpacing;
4446     DOMString zIndex;
4449 };
4458 /*#########################################################################
4459 ## ViewCSS
4460 #########################################################################*/
4462 /**
4463  * This interface represents a CSS view. The getComputedStyle method provides a 
4464  * read only access to the computed values of an element.
4465  * 
4466  * The expectation is that an instance of the ViewCSS interface can be obtained 
4467  * by using binding-specific casting methods on an instance of the AbstractView 
4468  * interface.
4469  * 
4470  * Since a computed style is related to an Element node, if this element is 
4471  * removed from the document, the associated CSSStyleDeclaration and CSSValue 
4472  * related to this declaration are no longer valid.
4473  */
4474 class ViewCSS : virtual public views::AbstractView
4476 public:
4478     /**
4479      * This method is used to get the computed style as it is defined in [CSS2]. 
4480      */
4481     virtual CSSStyleDeclaration getComputedStyle(const Element &/*elt*/,
4482                                                  const DOMString &/*pseudoElt*/)
4483         {
4484         CSSStyleDeclaration style;
4485         return style;
4486         }
4488     //##################
4489     //# Non-API methods
4490     //##################
4492     /**
4493      *
4494      */
4495     ViewCSS() : views::AbstractView()
4496        {
4497        }
4499     /**
4500      *
4501      */
4502     ViewCSS(const ViewCSS &other) : views::AbstractView(other)
4503        {
4504        }
4506     /**
4507      *
4508      */
4509     ViewCSS &operator=(const ViewCSS &/*other*/)
4510        {
4511        return *this;
4512        }
4514     /**
4515      *
4516      */
4517     virtual ~ViewCSS() {}
4518 };
4524 /*#########################################################################
4525 ## DocumentCSS
4526 #########################################################################*/
4528 /**
4529  * This interface represents a document with a CSS view.
4530  * 
4531  * The getOverrideStyle method provides a mechanism through which a DOM author 
4532  * could effect immediate change to the style of an element without modifying the 
4533  * explicitly linked style sheets of a document or the inline style of elements 
4534  * in the style sheets. This style sheet comes after the author style sheet in 
4535  * the cascade algorithm and is called override style sheet. The override style 
4536  * sheet takes precedence over author style sheets. An "!important" declaration 
4537  * still takes precedence over a normal declaration. Override, author, and user 
4538  * style sheets all may contain "!important" declarations. User "!important" 
4539  * rules take precedence over both override and author "!important" rules, and 
4540  * override "!important" rules take precedence over author "!important" rules.
4541  * 
4542  * The expectation is that an instance of the DocumentCSS interface can be 
4543  * obtained by using binding-specific casting methods on an instance of the 
4544  * Document interface.
4545  */
4546 class DocumentCSS : virtual public stylesheets::DocumentStyle
4548 public:
4550     /**
4551      * This method is used to retrieve the override style declaration for a specified 
4552      * element and a specified pseudo-element.
4553      */
4554     virtual CSSStyleDeclaration getOverrideStyle(const Element */*elt*/,
4555                                                  const DOMString &/*pseudoElt*/)
4556         {
4557         CSSStyleDeclaration style;
4558         return style;
4559         }
4561     //##################
4562     //# Non-API methods
4563     //##################
4565     /**
4566      *
4567      */
4568     DocumentCSS() : stylesheets::DocumentStyle()
4569         {
4570         }
4572     /**
4573      *
4574      */
4575     DocumentCSS(const DocumentCSS &other) : stylesheets::DocumentStyle(other)
4576        {
4577        }
4579     /**
4580      *
4581      */
4582     DocumentCSS &operator=(const DocumentCSS &/*other*/)
4583        {
4584        return *this;
4585        }
4587     /**
4588      *
4589      */
4590     virtual ~DocumentCSS() {}
4591 };
4598 /*#########################################################################
4599 ## DOMImplementationCSS
4600 #########################################################################*/
4602 /**
4603  * This interface allows the DOM user to create a CSSStyleSheet outside the 
4604  * context of a document. There is no way to associate the new CSSStyleSheet with 
4605  * a document in DOM Level 2.
4606  */
4607 class DOMImplementationCSS : virtual public DOMImplementation
4609 public:
4611     /**
4612      * Creates a new CSSStyleSheet. 
4613      */
4614     virtual CSSStyleSheet createCSSStyleSheet(const DOMString &/*title*/,
4615                                               const DOMString &/*media*/)
4616                                                throw (dom::DOMException)
4617         {
4618         CSSStyleSheet sheet;
4619         return sheet;
4620         }
4622     //##################
4623     //# Non-API methods
4624     //##################
4626     /**
4627      *
4628      */
4629     DOMImplementationCSS() {}
4631     /**
4632      *
4633      */
4634     DOMImplementationCSS(const DOMImplementationCSS &other)
4635                          : DOMImplementation(other)
4636        {
4637        }
4639     /**
4640      *
4641      */
4642     DOMImplementationCSS &operator=(const DOMImplementationCSS &/*other*/)
4643        {
4644        return *this;
4645        }
4647     /**
4648      *
4649      */
4650     virtual ~DOMImplementationCSS() {}
4651 };
4660 }  //namespace css
4661 }  //namespace dom
4662 }  //namespace w3c
4663 }  //namespace org
4666 #endif /* __CSS_H__ */
4668 /*#########################################################################
4669 ## E N D    O F    F I L E
4670 #########################################################################*/