Code

Extensions. XAML export improvements (flowRoot, text decoration, baseline alignement...
[inkscape.git] / src / dom / svg2.h
1 #ifndef __SVG_H__
2 #define __SVG_H__
4 /**
5  * Phoebe DOM Implementation.
6  *
7  * This is a C++ approximation of the W3C DOM model, which follows
8  * fairly closely the specifications in the various .idl files, copies of
9  * which are provided for reference.  Most important is this one:
10  *
11  * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
12  *
13  * Authors:
14  *   Bob Jamison
15  *
16  * Copyright(C) 2005-2008 Bob Jamison
17  *
18  *  This library is free software; you can redistribute it and/or
19  *  modify it under the terms of the GNU Lesser General Public
20  *  License as published by the Free Software Foundation; either
21  *  version 2.1 of the License, or(at your option) any later version.
22  *
23  *  This library is distributed in the hope that it will be useful,
24  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
25  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26  *  Lesser General Public License for more details.
27  *
28  *  You should have received a copy of the GNU Lesser General Public
29  *  License along with this library; if not, write to the Free Software
30  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
31  *
32  * =======================================================================
33  * NOTES
34  *
35  * This API follows:
36  * http://www.w3.org/TR/SVG11/svgdom.html
37  *
38  * This file defines the main SVG-DOM Node types.  Other non-Node types are
39  * defined in svgtypes.h.
40  *    
41  */
44 // For access to DOM2 core
45 #include "dom/dom.h"
47 // For access to DOM2 events
48 #include "dom/events.h"
50 // For access to those parts from DOM2 CSS OM used by SVG DOM.
51 #include "dom/css.h"
53 // For access to those parts from DOM2 Views OM used by SVG DOM.
54 #include "dom/views.h"
56 // For access to the SMIL OM used by SVG DOM.
57 #include "dom/smil.h"
60 #include <math.h>
62 #define SVG_NAMESPACE "http://www.w3.org/2000/svg"
65 namespace org
66 {
67 namespace w3c
68 {
69 namespace dom
70 {
71 namespace svg
72 {
75 //local definitions
76 typedef dom::DOMString DOMString;
77 typedef dom::DOMException DOMException;
78 typedef dom::Element Element;
79 typedef dom::ElementPtr ElementPtr;
80 typedef dom::Document Document;
81 typedef dom::DocumentPtr DocumentPtr;
82 typedef dom::NodeList NodeList;
87 class SVGElement;
88 typedef Ptr<SVGElement> SVGElementPtr;
89 class SVGUseElement;
90 typedef Ptr<SVGUseElement> SVGUseElementPtr;
91 class SVGDocument;
92 typedef Ptr<SVGDocument> SVGDocumentPtr;
94 /*#########################################################################
95 ## SVGException
96 #########################################################################*/
98 /**
99  *
100  */
101 class SVGException
103 public:
105     /**
106      * SVGExceptionCode
107      */
108     typedef enum
109         {
110         SVG_WRONG_TYPE_ERR           = 0,
111         SVG_INVALID_VALUE_ERR        = 1,
112         SVG_MATRIX_NOT_INVERTABLE    = 2
113         } SVGExceptionCode;
115     unsigned short   code;
116 };
124 //########################################################################
125 //########################################################################
126 //#   V A L U E S
127 //########################################################################
128 //########################################################################
134 /*#########################################################################
135 ## SVGAngle
136 #########################################################################*/
138 /**
139  *
140  */
141 class SVGAngle
143 public:
145     /**
146      *  Angle Unit Types
147      */
148     typedef enum
149         {
150         SVG_ANGLETYPE_UNKNOWN     = 0,
151         SVG_ANGLETYPE_UNSPECIFIED = 1,
152         SVG_ANGLETYPE_DEG         = 2,
153         SVG_ANGLETYPE_RAD         = 3,
154         SVG_ANGLETYPE_GRAD        = 4
155         } AngleUnitType;
157     /**
158      *
159      */
160     unsigned short getUnitType();
162     /**
163      *
164      */
165     double getValue();
167     /**
168      *
169      */
170     void setValue(double val) throw(DOMException);
172     /**
173      *
174      */
175     double getValueInSpecifiedUnits();
177     /**
178      *
179      */
180     void setValueInSpecifiedUnits(double /*val*/)
181                                      throw(DOMException);
183     /**
184      *
185      */
186     DOMString getValueAsString();
188     /**
189      *
190      */
191     void setValueAsString(const DOMString &/*val*/)
192                                   throw(DOMException);
194     /**
195      *
196      */
197     void newValueSpecifiedUnits(unsigned short /*unitType*/,
198                                 double /*valueInSpecifiedUnits*/);
200     /**
201      *
202      */
203     void convertToSpecifiedUnits(unsigned short /*unitType*/);
205     //##################
206     //# Non-API methods
207     //##################
209     /**
210      *
211      */
212     SVGAngle();
214     /**
215      *
216      */
217     SVGAngle(const SVGAngle &other);
219     /**
220      *
221      */
222     ~SVGAngle();
224 protected:
226     int unitType;
228     double value;
230 };
233 /*#########################################################################
234 ## SVGLength
235 #########################################################################*/
237 /**
238  *
239  */
240 class SVGLength
242 public:
244     /**
245      * Length Unit Types
246      */
247     typedef enum
248         {
249         SVG_LENGTHTYPE_UNKNOWN    = 0,
250         SVG_LENGTHTYPE_NUMBER     = 1,
251         SVG_LENGTHTYPE_PERCENTAGE = 2,
252         SVG_LENGTHTYPE_EMS        = 3,
253         SVG_LENGTHTYPE_EXS        = 4,
254         SVG_LENGTHTYPE_PX         = 5,
255         SVG_LENGTHTYPE_CM         = 6,
256         SVG_LENGTHTYPE_MM         = 7,
257         SVG_LENGTHTYPE_IN         = 8,
258         SVG_LENGTHTYPE_PT         = 9,
259         SVG_LENGTHTYPE_PC         = 10
260         } LengthUnitType;
262     /**
263      *
264      */
265     unsigned short getUnitType();
267     /**
268      *
269      */
270     double getValue();
272     /**
273      *
274      */
275     void setValue(double val)  throw(DOMException);
277     /**
278      *
279      */
280     double getValueInSpecifiedUnits();
282     /**
283      *
284      */
285     void setValueInSpecifiedUnits(double /*val*/) throw(DOMException);
287     /**
288      *
289      */
290     DOMString getValueAsString();
292     /**
293      *
294      */
295     void setValueAsString(const DOMString& /*val*/) throw(DOMException);
297     /**
298      *
299      */
300     void newValueSpecifiedUnits(unsigned short /*unitType*/, double /*val*/);
302     /**
303      *
304      */
305     void convertToSpecifiedUnits(unsigned short /*unitType*/);
307     //##################
308     //# Non-API methods
309     //##################
311     /**
312      *
313      */
314     SVGLength();
316     /**
317      *
318      */
319     SVGLength(const SVGLength &other);
321     /**
322      *
323      */
324     ~SVGLength();
326 protected:
328     int unitType;
330     double value;
332 };
334 /*#########################################################################
335 ## SVGMatrix
336 #########################################################################*/
338 /**
339  *  In SVG, a Matrix is defined like this:
340  *
341  * | a  c  e |
342  * | b  d  f |
343  * | 0  0  1 |
344  *
345  */
346 class SVGMatrix
348 public:
351     /**
352      *
353      */
354     double getA();
356     /**
357      *
358      */
359     void setA(double val) throw(DOMException);
361     /**
362      *
363      */
364     double getB();
366     /**
367      *
368      */
369     void setB(double val) throw(DOMException);
371     /**
372      *
373      */
374     double getC();
376     /**
377      *
378      */
379     void setC(double val) throw(DOMException);
381     /**
382      *
383      */
384     double getD();
386     /**
387      *
388      */
389     void setD(double val) throw(DOMException);
391     /**
392      *
393      */
394     double getE();
396     /**
397      *
398      */
399     void setE(double val) throw(DOMException);
401     /**
402      *
403      */
404     double getF();
406     /**
407      *
408      */
409     void setF(double val) throw(DOMException);
412     /**
413      * Return the result of postmultiplying this matrix with another.
414      */
415     SVGMatrix multiply(const SVGMatrix &other);
417     /**
418      *  Calculate the inverse of this matrix
419      *
420      *
421      *   The determinant of a 3x3 matrix E
422      *     (let's use our own notation for a bit)
423      *
424      *       A  B  C
425      *       D  E  F
426      *       G  H  I
427      *   is
428      *       AEI - AFH - BDI + BFG + CDH - CEG
429      *
430      *   Since in our affine transforms, G and H==0 and I==1,
431      *   this reduces to:
432      *       AE - BD
433      *   In SVG's naming scheme, that is:  a * d - c * b .  SIMPLE!
434      *
435      *   In a similar method of attack, SVG's adjunct matrix is:
436      *
437      *      d  -c   cf-ed
438      *     -b   a   eb-af
439      *      0   0   ad-cb
440      *
441      *   To get the inverse matrix, we divide the adjunct matrix by
442      *   the determinant.  Notice that(ad-cb)/(ad-cb)==1.  Very cool.
443      *   So what we end up with is this:
444      *
445      *      a =  d/(ad-cb)  c = -c/(ad-cb)   e =(cf-ed)/(ad-cb)
446      *      b = -b/(ad-cb)  d =  a/(ad-cb)   f =(eb-af)/(ad-cb)
447      *
448      *  (Since this would be in all SVG-DOM implementations,
449      *    somebody needed to document this!  ^^)
450      *
451      */
452     SVGMatrix inverse() throw(SVGException);
454     /**
455      * Equivalent to multiplying by:
456      *  | 1  0  x |
457      *  | 0  1  y |
458      *  | 0  0  1 |
459      *
460      */
461     SVGMatrix translate(double x, double y);
463     /**
464      * Equivalent to multiplying by:
465      *  | scale  0      0 |
466      *  | 0      scale  0 |
467      *  | 0      0      1 |
468      *
469      */
470     SVGMatrix scale(double scale);
472     /**
473      * Equivalent to multiplying by:
474      *  | scaleX  0       0 |
475      *  | 0       scaleY  0 |
476      *  | 0       0       1 |
477      *
478      */
479     SVGMatrix scaleNonUniform(double scaleX, double scaleY);
481     /**
482      * Equivalent to multiplying by:
483      *  | cos(a) -sin(a)   0 |
484      *  | sin(a)  cos(a)   0 |
485      *  | 0       0        1 |
486      *
487      */
488     SVGMatrix rotate(double angle);
490     /**
491      * Equivalent to multiplying by:
492      *  | cos(a) -sin(a)   0 |
493      *  | sin(a)  cos(a)   0 |
494      *  | 0       0        1 |
495      *  In this case, angle 'a' is computed as the artangent
496      *  of the slope y/x .  It is negative if the slope is negative.
497      */
498     SVGMatrix rotateFromVector(double x, double y) throw(SVGException);
500     /**
501      * Equivalent to multiplying by:
502      *  | -1   0   0 |
503      *  | 0    1   0 |
504      *  | 0    0   1 |
505      *
506      */
507     SVGMatrix flipX();
509     /**
510      * Equivalent to multiplying by:
511      *  | 1   0   0 |
512      *  | 0  -1   0 |
513      *  | 0   0   1 |
514      *
515      */
516     SVGMatrix flipY();
518     /**
519      *  | 1   tan(a)  0 |
520      *  | 0   1       0 |
521      *  | 0   0       1 |
522      *
523      */
524     SVGMatrix skewX(double angle);
526     /**
527      * Equivalent to multiplying by:
528      *  | 1       0   0 |
529      *  | tan(a)  1   0 |
530      *  | 0       0   1 |
531      *
532      */
533     SVGMatrix skewY(double angle);
536     //##################
537     //# Non-API methods
538     //##################
540     /**
541      *
542      */
543     SVGMatrix();
545     /**
546      *
547      */
548     SVGMatrix(double aArg, double bArg, double cArg,
549               double dArg, double eArg, double fArg);
551     /**
552      * Copy constructor
553      */
554     SVGMatrix(const SVGMatrix &other);
556     /**
557      *
558      */
559     ~SVGMatrix() {}
561 protected:
563 friend class SVGTransform;
565     /*
566      * Set to the identify matrix
567      */
568     void identity();
570     double a, b, c, d, e, f;
572 };
575 /*#########################################################################
576 ## SVGNumber
577 #########################################################################*/
579 /**
580  *
581  */
582 class SVGNumber
584 public:
586     /**
587      *
588      */
589     double getValue();
591     /**
592      *
593      */
594     void setValue(double val) throw(DOMException);
596     //##################
597     //# Non-API methods
598     //##################
600     /**
601      *
602      */
603     SVGNumber();
605     /**
606      *
607      */
608     SVGNumber(const SVGNumber &other);
610     /**
611      *
612      */
613     ~SVGNumber();
615 protected:
617     double value;
619 };
621 /*#########################################################################
622 ## SVGPoint
623 #########################################################################*/
625 /**
626  *
627  */
628 class SVGPoint
630 public:
632     /**
633      *
634      */
635     double getX();
637     /**
638      *
639      */
640     void setX(double val) throw(DOMException);
642     /**
643      *
644      */
645     double getY();
647     /**
648      *
649      */
650     void setY(double val) throw(DOMException);
652     /**
653      *
654      */
655     SVGPoint matrixTransform(const SVGMatrix &/*matrix*/);
657     //##################
658     //# Non-API methods
659     //##################
661     /**
662      *
663      */
664     SVGPoint();
666     /**
667      *
668      */
669     SVGPoint(const SVGPoint &other);
671     /**
672      *
673      */
674     ~SVGPoint();
676 protected:
678     double x, y;
679 };
682 /*#########################################################################
683 ## SVGPathSeg
684 #########################################################################*/
686 /**
687  *
688  */
689 class SVGPathSeg
691 public:
693     /**
694      *  Path Segment Types
695      */
696     typedef enum
697         {
698         PATHSEG_UNKNOWN                      = 0,
699         PATHSEG_CLOSEPATH                    = 1,
700         PATHSEG_MOVETO_ABS                   = 2,
701         PATHSEG_MOVETO_REL                   = 3,
702         PATHSEG_LINETO_ABS                   = 4,
703         PATHSEG_LINETO_REL                   = 5,
704         PATHSEG_CURVETO_CUBIC_ABS            = 6,
705         PATHSEG_CURVETO_CUBIC_REL            = 7,
706         PATHSEG_CURVETO_QUADRATIC_ABS        = 8,
707         PATHSEG_CURVETO_QUADRATIC_REL        = 9,
708         PATHSEG_ARC_ABS                      = 10,
709         PATHSEG_ARC_REL                      = 11,
710         PATHSEG_LINETO_HORIZONTAL_ABS        = 12,
711         PATHSEG_LINETO_HORIZONTAL_REL        = 13,
712         PATHSEG_LINETO_VERTICAL_ABS          = 14,
713         PATHSEG_LINETO_VERTICAL_REL          = 15,
714         PATHSEG_CURVETO_CUBIC_SMOOTH_ABS     = 16,
715         PATHSEG_CURVETO_CUBIC_SMOOTH_REL     = 17,
716         PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18,
717         PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19
718         } PathSegmentType;
720     /**
721      *
722      */
723     unsigned short getPathSegType();
725     /**
726      *
727      */
728     DOMString getPathSegTypeAsLetter();
730     /**
731      * From the various subclasses
732      */
734     /**
735      *
736      */
737     double getX();
739     /**
740      *
741      */
742     void setX(double val) throw(DOMException);
744     /**
745      *
746      */
747     double getX1();
749     /**
750      *
751      */
752     void setX1(double val) throw(DOMException);
754     /**
755      *
756      */
757     double getX2();
759     /**
760      *
761      */
762     void setX2(double val) throw(DOMException);
764     /**
765      *
766      */
767     double getY();
769     /**
770      *
771      */
772     void setY(double val) throw(DOMException);
774     /**
775      *
776      */
777     double getY1();
779     /**
780      *
781      */
782     void setY1(double val) throw(DOMException);
784     /**
785      *
786      */
787     double getY2();
789     /**
790      *
791      */
792     void setY2(double val) throw(DOMException);
794     /**
795      *
796      */
797     double getR1();
799     /**
800      *
801      */
802     void setR1(double val) throw(DOMException);
804     /**
805      *
806      */
807     double getR2();
809     /**
810      *
811      */
812     void setR2(double val) throw(DOMException);
814     /**
815      *
816      */
817     double getAngle();
819     /**
820      *
821      */
822     void setAngle(double val) throw(DOMException);
824     /**
825      *
826      */
827     bool getLargeArcFlag();
829     /**
830      *
831      */
832     void setLargeArcFlag(bool val) throw(DOMException);
834     /**
835      *
836      */
837     bool getSweepFlag();
839     /**
840      *
841      */
842     void setSweepFlag(bool val) throw(DOMException);
845     //##################
846     //# Non-API methods
847     //##################
849     /**
850      *
851      */
852     SVGPathSeg();
854     /**
855      *
856      */
857     SVGPathSeg(int typeArg);
859     /**
860      *
861      */
862     SVGPathSeg(const SVGPathSeg &other);
864     /**
865      *
866      */
867     SVGPathSeg &operator=(const SVGPathSeg &other);
869     /**
870      *
871      */
872     ~SVGPathSeg();
874 protected:
876     void init();
877     
878     void assign(const SVGPathSeg &other);
880     int type;
881     double x, y, x1, y1, x2, y2;
882     double r1, r2;
883     double angle;
884     bool largeArcFlag;
885     bool sweepFlag;
886 };
889 /*#########################################################################
890 ## SVGPreserveAspectRatio
891 #########################################################################*/
893 /**
894  *
895  */
896 class SVGPreserveAspectRatio
898 public:
901     /**
902      * Alignment Types
903      */
904     typedef enum
905         {
906         SVG_PRESERVEASPECTRATIO_UNKNOWN  = 0,
907         SVG_PRESERVEASPECTRATIO_NONE     = 1,
908         SVG_PRESERVEASPECTRATIO_XMINYMIN = 2,
909         SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3,
910         SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4,
911         SVG_PRESERVEASPECTRATIO_XMINYMID = 5,
912         SVG_PRESERVEASPECTRATIO_XMIDYMID = 6,
913         SVG_PRESERVEASPECTRATIO_XMAXYMID = 7,
914         SVG_PRESERVEASPECTRATIO_XMINYMAX = 8,
915         SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9,
916         SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10
917         } AlignmentType;
920     /**
921      * Meet-or-slice Types
922      */
923     typedef enum
924         {
925         SVG_MEETORSLICE_UNKNOWN  = 0,
926         SVG_MEETORSLICE_MEET     = 1,
927         SVG_MEETORSLICE_SLICE    = 2
928         } MeetOrSliceType;
931     /**
932      *
933      */
934     unsigned short getAlign();
936     /**
937      *
938      */
939     void setAlign(unsigned short val) throw(DOMException);
941     /**
942      *
943      */
944     unsigned short getMeetOrSlice();
946     /**
947      *
948      */
949     void setMeetOrSlice(unsigned short val) throw(DOMException);
951     //##################
952     //# Non-API methods
953     //##################
955     /**
956      *
957      */
958     SVGPreserveAspectRatio();
960     /**
961      *
962      */
963     SVGPreserveAspectRatio(const SVGPreserveAspectRatio &other);
965     /**
966      *
967      */
968     ~SVGPreserveAspectRatio();
970 protected:
972     unsigned short align;
973     unsigned short meetOrSlice;
975 };
979 /*#########################################################################
980 ## SVGRect
981 #########################################################################*/
983 /**
984  *
985  */
986 class SVGRect
988 public:
990     /**
991      *
992      */
993     double getX();
995     /**
996      *
997      */
998     void setX(double val) throw(DOMException);
1000     /**
1001      *
1002      */
1003     double getY();
1005     /**
1006      *
1007      */
1008     void setY(double val) throw(DOMException);
1010     /**
1011      *
1012      */
1013     double getWidth();
1015     /**
1016      *
1017      */
1018     void setWidth(double val) throw(DOMException);
1020     /**
1021      *
1022      */
1023     double getHeight();
1025     /**
1026      *
1027      */
1028     void setHeight(double val) throw(DOMException);
1031     //##################
1032     //# Non-API methods
1033     //##################
1035     /**
1036      *
1037      */
1038     SVGRect();
1040     /**
1041      *
1042      */
1043     SVGRect(const SVGRect &other);
1045     /**
1046      *
1047      */
1048     ~SVGRect();
1050 protected:
1052     double x, y, width, height;
1054 };
1056 /*#########################################################################
1057 ## SVGTransform
1058 #########################################################################*/
1060 /**
1061  *
1062  */
1063 class SVGTransform
1065 public:
1067     /**
1068      * Transform Types
1069      */
1070     typedef enum
1071         {
1072         SVG_TRANSFORM_UNKNOWN   = 0,
1073         SVG_TRANSFORM_MATRIX    = 1,
1074         SVG_TRANSFORM_TRANSLATE = 2,
1075         SVG_TRANSFORM_SCALE     = 3,
1076         SVG_TRANSFORM_ROTATE    = 4,
1077         SVG_TRANSFORM_SKEWX     = 5,
1078         SVG_TRANSFORM_SKEWY     = 6,
1079         } TransformType;
1081     /**
1082      *
1083      */
1084     unsigned short getType();
1087     /**
1088      *
1089      */
1090     SVGMatrix getMatrix();
1092     /**
1093      *
1094      */
1095     double getAngle();
1097     /**
1098      *
1099      */
1100     void setMatrix(const SVGMatrix &matrixArg);
1102     /**
1103      *
1104      */
1105     void setTranslate(double tx, double ty);
1107     /**
1108      *
1109      */
1110     void setScale(double sx, double sy);
1112     /**
1113      *
1114      */
1115     void setRotate(double angleArg, double cx, double cy);
1117     /**
1118      *
1119      */
1120     void setSkewX(double angleArg);
1122     /**
1123      *
1124      */
1125     void setSkewY(double angleArg);
1128     //##################
1129     //# Non-API methods
1130     //##################
1132     /**
1133      *
1134      */
1135     SVGTransform();
1137     /**
1138      *
1139      */
1140     SVGTransform(const SVGTransform &other);
1142     /**
1143      *
1144      */
1145     ~SVGTransform();
1147 protected:
1149     int type;
1150     double angle;
1152     SVGMatrix matrix;
1153 };
1158 /*#########################################################################
1159 ## SVGUnitTypes
1160 #########################################################################*/
1162 /**
1163  *
1164  */
1165 class SVGUnitTypes
1167 public:
1169     /**
1170      * Unit Types
1171      */
1172     typedef enum
1173         {
1174         SVG_UNIT_TYPE_UNKNOWN           = 0,
1175         SVG_UNIT_TYPE_USERSPACEONUSE    = 1,
1176         SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2
1177         } UnitType;
1181     //##################
1182     //# Non-API methods
1183     //##################
1185     /**
1186      *
1187      */
1188     SVGUnitTypes();
1190     /**
1191      *
1192      */
1193     ~SVGUnitTypes();
1195 };
1200 /*#########################################################################
1201 ## SVGValue
1202 #########################################################################*/
1204 /**
1205  * This is a helper class that will hold several types of data.  It will
1206  * be used in those situations where methods are common to different 
1207  * interfaces, except for the data type.  This class holds the following:
1208  * SVGAngle
1209  * SVGBoolean
1210  * SVGEnumeration
1211  * SVGInteger
1212  * SVGLength
1213  * SVGNumber
1214  * SVGPreserveAspectRatio
1215  * SVGRect
1216  * SVGString
1217  */   
1218 class SVGValue
1220 public:
1222     /**
1223      *
1224      */
1225     typedef enum
1226         {
1227         SVG_ANGLE,
1228         SVG_BOOLEAN,
1229         SVG_ENUMERATION,
1230         SVG_INTEGER,
1231         SVG_LENGTH,
1232         SVG_NUMBER,
1233         SVG_PRESERVE_ASPECT_RATIO,
1234         SVG_RECT,
1235         SVG_STRING,
1236         } SVGValueType;
1238     /**
1239      * Constructor
1240      */
1241     SVGValue();
1242     
1243     /**
1244      * Copy constructor
1245      */
1246     SVGValue(const SVGValue &other);
1247     
1248     /**
1249      * Assignment
1250      */
1251     SVGValue &operator=(const SVGValue &other);
1252     
1253     /**
1254      *
1255      */
1256     ~SVGValue();
1257         
1258     //###########################
1259     //  TYPES
1260     //###########################
1262     /**
1263      *  Angle
1264      */
1265     SVGValue(const SVGAngle &v);
1266     
1267     SVGAngle angleValue();
1268     
1269     /**
1270      * Boolean
1271      */
1272     SVGValue(bool v);
1273     
1274     bool booleanValue();
1275     
1276     
1277     /**
1278      * Enumeration
1279      */
1280     SVGValue(short v);
1281     
1282     short enumerationValue();
1284     /**
1285      * Integer
1286      */
1287     SVGValue(long v);
1288     
1289     long integerValue();
1290     
1291     /**
1292      * Length
1293      */
1294     SVGValue(const SVGLength &v);
1295     
1296     SVGLength lengthValue();
1297     
1298     /**
1299      * Number
1300      */
1301     SVGValue(double v);
1302     
1303     double numberValue();
1305     /**
1306      * PathSegment
1307      */
1308     SVGValue(const SVGPathSeg &v);
1309     
1310     SVGPathSeg pathDataValue();
1311     
1312     
1313     /**
1314      * Points
1315      */
1316     SVGValue(const SVGPoint &v);
1317     
1318     SVGPoint pointValue();
1319     
1320     
1321     /**
1322      * PreserveAspectRatio
1323      */
1324     SVGValue(const SVGPreserveAspectRatio &v);
1325     
1326     SVGPreserveAspectRatio preserveAspectRatioValue();
1327     
1328     /**
1329      * Rect
1330      */
1331     SVGValue(const SVGRect &v);
1332     
1333     SVGRect rectValue();
1334     
1335     /**
1336      * String
1337      */
1338     SVGValue(const DOMString &v);
1339     
1340     DOMString stringValue();
1341     
1342     /**
1343      * TransformList
1344      */
1345     SVGValue(const SVGTransform &v);
1346     
1347     SVGTransform transformValue();
1348     
1349     
1350 private:
1352     void init();
1353     
1354     void assign(const SVGValue &other);
1355     
1356     short                  type;
1357     SVGAngle               angleval;       // SVGAngle
1358     bool                   bval;           // SVGBoolean
1359     short                  eval;           // SVGEnumeration
1360     long                   ival;           // SVGInteger
1361     SVGLength              lengthval;      // SVGLength
1362     double                 dval;           // SVGNumber
1363     SVGPathSeg             segval;         // SVGPathSeg
1364     SVGPoint               pointval;       // SVGPoint
1365     SVGPreserveAspectRatio parval;         // SVGPreserveAspectRatio
1366     SVGRect                rval;           // SVGRect
1367     DOMString              sval;           // SVGString
1368     SVGTransform           transformval;   // SVGTransform
1370 };
1373 /*#########################################################################
1374 ## SVGValueList
1375 #########################################################################*/
1377 /**
1378  * THis is used to generify a bit the several different types of lists:
1379  *
1380  * SVGLengthList      -> SVGValueList<SVGLength>
1381  * SVGValueList      -> SVGValueList<SVGNumber>
1382  * SVGPathData        -> SVGValueList<SVGPathSeg>
1383  * SVGPoints          -> SVGValueList<SVGPoint>
1384  * SVGTransformList   -> SVGValueList<SVGTransform>
1385  */
1386 class SVGValueList
1388 public:
1390     /**
1391      *
1392      */
1393     typedef enum
1394         {
1395         SVG_LIST_LENGTH,
1396         SVG_LIST_NUMBER,
1397         SVG_LIST_PATHSEG,
1398         SVG_LIST_POINT,
1399         SVG_LIST_TRANSFORM
1400         } SVGValueListTypes;
1402     /**
1403      *
1404      */
1405     unsigned long getNumberOfItems();
1408     /**
1409      *
1410      */
1411     void clear() throw(DOMException);
1413     /**
1414      *
1415      */
1416     SVGValue getItem(unsigned long index) throw(DOMException);
1418     /**
1419      *
1420      */
1421     SVGValue insertItemBefore(const SVGValue &newItem,
1422                                    unsigned long index)
1423                                    throw(DOMException, SVGException);
1425     /**
1426      *
1427      */
1428     SVGValue replaceItem(const SVGValue &newItem,
1429                               unsigned long index)
1430                               throw(DOMException, SVGException);
1432     /**
1433      *
1434      */
1435     SVGValue removeItem(unsigned long index) throw(DOMException);
1437     /**
1438      *
1439      */
1440     SVGValue appendItem(const SVGValue &newItem)
1441                              throw(DOMException, SVGException);
1443     /**
1444      * Matrix
1445      */
1446     SVGValue initialize(const SVGValue &newItem)
1447                          throw(DOMException, SVGException);
1449     /**
1450      * Matrix
1451      */
1452     SVGValue createSVGTransformFromMatrix(const SVGValue &matrix);
1454     /**
1455      * Matrix
1456      */
1457     SVGValue consolidate();
1460     //##################
1461     //# Non-API methods
1462     //##################
1464     /**
1465      *
1466      */
1467     SVGValueList();
1469     /**
1470      *
1471      */
1472     SVGValueList(const SVGValueList &other);
1474     /**
1475      *
1476      */
1477     ~SVGValueList();
1479 protected:
1481     std::vector<SVGValue> items;
1483 };
1489 /*#########################################################################
1490 ## SVGAnimatedValue
1491 #########################################################################*/
1493 /**
1494  * This class is used to merge all of the "Animated" values, with only
1495  * a different type, into a single API.  This class subsumes the following:
1496  * SVGAnimatedValue
1497  * SVGAnimatedValue
1498  * SVGAnimatedValue
1499  * SVGAnimatedValue
1500  * SVGAnimatedValue
1501  * SVGAnimatedValue
1502  * SVGAnimatedPathData
1503  * SVGAnimatedPoints
1504  * SVGAnimatedPreserveAspectRatio
1505  * SVGAnimatedValue
1506  * SVGAnimatedValue
1507  */
1508 class SVGAnimatedValue
1510 public:
1512     /**
1513      *
1514      */
1515     SVGValue &getBaseVal();
1517     /**
1518      *
1519      */
1520     void setBaseVal(const SVGValue &val) throw (DOMException);
1522     /**
1523      *
1524      */
1525     SVGValue &getAnimVal();
1527     /**
1528      *
1529      */
1530     SVGAnimatedValue();
1531     
1532     /**
1533      *
1534      */
1535     SVGAnimatedValue(const SVGValue &baseValue);
1537     /**
1538      *
1539      */
1540     SVGAnimatedValue(const SVGValue &baseValue, const SVGValue &animValue);
1542     /**
1543      *
1544      */
1545     SVGAnimatedValue(const SVGAnimatedValue &other);
1547     /**
1548      *
1549      */
1550     SVGAnimatedValue &operator=(const SVGAnimatedValue &other);
1552     /**
1553      *
1554      */
1555     SVGAnimatedValue &operator=(const SVGValue &baseVal);
1557     /**
1558      *
1559      */
1560     ~SVGAnimatedValue();
1561     
1562 private:
1564     void init();
1565     
1566     void assign(const SVGAnimatedValue &other);
1567     
1568     SVGValue baseVal;
1569     
1570     SVGValue animVal;
1572 };
1575 /*#########################################################################
1576 ## SVGAnimatedValueList
1577 #########################################################################*/
1579 /**
1580  * This class is used to merge all of the "Animated" values, with only
1581  * a different type, into a single API.  This class subsumes the following:
1582  * SVGAnimatedValueList
1583  * SVGAnimatedValueList
1584  * SVGAnimatedTransformList
1585  */
1586 class SVGAnimatedValueList
1588 public:
1590     /**
1591      *
1592      */
1593     SVGValueList &getBaseVal();
1595     /**
1596      *
1597      */
1598     void setBaseVal(const SVGValueList &val) throw (DOMException);
1600     /**
1601      *
1602      */
1603     SVGValueList &getAnimVal();
1605     /**
1606      *
1607      */
1608     SVGAnimatedValueList();
1609     
1610     /**
1611      *
1612      */
1613     SVGAnimatedValueList(const SVGValueList &baseValue);
1615     /**
1616      *
1617      */
1618     SVGAnimatedValueList(const SVGValueList &baseValue, const SVGValueList &animValue);
1620     /**
1621      *
1622      */
1623     SVGAnimatedValueList(const SVGAnimatedValueList &other);
1625     /**
1626      *
1627      */
1628     SVGAnimatedValueList &operator=(const SVGAnimatedValueList &other);
1630     /**
1631      *
1632      */
1633     SVGAnimatedValueList &operator=(const SVGValueList &baseVal);
1635     /**
1636      *
1637      */
1638     ~SVGAnimatedValueList();
1639     
1640 private:
1642     void init();
1643     
1644     void assign(const SVGAnimatedValueList &other);
1645     
1646     SVGValueList baseVal;
1647     
1648     SVGValueList animVal;
1650 };
1654 /*#########################################################################
1655 ## SVGICCColor
1656 #########################################################################*/
1658 /**
1659  *
1660  */
1661 class SVGICCColor
1663 public:
1665     /**
1666      *
1667      */
1668     DOMString getColorProfile();
1670     /**
1671      *
1672      */
1673     void setColorProfile(const DOMString &val) throw(DOMException);
1675     /**
1676      *
1677      */
1678     SVGValueList &getColors();
1682     //##################
1683     //# Non-API methods
1684     //##################
1686     /**
1687      *
1688      */
1689     SVGICCColor();
1691     /**
1692      *
1693      */
1694     SVGICCColor(const SVGICCColor &other);
1696     /**
1697      *
1698      */
1699     ~SVGICCColor();
1701 protected:
1703     DOMString colorProfile;
1705     SVGValueList colors;
1707 };
1711 /*#########################################################################
1712 ## SVGColor
1713 #########################################################################*/
1715 /**
1716  *
1717  */
1718 class SVGColor : public css::CSSValue
1720 public:
1723     /**
1724      * Color Types
1725      */
1726     typedef enum
1727         {
1728         SVG_COLORTYPE_UNKNOWN           = 0,
1729         SVG_COLORTYPE_RGBCOLOR          = 1,
1730         SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2,
1731         SVG_COLORTYPE_CURRENTCOLOR      = 3
1732         } ColorType;
1735     /**
1736      *
1737      */
1738     unsigned short getColorType();
1740     /**
1741      *
1742      */
1743     css::RGBColor getRgbColor();
1745     /**
1746      *
1747      */
1748     SVGICCColor getIccColor();
1751     /**
1752      *
1753      */
1754     void setRGBColor(const DOMString& /*rgbColor*/)
1755                               throw(SVGException);
1757     /**
1758      *
1759      */
1760     void setRGBColorICCColor(const DOMString& /*rgbColor*/,
1761                                       const DOMString& /*iccColor*/)
1762                                       throw(SVGException);
1764     /**
1765      *
1766      */
1767     void setColor(unsigned short /*colorType*/,
1768                            const DOMString& /*rgbColor*/,
1769                            const DOMString& /*iccColor*/)
1770                            throw(SVGException);
1772     //##################
1773     //# Non-API methods
1774     //##################
1776     /**
1777      *
1778      */
1779     SVGColor();
1781     /**
1782      *
1783      */
1784     SVGColor(const SVGColor &other);
1786     /**
1787      *
1788      */
1789     ~SVGColor();
1791 protected:
1793     int colorType;
1795 };
1799 /*#########################################################################
1800 ## SVGPaint
1801 #########################################################################*/
1803 /**
1804  *
1805  */
1806 class SVGPaint : public SVGColor
1808 public:
1810     /**
1811      * Paint Types
1812      */
1813     typedef enum
1814         {
1815         SVG_PAINTTYPE_UNKNOWN               = 0,
1816         SVG_PAINTTYPE_RGBCOLOR              = 1,
1817         SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR     = 2,
1818         SVG_PAINTTYPE_NONE                  = 101,
1819         SVG_PAINTTYPE_CURRENTCOLOR          = 102,
1820         SVG_PAINTTYPE_URI_NONE              = 103,
1821         SVG_PAINTTYPE_URI_CURRENTCOLOR      = 104,
1822         SVG_PAINTTYPE_URI_RGBCOLOR          = 105,
1823         SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
1824         SVG_PAINTTYPE_URI                   = 107
1825         } PaintType;
1828     /**
1829      *
1830      */
1831     unsigned short getPaintType();
1833     /**
1834      *
1835      */
1836     DOMString getUri();
1838     /**
1839      *
1840      */
1841     void setUri(const DOMString& uriArg);
1843     /**
1844      *
1845      */
1846     void setPaint(unsigned short paintTypeArg,
1847                            const DOMString& uriArg,
1848                            const DOMString& /*rgbColor*/,
1849                            const DOMString& /*iccColor*/)
1850                            throw(SVGException);
1852     //##################
1853     //# Non-API methods
1854     //##################
1856     /**
1857      *
1858      */
1859     SVGPaint();
1861     /**
1862      *
1863      */
1864     SVGPaint(const SVGPaint &other);
1866     /**
1867      *
1868      */
1869     ~SVGPaint();
1871 protected:
1873     unsigned int paintType;
1874     DOMString uri;
1876 };
1881 //########################################################################
1882 //########################################################################
1883 //#   I N T E R F A C E S
1884 //########################################################################
1885 //########################################################################
1893 /*#########################################################################
1894 ## SVGStylable
1895 #########################################################################*/
1897 /**
1898  *
1899  */
1900 class SVGStylable
1902 public:
1904     /**
1905      *
1906      */
1907     SVGAnimatedValue getClassName();
1909     /**
1910      *
1911      */
1912     css::CSSStyleDeclaration getStyle();
1915     /**
1916      *
1917      */
1918     css::CSSValue getPresentationAttribute(const DOMString& /*name*/);
1920     //##################
1921     //# Non-API methods
1922     //##################
1924     /**
1925      *
1926      */
1927     SVGStylable();
1929     /**
1930      *
1931      */
1932     SVGStylable(const SVGStylable &other);
1934     /**
1935      *
1936      */
1937     ~SVGStylable();
1939 protected:
1941     SVGAnimatedValue className;
1942     css::CSSStyleDeclaration style;
1944 };
1950 /*#########################################################################
1951 ## SVGLocatable
1952 #########################################################################*/
1954 /**
1955  *
1956  */
1957 class SVGLocatable
1959 public:
1961     /**
1962      *
1963      */
1964     SVGElementPtr getNearestViewportElement();
1966     /**
1967      *
1968      */
1969     SVGElementPtr getFarthestViewportElement();
1971     /**
1972      *
1973      */
1974     SVGRect getBBox();
1976     /**
1977      *
1978      */
1979     SVGMatrix getCTM();
1981     /**
1982      *
1983      */
1984     SVGMatrix getScreenCTM();
1986     /**
1987      *
1988      */
1989     SVGMatrix getTransformToElement(const SVGElement &/*element*/)
1990                     throw(SVGException);
1992     //##################
1993     //# Non-API methods
1994     //##################
1996     /**
1997      *
1998      */
1999     SVGLocatable();
2001     /**
2002      *
2003      */
2004     SVGLocatable(const SVGLocatable &/*other*/);
2006     /**
2007      *
2008      */
2009     ~SVGLocatable();
2011 protected:
2013     SVGRect bbox;
2014     SVGMatrix ctm;
2015     SVGMatrix screenCtm;
2017 };
2020 /*#########################################################################
2021 ## SVGTransformable
2022 #########################################################################*/
2024 /**
2025  *
2026  */
2027 class SVGTransformable : public SVGLocatable
2029 public:
2032     /**
2033      *
2034      */
2035     SVGAnimatedValueList &getTransform();
2037     //##################
2038     //# Non-API methods
2039     //##################
2041     /**
2042      *
2043      */
2044     SVGTransformable();
2046     /**
2047      *
2048      */
2049     SVGTransformable(const SVGTransformable &other);
2051     /**
2052      *
2053      */
2054     ~SVGTransformable();
2056 protected:
2058     SVGAnimatedValueList transforms;
2059 };
2063 /*#########################################################################
2064 ## SVGTests
2065 #########################################################################*/
2067 /**
2068  *
2069  */
2070 class SVGTests
2072 public:
2074     /**
2075      *
2076      */
2077     SVGValueList &getRequiredFeatures();
2079     /**
2080      *
2081      */
2082     SVGValueList &getRequiredExtensions();
2084     /**
2085      *
2086      */
2087     SVGValueList &getSystemLanguage();
2089     /**
2090      *
2091      */
2092     bool hasExtension(const DOMString& /*extension*/);
2094     //##################
2095     //# Non-API methods
2096     //##################
2098     /**
2099      *
2100      */
2101     SVGTests();
2103     /**
2104      *
2105      */
2106     SVGTests(const SVGTests &other);
2108     /**
2109      *
2110      */
2111     ~SVGTests();
2113 protected:
2115     SVGValueList requiredFeatures;
2116     SVGValueList requiredExtensions;
2117     SVGValueList systemLanguage;
2119 };
2126 /*#########################################################################
2127 ## SVGLangSpace
2128 #########################################################################*/
2130 /**
2131  *
2132  */
2133 class SVGLangSpace
2135 public:
2138     /**
2139      *
2140      */
2141     DOMString getXmlLang();
2143     /**
2144      *
2145      */
2146     void setXmlLang(const DOMString &val) throw(DOMException);
2148     /**
2149      *
2150      */
2151     DOMString getXmlSpace();
2153     /**
2154      *
2155      */
2156     void setXmlSpace(const DOMString &val) throw(DOMException);
2158     //##################
2159     //# Non-API methods
2160     //##################
2162     /**
2163      *
2164      */
2165     SVGLangSpace();
2167     /**
2168      *
2169      */
2170     SVGLangSpace(const SVGLangSpace &other);
2172     /**
2173      *
2174      */
2175     ~SVGLangSpace();
2177 protected:
2179     DOMString xmlLang;
2180     DOMString xmlSpace;
2182 };
2186 /*#########################################################################
2187 ## SVGExternalResourcesRequired
2188 #########################################################################*/
2190 /**
2191  *
2192  */
2193 class SVGExternalResourcesRequired
2195 public:
2197     /**
2198      * boolean
2199      */
2200     SVGAnimatedValue getExternalResourcesRequired();
2202     //##################
2203     //# Non-API methods
2204     //##################
2206     /**
2207      *
2208      */
2209     SVGExternalResourcesRequired();
2211     /**
2212      *
2213      */
2214     SVGExternalResourcesRequired(const SVGExternalResourcesRequired &other);
2216     /**
2217      *
2218      */
2219     ~SVGExternalResourcesRequired();
2221 protected:
2223     SVGAnimatedValue required; //boolean
2225 };
2235 /*#########################################################################
2236 ## SVGFitToViewBox
2237 #########################################################################*/
2239 /**
2240  *
2241  */
2242 class SVGFitToViewBox
2244 public:
2246     /**
2247      * rect
2248      */
2249     SVGAnimatedValue getViewBox();
2251     /**
2252      * preserveAspectRatio
2253      */
2254     SVGAnimatedValue getPreserveAspectRatio();
2256     //##################
2257     //# Non-API methods
2258     //##################
2260     /**
2261      *
2262      */
2263     SVGFitToViewBox();
2265     /**
2266      *
2267      */
2268     SVGFitToViewBox(const SVGFitToViewBox &other);
2270     /**
2271      *
2272      */
2273     ~SVGFitToViewBox();
2275 protected:
2277     SVGAnimatedValue viewBox; //rect
2278     SVGAnimatedValue preserveAspectRatio;
2280 };
2283 /*#########################################################################
2284 ## SVGZoomAndPan
2285 #########################################################################*/
2287 /**
2288  *
2289  */
2290 class SVGZoomAndPan
2292 public:
2294     /**
2295      * Zoom and Pan Types
2296      */
2297     typedef enum
2298         {
2299         SVG_ZOOMANDPAN_UNKNOWN = 0,
2300         SVG_ZOOMANDPAN_DISABLE = 1,
2301         SVG_ZOOMANDPAN_MAGNIFY = 2
2302         } ZoomAndPanType;
2304     /**
2305      *
2306      */
2307     unsigned short getZoomAndPan();
2309     /**
2310      *
2311      */
2312     void setZoomAndPan(unsigned short val) throw(DOMException);
2314     //##################
2315     //# Non-API methods
2316     //##################
2318     /**
2319      *
2320      */
2321     SVGZoomAndPan();
2323     /**
2324      *
2325      */
2326     SVGZoomAndPan(const SVGZoomAndPan &other);
2328     /**
2329      *
2330      */
2331     ~SVGZoomAndPan();
2333 protected:
2335     unsigned short zoomAndPan;
2337 };
2344 /*#########################################################################
2345 ## SVGViewSpec
2346 #########################################################################*/
2348 /**
2349  *
2350  */
2351 class SVGViewSpec : public SVGZoomAndPan,
2352                     public SVGFitToViewBox
2354 public:
2356     /**
2357      *
2358      */
2359     SVGValueList getTransform();
2361     /**
2362      *
2363      */
2364     SVGElementPtr getViewTarget();
2366     /**
2367      *
2368      */
2369     DOMString getViewBoxString();
2371     /**
2372      *
2373      */
2374     DOMString getPreserveAspectRatioString();
2376     /**
2377      *
2378      */
2379     DOMString getTransformString();
2381     /**
2382      *
2383      */
2384     DOMString getViewTargetString();
2386     //##################
2387     //# Non-API methods
2388     //##################
2390     /**
2391      *
2392      */
2393     SVGViewSpec();
2395     /**
2396      *
2397      */
2398     SVGViewSpec(const SVGViewSpec &other);
2400     /**
2401      *
2402      */
2403     ~SVGViewSpec();
2405 protected:
2407     SVGElementPtr viewTarget;
2408     SVGValueList transform;
2409 };
2412 /*#########################################################################
2413 ## SVGURIReference
2414 #########################################################################*/
2416 /**
2417  *
2418  */
2419 class SVGURIReference
2421 public:
2423     /**
2424      * string
2425      */
2426     SVGAnimatedValue getHref();
2428     //##################
2429     //# Non-API methods
2430     //##################
2432     /**
2433      *
2434      */
2435     SVGURIReference();
2437     /**
2438      *
2439      */
2440     SVGURIReference(const SVGURIReference &other);
2442     /**
2443      *
2444      */
2445     ~SVGURIReference();
2447 protected:
2449     SVGAnimatedValue href;
2451 };
2458 /*#########################################################################
2459 ## SVGCSSRule
2460 #########################################################################*/
2462 /**
2463  *
2464  */
2465 class SVGCSSRule : public css::CSSRule
2467 public:
2470     /**
2471      * Additional CSS RuleType to support ICC color specifications
2472      */
2473     typedef enum
2474         {
2475         COLOR_PROFILE_RULE = 7
2476         } ColorProfileRuleType;
2478     //##################
2479     //# Non-API methods
2480     //##################
2482     /**
2483      *
2484      */
2485     SVGCSSRule();
2487     /**
2488      *
2489      */
2490     SVGCSSRule(const SVGCSSRule &other);
2492     /**
2493      *
2494      */
2495     ~SVGCSSRule();
2497 };
2501 /*#########################################################################
2502 ## SVGRenderingIntent
2503 #########################################################################*/
2505 /**
2506  *
2507  */
2508 class SVGRenderingIntent
2510 public:
2512     /**
2513      * Rendering Intent Types
2514      */
2515     typedef enum
2516         {
2517         RENDERING_INTENT_UNKNOWN               = 0,
2518         RENDERING_INTENT_AUTO                  = 1,
2519         RENDERING_INTENT_PERCEPTUAL            = 2,
2520         RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3,
2521         RENDERING_INTENT_SATURATION            = 4,
2522         RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5
2523         } RenderingIntentType;
2527     //##################
2528     //# Non-API methods
2529     //##################
2531     /**
2532      *
2533      */
2534     SVGRenderingIntent();
2536     /**
2537      *
2538      */
2539     SVGRenderingIntent(const SVGRenderingIntent &other);
2541     /**
2542      *
2543      */
2544     ~SVGRenderingIntent();
2546 protected:
2548     unsigned short renderingIntentType;
2549 };
2559 /*#########################################################################
2560 ## SVGColorProfileRule
2561 #########################################################################*/
2563 /**
2564  *
2565  */
2566 class SVGColorProfileRule : public SVGCSSRule,
2567                             public SVGRenderingIntent
2570 public:
2572    /**
2573      *
2574      */
2575     DOMString getSrc();
2577     /**
2578      *
2579      */
2580     void setSrc(const DOMString &val) throw(DOMException);
2582     /**
2583      *
2584      */
2585     DOMString getName();
2587     /**
2588      *
2589      */
2590     void setName(const DOMString &val) throw(DOMException);
2592     /**
2593      *
2594      */
2595     unsigned short getRenderingIntent();
2597     /**
2598      *
2599      */
2600     void setRenderingIntent(unsigned short val) throw(DOMException);
2603     //##################
2604     //# Non-API methods
2605     //##################
2607     /**
2608      *
2609      */
2610     SVGColorProfileRule();
2612     /**
2613      *
2614      */
2615     SVGColorProfileRule(const SVGColorProfileRule &other);
2617     /**
2618      *
2619      */
2620     ~SVGColorProfileRule();
2622 protected:
2624     unsigned short renderingIntent;
2625     DOMString src;
2626     DOMString name;
2628 };
2632 /*#########################################################################
2633 ## SVGFilterPrimitiveStandardAttributes
2634 #########################################################################*/
2636 /**
2637  *
2638  */
2639 class SVGFilterPrimitiveStandardAttributes : public SVGStylable
2641 public:
2643     /**
2644      * length
2645      */
2646     SVGAnimatedValue getX();
2648     /**
2649      * length
2650      */
2651     SVGAnimatedValue getY();
2653     /**
2654      * length
2655      */
2656     SVGAnimatedValue getWidth();
2658     /**
2659      * length
2660      */
2661     SVGAnimatedValue getHeight();
2663     /**
2664      * string
2665      */
2666     SVGAnimatedValue getResult();
2668     //##################
2669     //# Non-API methods
2670     //##################
2672     /**
2673      *
2674      */
2675     SVGFilterPrimitiveStandardAttributes();
2677     /**
2678      *
2679      */
2680     SVGFilterPrimitiveStandardAttributes(
2681                 const SVGFilterPrimitiveStandardAttributes &other);
2683     /**
2684      *
2685      */
2686     ~SVGFilterPrimitiveStandardAttributes();
2688 protected:
2690     SVGAnimatedValue x;
2691     SVGAnimatedValue y;
2692     SVGAnimatedValue width;
2693     SVGAnimatedValue height;
2694     SVGAnimatedValue result;
2696 };
2699 /*#########################################################################
2700 ## SVGEvent
2701 #########################################################################*/
2703 /**
2704  *
2705  */
2706 class SVGEvent : events::Event
2708 public:
2710     //##################
2711     //# Non-API methods
2712     //##################
2714     /**
2715      *
2716      */
2717     SVGEvent();
2719     /**
2720      *
2721      */
2722     SVGEvent(const SVGEvent &other);
2724     /**
2725      *
2726      */
2727     ~SVGEvent();
2729 };
2734 /*#########################################################################
2735 ## SVGZoomEvent
2736 #########################################################################*/
2738 /**
2739  *
2740  */
2741 class SVGZoomEvent : events::UIEvent
2743 public:
2745     /**
2746      *
2747      */
2748     SVGRect getZoomRectScreen();
2750     /**
2751      *
2752      */
2753     double getPreviousScale();
2755     /**
2756      *
2757      */
2758     SVGPoint getPreviousTranslate();
2760     /**
2761      *
2762      */
2763     double getNewScale();
2765    /**
2766      *
2767      */
2768     SVGPoint getNewTranslate();
2771     //##################
2772     //# Non-API methods
2773     //##################
2775     /**
2776      *
2777      */
2778     SVGZoomEvent();
2780     /**
2781      *
2782      */
2783     SVGZoomEvent(const SVGZoomEvent &other);
2785     /**
2786      *
2787      */
2788     ~SVGZoomEvent();
2790 protected:
2792     SVGRect  zoomRectScreen;
2793     double   previousScale;
2794     SVGPoint previousTranslate;
2795     double   newScale;
2796     SVGPoint newTranslate;
2798 };
2802 /*#########################################################################
2803 ## SVGElementInstance
2804 #########################################################################*/
2806 /**
2807  *
2808  */
2809 class SVGElementInstance : public events::EventTarget
2811 public:
2813     /**
2814      *
2815      */
2816     SVGElementPtr getCorrespondingElement();
2818     /**
2819      *
2820      */
2821     SVGUseElementPtr getCorrespondingUseElement();
2823     /**
2824      *
2825      */
2826     SVGElementInstance getParentNode();
2828     /**
2829      *  Since we are using stack types and this is a circular definition,
2830      *  we will instead implement this as a global function below:
2831      *   SVGElementInstanceList getChildNodes(const SVGElementInstance instance);
2832      */
2833     //SVGElementInstanceList getChildNodes();
2835     /**
2836      *
2837      */
2838     SVGElementInstance getFirstChild();
2840     /**
2841      *
2842      */
2843     SVGElementInstance getLastChild();
2845     /**
2846      *
2847      */
2848     SVGElementInstance getPreviousSibling();
2850     /**
2851      *
2852      */
2853     SVGElementInstance getNextSibling();
2856     //##################
2857     //# Non-API methods
2858     //##################
2860     /**
2861      *
2862      */
2863     SVGElementInstance();
2865     /**
2866      *
2867      */
2868     SVGElementInstance(const SVGElementInstance &other);
2870     /**
2871      *
2872      */
2873     ~SVGElementInstance();
2875 protected:
2877     SVGElementPtr      correspondingElement;
2878     SVGUseElementPtr   correspondingUseElement;
2880 };
2887 /*#########################################################################
2888 ## SVGElementInstanceList
2889 #########################################################################*/
2891 /**
2892  *
2893  */
2894 class SVGElementInstanceList
2896 public:
2898     /**
2899      *
2900      */
2901     unsigned long getLength();
2903     /**
2904      *
2905      */
2906     SVGElementInstance item(unsigned long index);
2908     /**
2909      *  This static method replaces the circular definition of:
2910      *        SVGElementInstanceList SVGElementInstance::getChildNodes()
2911      *
2912      */
2913     static SVGElementInstanceList getChildNodes(const SVGElementInstance &/*instance*/);
2916     //##################
2917     //# Non-API methods
2918     //##################
2920     /**
2921      *
2922      */
2923     SVGElementInstanceList();
2925     /**
2926      *
2927      */
2928     SVGElementInstanceList(const SVGElementInstanceList &other);
2930     /**
2931      *
2932      */
2933     ~SVGElementInstanceList();
2935 protected:
2937     std::vector<SVGElementInstance> items;
2940 };
2949 //########################################################################
2950 //########################################################################
2951 //########################################################################
2952 //#   D O M
2953 //########################################################################
2954 //########################################################################
2955 //########################################################################
2961 /*#########################################################################
2962 ## Types
2963 #########################################################################*/
2965 /**
2966  * Bitmasks for has_an interface for SVGElement
2967  */ 
2968 #define SVG_ANGLE                          0x00000001
2969 #define SVG_ANIMATED_ANGLE                 0x00000002
2970 #define SVG_ANIMATED_BOOLEAN               0x00000004
2971 #define SVG_ANIMATED_ENUMERATION           0x00000008
2972 #define SVG_ANIMATED_INTEGER               0x00000010
2973 #define SVG_ANIMATED_LENGTH                0x00000020
2974 #define SVG_ANIMATED_LENGTH_LIST           0x00000040
2975 #define SVG_ANIMATED_NUMBER                0x00000080
2976 #define SVG_ANIMATED_NUMBER_LIST           0x00000100
2977 #define SVG_ANIMATED_RECT                  0x00000200
2978 #define SVG_ANIMATED_STRING                0x00000400
2979 #define SVG_COLOR                          0x00000800
2980 #define SVG_CSS_RULE                       0x00001000
2981 #define SVG_EXTERNAL_RESOURCES_REQUIRED    0x00002000
2982 #define SVG_FIT_TO_VIEWBOX                 0x00004000
2983 #define SVG_ICCCOLOR                       0x00008000
2984 #define SVG_LANG_SPACE                     0x00010000
2985 #define SVG_LENGTH                         0x00020000
2986 #define SVG_LENGTH_LIST                    0x00040000
2987 #define SVG_LOCATABLE                      0x00080000
2988 #define SVG_NUMBER                         0x00100000
2989 #define SVG_NUMBER_LIST                    0x00200000
2990 #define SVG_RECT                           0x00400000
2991 #define SVG_RENDERING_INTENT               0x00800000
2992 #define SVG_STRING_LIST                    0x01000000
2993 #define SVG_STYLABLE                       0x02000000
2994 #define SVG_TESTS                          0x04000000
2995 #define SVG_TRANSFORMABLE                  0x08000000
2996 #define SVG_UNIT_TYPES                     0x10000000
2997 #define SVG_URI_REFERENCE                  0x20000000
2998 #define SVG_VIEW_SPEC                      0x40000000
2999 #define SVG_ZOOM_AND_PAN                   0x80000000
3001 /**
3002  * How many above?  Quite handy
3003  */ 
3004 #define SVG_NR_INTERFACES                  32
3007 /**
3008  * Enumerations for SVGElement types
3009  */ 
3010 typedef enum
3012     SVG_A_ELEMENT = 0,
3013     SVG_ALTGLYPH_ELEMENT,
3014     SVG_ALTGLYPHDEF_ELEMENT,
3015     SVG_ALTGLYPHITEM_ELEMENT,
3016     SVG_ANIMATE_ELEMENT,
3017     SVG_ANIMATECOLOR_ELEMENT,
3018     SVG_ANIMATEMOTION_ELEMENT,
3019     SVG_ANIMATETRANSFORM_ELEMENT,
3020     SVG_CIRCLE_ELEMENT,
3021     SVG_CLIPPATH_ELEMENT,
3022     SVG_COLOR_PROFILE_ELEMENT,
3023     SVG_CURSOR_ELEMENT,
3024     SVG_DEFINITION_SRC_ELEMENT,
3025     SVG_DEFS_ELEMENT,
3026     SVG_DESC_ELEMENT,
3027     SVG_ELLIPSE_ELEMENT,
3028     SVG_FEBLEND_ELEMENT,
3029     SVG_FECOLORMATRIX_ELEMENT,
3030     SVG_FECOMPONENTTRANSFER_ELEMENT,
3031     SVG_FECOMPOSITE_ELEMENT,
3032     SVG_FECONVOLVEMATRIX_ELEMENT,
3033     SVG_FEDIFFUSELIGHTING_ELEMENT,
3034     SVG_FEDISPLACEMENTMAP_ELEMENT,
3035     SVG_FEDISTANTLIGHT_ELEMENT,
3036     SVG_FEFLOOD_ELEMENT,
3037     SVG_FEFUNCA_ELEMENT,
3038     SVG_FEFUNCB_ELEMENT,
3039     SVG_FEFUNCG_ELEMENT,
3040     SVG_FEFUNCR_ELEMENT,
3041     SVG_FEGAUSSIANBLUR_ELEMENT,
3042     SVG_FEIMAGE_ELEMENT,
3043     SVG_FEMERGE_ELEMENT,
3044     SVG_FEMERGENODE_ELEMENT,
3045     SVG_FEMORPHOLOGY_ELEMENT,
3046     SVG_FEOFFSET_ELEMENT,
3047     SVG_FEPOINTLIGHT_ELEMENT,
3048     SVG_FESPECULARLIGHTING_ELEMENT,
3049     SVG_FESPOTLIGHT_ELEMENT,
3050     SVG_FETILE_ELEMENT,
3051     SVG_FETURBULENCE_ELEMENT,
3052     SVG_FILTER_ELEMENT,
3053     SVG_FONT_ELEMENT,
3054     SVG_FONT_FACE_ELEMENT,
3055     SVG_FONT_FACE_FORMAT_ELEMENT,
3056     SVG_FONT_FACE_NAME_ELEMENT,
3057     SVG_FONT_FACE_SRC_ELEMENT,
3058     SVG_FONT_FACE_URI_ELEMENT,
3059     SVG_FOREIGNOBJECT_ELEMENT,
3060     SVG_G_ELEMENT,
3061     SVG_GLYPH_ELEMENT,
3062     SVG_GLYPHREF_ELEMENT,
3063     SVG_HKERN_ELEMENT,
3064     SVG_IMAGE_ELEMENT,
3065     SVG_LINE_ELEMENT,
3066     SVG_LINEARGRADIENT_ELEMENT,
3067     SVG_MARKER_ELEMENT,
3068     SVG_MASK_ELEMENT,
3069     SVG_METADATA_ELEMENT,
3070     SVG_MISSING_GLYPH_ELEMENT,
3071     SVG_MPATH_ELEMENT,
3072     SVG_PATH_ELEMENT,
3073     SVG_PATTERN_ELEMENT,
3074     SVG_POLYGON_ELEMENT,
3075     SVG_POLYLINE_ELEMENT,
3076     SVG_RADIALGRADIENT_ELEMENT,
3077     SVG_RECT_ELEMENT,
3078     SVG_SCRIPT_ELEMENT,
3079     SVG_SET_ELEMENT,
3080     SVG_STOP_ELEMENT,
3081     SVG_STYLE_ELEMENT,
3082     SVG_SVG_ELEMENT,
3083     SVG_SWITCH_ELEMENT,
3084     SVG_SYMBOL_ELEMENT,
3085     SVG_TEXT_ELEMENT,
3086     SVG_TEXTPATH_ELEMENT,
3087     SVG_TITLE_ELEMENT,
3088     SVG_TREF_ELEMENT,
3089     SVG_TSPAN_ELEMENT,
3090     SVG_USE_ELEMENT,
3091     SVG_VIEW_ELEMENT,
3092     SVG_VKERN_ELEMENT,
3093     SVG_MAX_ELEMENT
3094 } SVGElementType;
3099 /**
3100  * Look up the SVG Element type enum for a given string
3101  * Return -1 if not found
3102  */
3103 int svgElementStrToEnum(const char *str);
3106 /**
3107  * Return the string corresponding to a given SVG element type enum
3108  * Return "unknown" if not found
3109  */
3110 const char *svgElementEnumToStr(int type);
3115 /*#########################################################################
3116 ## SVGElement
3117 #########################################################################*/
3119 /**
3120  * All of the SVG DOM interfaces that correspond directly to elements in the SVG
3121  * language(e.g., the SVGPathElement interface corresponds directly to the
3122  * 'path' element in the language) are derivative from base class SVGElement.
3123  */
3124 class SVGElement : public Element
3126 public:
3128     //####################################################################
3129     //# BASE METHODS FOR SVGElement
3130     //####################################################################
3132     /**
3133      * Get the value of the id attribute on the given element.
3134      */
3135     DOMString getId();
3137     /**
3138      * Set the value of the id attribute on the given element.
3139      */
3140     void setId(const DOMString &val) throw(DOMException);
3142     /**
3143      * Corresponds to attribute xml:base on the given element.
3144      */
3145     DOMString getXmlBase();
3147     /**
3148      * Corresponds to attribute xml:base on the given element.
3149      */
3150     void setXmlBase(const DOMString &val) throw(DOMException);
3152     /**
3153      * The nearest ancestor 'svg' element. Null if the given element is the
3154      *      outermost 'svg' element.
3155      */
3156     SVGElementPtr getOwnerSVGElement();
3158     /**
3159      * The element which established the current viewport. Often, the nearest
3160      * ancestor 'svg' element. Null if the given element is the outermost 'svg'
3161      * element.
3162      */
3163     SVGElementPtr getViewportElement();
3167     //####################################################################
3168     //####################################################################
3169     //# E L E M E N T S
3170     //####################################################################
3171     //####################################################################
3173     //####################################################################
3174     //# SVGAElement
3175     //####################################################################
3178     /**
3179      *
3180      */
3181     SVGAnimatedValue getTarget();
3185     //####################################################################
3186     //# SVGAltGlyphElement
3187     //####################################################################
3190     /**
3191      * Get the attribute glyphRef on the given element.
3192      */
3193     DOMString getGlyphRef();
3195     /**
3196      * Set the attribute glyphRef on the given element.
3197      */
3198     void setGlyphRef(const DOMString &val) throw(DOMException);
3200     /**
3201      * Get the attribute format on the given element.
3202      */
3203     DOMString getFormat();
3205     /**
3206      * Set the attribute format on the given element.
3207      */
3208     void setFormat(const DOMString &val) throw(DOMException);
3211     //####################################################################
3212     //# SVGAltGlyphDefElement
3213     //####################################################################
3215     //####################################################################
3216     //# SVGAltGlyphItemElement
3217     //####################################################################
3220     //####################################################################
3221     //# SVGAnimateElement
3222     //####################################################################
3225     //####################################################################
3226     //# SVGAnimateColorElement
3227     //####################################################################
3229     //####################################################################
3230     //# SVGAnimateMotionElement
3231     //####################################################################
3234     //####################################################################
3235     //# SVGAnimateTransformElement
3236     //####################################################################
3239     //####################################################################
3240     //# SVGAnimationElement
3241     //####################################################################
3244     /**
3245      *
3246      */
3247     SVGElementPtr getTargetElement();
3249     /**
3250      *
3251      */
3252     double getStartTime();
3254     /**
3255      *
3256      */
3257     double getCurrentTime();
3259     /**
3260      *
3261      */
3262     double getSimpleDuration() throw(DOMException);
3266     //####################################################################
3267     //# SVGCircleElement
3268     //####################################################################
3270     /**
3271      * Corresponds to attribute cx on the given 'circle' element.
3272      */
3273     SVGAnimatedValue getCx();
3275     /**
3276      * Corresponds to attribute cy on the given 'circle' element.
3277      */
3278     SVGAnimatedValue getCy();
3280     /**
3281      * Corresponds to attribute r on the given 'circle' element.
3282      */
3283     SVGAnimatedValue getR();
3285     //####################################################################
3286     //# SVGClipPathElement
3287     //####################################################################
3290     /**
3291      * Corresponds to attribute clipPathUnits on the given 'clipPath' element.
3292      *      Takes one of the constants defined in SVGUnitTypes.
3293      */
3294     SVGAnimatedValue getClipPathUnits();
3298     //####################################################################
3299     //# SVGColorProfileElement
3300     //####################################################################
3303     /**
3304      * Get the attribute local on the given element.
3305      */
3306     DOMString getLocal();
3308     /**
3309      * Set the attribute local on the given element.
3310      */
3311     void setLocal(const DOMString &val) throw(DOMException);
3313     /**
3314      * Get the attribute name on the given element.
3315      */
3316     DOMString getName();
3318     /**
3319      * Set the attribute name on the given element.
3320      */
3321     void setName(const DOMString &val) throw(DOMException);
3323     /**
3324      * Set the attribute rendering-intent on the given element.
3325      * The type of rendering intent, identified by one of the
3326      *      SVGRenderingIntent constants.
3327      */
3328     unsigned short getRenderingIntent();
3330     /**
3331      * Get the attribute rendering-intent on the given element.
3332      */
3333     void setRenderingIntent(unsigned short val) throw(DOMException);
3336     //####################################################################
3337     //# SVGComponentTransferFunctionElement
3338     //####################################################################
3341     /**
3342      * Component Transfer Types
3343      */
3344     typedef enum
3345         {
3346         SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN  = 0,
3347         SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1,
3348         SVG_FECOMPONENTTRANSFER_TYPE_TABLE    = 2,
3349         SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3,
3350         SVG_FECOMPONENTTRANSFER_TYPE_LINEAR   = 4,
3351         SVG_FECOMPONENTTRANSFER_TYPE_GAMMA    = 5
3352         } ComponentTransferType;
3355     /**
3356      * Corresponds to attribute type on the given element. Takes one\
3357      *      of the Component Transfer Types.
3358      *  -- also in SVGCSSRule
3359      */
3360     // SVGAnimatedValue getType();
3362     /**
3363      * Corresponds to attribute tableValues on the given element.
3364      */
3365     SVGAnimatedValueList getTableValues();
3367     /**
3368      * Corresponds to attribute slope on the given element.
3369      */
3370     SVGAnimatedValue getSlope();
3372     /**
3373      * Corresponds to attribute intercept on the given element.
3374      */
3375     SVGAnimatedValue getIntercept();
3377     /**
3378      * Corresponds to attribute amplitude on the given element.
3379      */
3380     SVGAnimatedValue getAmplitude();
3382     /**
3383      * Corresponds to attribute exponent on the given element.
3384      */
3385     SVGAnimatedValue getExponent();
3387     /**
3388      * Corresponds to attribute offset on the given element.
3389      */
3390     SVGAnimatedValue getOffset();
3392     //####################################################################
3393     //# SVGCursorElement
3394     //####################################################################
3396     /**
3397      * -- also in SVGRect
3398      */
3399     // SVGAnimatedValue getX();
3401     /**
3402      * -- also in SVGRect
3403      */
3404     // SVGAnimatedValue getY();
3407     //####################################################################
3408     //# SVGDefinitionSrcElement
3409     //####################################################################
3411     //####################################################################
3412     //# SVGDefsElement
3413     //####################################################################
3415     //####################################################################
3416     //# SVGDescElement
3417     //####################################################################
3419     //####################################################################
3420     //# SVGEllipseElement
3421     //####################################################################
3423     /**
3424      * Corresponds to attribute cx on the given 'ellipse' element.
3425      * -- also in Circle
3426      */
3427     // SVGAnimatedValue getCx();
3429     /**
3430      * Corresponds to attribute cy on the given 'ellipse' element.
3431      * -- also in Circle
3432      */
3433     // SVGAnimatedValue getCy();
3435     /**
3436      * Corresponds to attribute rx on the given 'ellipse' element.
3437      */
3438     SVGAnimatedValue getRx();
3440     /**
3441      * Corresponds to attribute ry on the given 'ellipse' element.
3442      */
3443     SVGAnimatedValue getRy();
3446     //####################################################################
3447     //# SVGFEBlendElement
3448     //####################################################################
3450     /**
3451      * Blend Mode Types
3452      */
3453     typedef enum
3454         {
3455         SVG_FEBLEND_MODE_UNKNOWN  = 0,
3456         SVG_FEBLEND_MODE_NORMAL   = 1,
3457         SVG_FEBLEND_MODE_MULTIPLY = 2,
3458         SVG_FEBLEND_MODE_SCREEN   = 3,
3459         SVG_FEBLEND_MODE_DARKEN   = 4,
3460         SVG_FEBLEND_MODE_LIGHTEN  = 5
3461         } BlendModeType;
3463     /**
3464      * Corresponds to attribute in on the given 'feBlend' element.
3465      */
3466     SVGAnimatedValue getIn1();
3468     /**
3469      * Corresponds to attribute in2 on the given 'feBlend' element.
3470      */
3471     SVGAnimatedValue getIn2();
3473     /**
3474      * Corresponds to attribute mode on the given 'feBlend' element.
3475      *      Takes one of the Blend Mode Types.
3476      */
3477     SVGAnimatedValue getMode();
3480     //####################################################################
3481     //# SVGFEColorMatrixElement
3482     //####################################################################
3484     /**
3485      * Color Matrix Types
3486      */
3487     typedef enum
3488         {
3489         SVG_FECOLORMATRIX_TYPE_UNKNOWN          = 0,
3490         SVG_FECOLORMATRIX_TYPE_MATRIX           = 1,
3491         SVG_FECOLORMATRIX_TYPE_SATURATE         = 2,
3492         SVG_FECOLORMATRIX_TYPE_HUEROTATE        = 3,
3493         SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4
3494         } ColorMatrixType;
3497     /**
3498      * Corresponds to attribute in on the given 'feColorMatrix' element.
3499      * - also in feBlend
3500      */
3501     // SVGAnimatedValue getIn1();
3503     /**
3504      * Corresponds to attribute type on the given 'feColorMatrix' element.
3505      *      Takes one of the Color Matrix Types.
3506      * -- also in CSSRule
3507      */
3508     // SVGAnimatedValue getType();
3510     /**
3511      * Corresponds to attribute values on the given 'feColorMatrix' element.
3512      * Provides access to the contents of the values attribute.
3513      */
3514     SVGAnimatedValueList getValues();
3517     //####################################################################
3518     //# SVGFEComponentTransferElement
3519     //####################################################################
3522     /**
3523      * Corresponds to attribute in on the given 'feComponentTransfer'  element.
3524      * -- also in feBlend
3525      */
3526     // SVGAnimatedValue getIn1();
3528     //####################################################################
3529     //# SVGFECompositeElement
3530     //####################################################################
3532     /**
3533      *  Composite Operators
3534      */
3535     typedef enum
3536         {
3537         SVG_FECOMPOSITE_OPERATOR_UNKNOWN    = 0,
3538         SVG_FECOMPOSITE_OPERATOR_OVER       = 1,
3539         SVG_FECOMPOSITE_OPERATOR_IN         = 2,
3540         SVG_FECOMPOSITE_OPERATOR_OUT        = 3,
3541         SVG_FECOMPOSITE_OPERATOR_ATOP       = 4,
3542         SVG_FECOMPOSITE_OPERATOR_XOR        = 5,
3543         SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6
3544         } CompositeOperatorType;
3546     /**
3547      * Corresponds to attribute in on the given 'feComposite' element.
3548      * -- also in feBlend
3549      */
3550     // SVGAnimatedValue getIn1();
3552     /**
3553      * Corresponds to attribute in2 on the given 'feComposite' element.
3554      * -- also in feBlend
3555      */
3556     // SVGAnimatedValue getIn2();
3558     /**
3559      * Corresponds to attribute operator on the given 'feComposite' element.
3560      *      Takes one of the Composite Operators.
3561      */
3562     SVGAnimatedValue getOperator();
3564     /**
3565      * Corresponds to attribute k1 on the given 'feComposite' element.
3566      */
3567     SVGAnimatedValue getK1();
3569     /**
3570      * Corresponds to attribute k2 on the given 'feComposite' element.
3571      */
3572     SVGAnimatedValue getK2();
3574     /**
3575      * Corresponds to attribute k3 on the given 'feComposite' element.
3576      */
3577     SVGAnimatedValue getK3();
3579     /**
3580      * Corresponds to attribute k4 on the given 'feComposite' element.
3581      */
3582     SVGAnimatedValue getK4();
3585     //####################################################################
3586     //# SVGFEConvolveMatrixElement
3587     //####################################################################
3590     /**
3591      * Edge Mode Values
3592      */
3593     typedef enum
3594         {
3595         SVG_EDGEMODE_UNKNOWN   = 0,
3596         SVG_EDGEMODE_DUPLICATE = 1,
3597         SVG_EDGEMODE_WRAP      = 2,
3598         SVG_EDGEMODE_NONE      = 3
3599         } EdgeModeType;
3602     /**
3603      * Corresponds to attribute order on the given 'feConvolveMatrix'  element.
3604      */
3605     SVGAnimatedValue getOrderX();
3607     /**
3608      * Corresponds to attribute order on the given 'feConvolveMatrix'  element.
3609      */
3610     SVGAnimatedValue getOrderY();
3612     /**
3613      * Corresponds to attribute kernelMatrix on the given element.
3614      */
3615     SVGAnimatedValueList getKernelMatrix();
3617     /**
3618      * Corresponds to attribute divisor on the given 'feConvolveMatrix' element.
3619      */
3620     SVGAnimatedValue getDivisor();
3622     /**
3623      * Corresponds to attribute bias on the given 'feConvolveMatrix'  element.
3624      */
3625     SVGAnimatedValue getBias();
3627     /**
3628      * Corresponds to attribute targetX on the given 'feConvolveMatrix'  element.
3629      */
3630     SVGAnimatedValue getTargetX();
3632     /**
3633      * Corresponds to attribute targetY on the given 'feConvolveMatrix'  element.
3634      */
3635     SVGAnimatedValue getTargetY();
3637     /**
3638      * Corresponds to attribute edgeMode on the given 'feConvolveMatrix'
3639      *      element. Takes one of the Edge Mode Types.
3640      */
3641     SVGAnimatedValue getEdgeMode();
3643     /**
3644      * Corresponds to attribute kernelUnitLength on the
3645      *      given 'feConvolveMatrix'  element.
3646      */
3647     SVGAnimatedValue getKernelUnitLengthX();
3649     /**
3650      * Corresponds to attribute kernelUnitLength on the given
3651      *      'feConvolveMatrix'  element.
3652      */
3653     SVGAnimatedValue getKernelUnitLengthY();
3655     /**
3656      * Corresponds to attribute preserveAlpha on the
3657      *      given 'feConvolveMatrix'  element.
3658      */
3659     SVGAnimatedValue getPreserveAlpha();
3663     //####################################################################
3664     //# SVGFEDiffuseLightingElement
3665     //####################################################################
3668     /**
3669      * Corresponds to attribute in on the given 'feDiffuseLighting'  element.
3670      * -- also in feBlend
3671      */
3672     // SVGAnimatedValue getIn1();
3674     /**
3675      * Corresponds to attribute surfaceScale on the given
3676      *      'feDiffuseLighting'  element.
3677      */
3678     SVGAnimatedValue getSurfaceScale();
3680     /**
3681      * Corresponds to attribute diffuseConstant on the given
3682      *      'feDiffuseLighting'  element.
3683      */
3684     SVGAnimatedValue getDiffuseConstant();
3686     /**
3687      * Corresponds to attribute kernelUnitLength on the given
3688      *      'feDiffuseLighting'  element.
3689      */
3690     // SVGAnimatedValue getKernelUnitLengthX();
3692     /**
3693      * Corresponds to attribute kernelUnitLength on the given
3694      *      'feDiffuseLighting'  element.
3695      */
3696     // SVGAnimatedValue getKernelUnitLengthY();
3701     //####################################################################
3702     //# SVGFEDisplacementMapElement
3703     //####################################################################
3706     /**
3707      *  Channel Selectors
3708      */
3709     typedef enum
3710         {
3711         SVG_CHANNEL_UNKNOWN = 0,
3712         SVG_CHANNEL_R       = 1,
3713         SVG_CHANNEL_G       = 2,
3714         SVG_CHANNEL_B       = 3,
3715         SVG_CHANNEL_A       = 4
3716         } ChannelSelector;
3718     /**
3719      *
3720      * -- also in feBlend
3721      */
3722     // SVGAnimatedValue getIn1();
3724     /**
3725      *
3726      * -- also in feBlend
3727      */
3728     // SVGAnimatedValue getIn2();
3731     /**
3732      *
3733      */
3734     SVGAnimatedValue getScale();
3736     /**
3737      *
3738      */
3739     SVGAnimatedValue getXChannelSelector();
3741     /**
3742      *
3743      */
3744     SVGAnimatedValue getYChannelSelector();
3746     //####################################################################
3747     //# SVGFEDistantLightElement
3748     //####################################################################
3751     /**
3752      * Corresponds to attribute azimuth on the given 'feDistantLight'  element.
3753      */
3754     SVGAnimatedValue getAzimuth();
3757     /**
3758      * Corresponds to attribute elevation on the given 'feDistantLight'
3759      *    element
3760      */
3761     SVGAnimatedValue getElevation();
3764     //####################################################################
3765     //# SVGFEFloodElement
3766     //####################################################################
3769     /**
3770      *
3771      * -- also in feBlend
3772      */
3773     // SVGAnimatedValue getIn1();
3776     //####################################################################
3777     //# SVGFEFuncAElement
3778     //####################################################################
3780     //####################################################################
3781     //# SVGFEFuncBElement
3782     //####################################################################
3784     //####################################################################
3785     //# SVGFEFuncGElement
3786     //####################################################################
3788     //####################################################################
3789     //# SVGFEFuncRElement
3790     //####################################################################
3793     //####################################################################
3794     //# SVGFEGaussianBlurElement
3795     //####################################################################
3798     /**
3799      *
3800      * -- also in feBlend
3801      */
3802     // SVGAnimatedValue getIn1();
3805     /**
3806      *
3807      */
3808     SVGAnimatedValue getStdDeviationX();
3810     /**
3811      *
3812      */
3813     SVGAnimatedValue getStdDeviationY();
3816     /**
3817      *
3818      */
3819     void setStdDeviation(double stdDeviationX, double stdDeviationY);
3822     //####################################################################
3823     //# SVGFEImageElement
3824     //####################################################################
3827     //####################################################################
3828     //# SVGFEMergeElement
3829     //####################################################################
3831     //####################################################################
3832     //# SVGFEMergeNodeElement
3833     //####################################################################
3835     //####################################################################
3836     //# SVGFEMorphologyElement
3837     //####################################################################
3841     /**
3842      *  Morphology Operators
3843      */
3844     typedef enum
3845         {
3846         SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0,
3847         SVG_MORPHOLOGY_OPERATOR_ERODE   = 1,
3848         SVG_MORPHOLOGY_OPERATOR_DILATE  = 2
3849         } MorphologyOperatorType;
3852     /**
3853      *
3854      * -- also in feBlend
3855      */
3856     // SVGAnimatedValue getIn1();
3859     /**
3860      *
3861      */
3862     // SVGAnimatedValue getOperator();
3864     /**
3865      *
3866      */
3867     SVGAnimatedValue getRadiusX();
3869     /**
3870      *
3871      */
3872     SVGAnimatedValue getRadiusY();
3874     //####################################################################
3875     //# SVGFEOffsetElement
3876     //####################################################################
3878     /**
3879      *
3880      * -- also in feBlend
3881      */
3882     // SVGAnimatedValue getIn1();
3884     /**
3885      *
3886      */
3887     SVGAnimatedValue getDx();
3889     /**
3890      *
3891      */
3892     SVGAnimatedValue getDy();
3895     //####################################################################
3896     //# SVGFEPointLightElement
3897     //####################################################################
3899     /**
3900      * Corresponds to attribute x on the given 'fePointLight' element.
3901      */
3902     SVGAnimatedValue getX();
3904     /**
3905      * Corresponds to attribute y on the given 'fePointLight' element.
3906      */
3907     SVGAnimatedValue getY();
3909     /**
3910      * Corresponds to attribute z on the given 'fePointLight' element.
3911      */
3912     SVGAnimatedValue getZ();
3914     //####################################################################
3915     //# SVGFESpecularLightingElement
3916     //####################################################################
3919     /**
3920      *
3921      * -- also in feBlend
3922      */
3923     // SVGAnimatedValue getIn1();
3925     /**
3926      *
3927      */
3928     // SVGAnimatedValue getSurfaceScale();
3930     /**
3931      *
3932      */
3933     SVGAnimatedValue getSpecularConstant();
3935     /**
3936      *
3937      */
3938     SVGAnimatedValue getSpecularExponent();
3941     //####################################################################
3942     //# SVGFESpotLightElement
3943     //####################################################################
3945     /**
3946      * Corresponds to attribute x on the given 'feSpotLight' element.
3947      */
3948     // SVGAnimatedValue getX();
3950     /**
3951      * Corresponds to attribute y on the given 'feSpotLight' element.
3952      */
3953     // SVGAnimatedValue getY();
3955     /**
3956      * Corresponds to attribute z on the given 'feSpotLight' element.
3957      */
3958     // SVGAnimatedValue getZ();
3960     /**
3961      * Corresponds to attribute pointsAtX on the given 'feSpotLight' element.
3962      */
3963     SVGAnimatedValue getPointsAtX();
3965     /**
3966      * Corresponds to attribute pointsAtY on the given 'feSpotLight' element.
3967      */
3968     SVGAnimatedValue getPointsAtY();
3970     /**
3971      * Corresponds to attribute pointsAtZ on the given 'feSpotLight' element.
3972      */
3973     SVGAnimatedValue getPointsAtZ();
3975     /**
3976      * Corresponds to attribute specularExponent on the
3977      *      given 'feSpotLight'  element.
3978      */
3979     // SVGAnimatedValue getSpecularExponent();
3981     /**
3982      * Corresponds to attribute limitingConeAngle on the
3983      *      given 'feSpotLight'  element.
3984      */
3985     SVGAnimatedValue getLimitingConeAngle();
3988     //####################################################################
3989     //# SVGFETileElement
3990     //####################################################################
3993     /**
3994      *
3995      * -- also in feBlend
3996      */
3997     // SVGAnimatedValue getIn1();
4000     //####################################################################
4001     //# SVGFETurbulenceElement
4002     //####################################################################
4005     /**
4006      *  Turbulence Types
4007      */
4008     typedef enum
4009         {
4010         SVG_TURBULENCE_TYPE_UNKNOWN      = 0,
4011         SVG_TURBULENCE_TYPE_FRACTALNOISE = 1,
4012         SVG_TURBULENCE_TYPE_TURBULENCE   = 2
4013         } TurbulenceType;
4015     /**
4016      *  Stitch Options
4017      */
4018     typedef enum
4019         {
4020         SVG_STITCHTYPE_UNKNOWN  = 0,
4021         SVG_STITCHTYPE_STITCH   = 1,
4022         SVG_STITCHTYPE_NOSTITCH = 2
4023         } StitchOption;
4027     /**
4028      *
4029      */
4030     SVGAnimatedValue getBaseFrequencyX();
4032     /**
4033      *
4034      */
4035     SVGAnimatedValue getBaseFrequencyY();
4037     /**
4038      *
4039      */
4040     SVGAnimatedValue getNumOctaves();
4042     /**
4043      *
4044      */
4045     SVGAnimatedValue getSeed();
4047     /**
4048      *
4049      */
4050     SVGAnimatedValue getStitchTiles();
4052     /**
4053      *
4054      */
4055     SVGAnimatedValue getType();
4059     //####################################################################
4060     //# SVGFilterElement
4061     //####################################################################
4064     /**
4065      * Corresponds to attribute filterUnits on the given 'filter' element. Takes one
4066      * of the constants defined in SVGUnitTypes.
4067      */
4068     SVGAnimatedValue getFilterUnits();
4070     /**
4071      * Corresponds to attribute primitiveUnits on the given 'filter' element. Takes
4072      * one of the constants defined in SVGUnitTypes.
4073      */
4074     SVGAnimatedValue getPrimitiveUnits();
4076     /**
4077      *
4078      */
4079     // SVGAnimatedValue getX();
4081     /**
4082      * Corresponds to attribute x on the given 'filter' element.
4083      */
4084     // SVGAnimatedValue getY();
4086     /**
4087      * Corresponds to attribute y on the given 'filter' element.
4088      */
4089     // SVGAnimatedValue getWidth();
4091     /**
4092      * Corresponds to attribute height on the given 'filter' element.
4093      */
4094     // SVGAnimatedValue getHeight();
4097     /**
4098      * Corresponds to attribute filterRes on the given 'filter' element.
4099      *      Contains the X component of attribute filterRes.
4100      */
4101     SVGAnimatedValue getFilterResX();
4103     /**
4104      * Corresponds to attribute filterRes on the given 'filter' element.
4105      * Contains the Y component(possibly computed automatically)
4106      *      of attribute filterRes.
4107      */
4108     SVGAnimatedValue getFilterResY();
4110     /**
4111      * Sets the values for attribute filterRes.
4112      */
4113     void setFilterRes(unsigned long filterResX, unsigned long filterResY);
4116     //####################################################################
4117     //# SVGFontElement
4118     //####################################################################
4120     //####################################################################
4121     //# SVGFontFaceElement
4122     //####################################################################
4124     //####################################################################
4125     //# SVGFontFaceFormatElement
4126     //####################################################################
4128     //####################################################################
4129     //# SVGFontFaceNameElement
4130     //####################################################################
4132     //####################################################################
4133     //# SVGFontFaceSrcElement
4134     //####################################################################
4136     //####################################################################
4137     //# SVGFontFaceUriElement
4138     //####################################################################
4140     //####################################################################
4141     //# SVGForeignObjectElement
4142     //####################################################################
4144     /**
4145      *
4146      */
4147     // SVGAnimatedValue getX();
4149     /**
4150      *
4151      */
4152     // SVGAnimatedValue getY();
4154     /**
4155      *
4156      */
4157     // SVGAnimatedValue getWidth();
4159     /**
4160      *
4161      */
4162     // SVGAnimatedValue getHeight();
4166     //####################################################################
4167     //# SVGGlyphRefElement
4168     //####################################################################
4171     /**
4172      * Get the attribute glyphRef on the given element.
4173      */
4174     // DOMString getGlyphRef();
4176     /**
4177      * Set the attribute glyphRef on the given element.
4178      */
4179     // void setGlyphRef(const DOMString &val) throw(DOMException);
4181     /**
4182      * Get the attribute format on the given element.
4183      */
4184     // DOMString getFormat();
4186     /**
4187      * Set the attribute format on the given element.
4188      */
4189     // void setFormat(const DOMString &val) throw(DOMException);
4191     /**
4192      * Get the attribute x on the given element.
4193      */
4194     // double getX();
4196     /**
4197      * Set the attribute x on the given element.
4198      */
4199     // void setX(double val) throw(DOMException);
4201     /**
4202      * Get the attribute y on the given element.
4203      */
4204     // double getY();
4206     /**
4207      * Set the attribute y on the given element.
4208      */
4209     // void setY(double val) throw(DOMException);
4211     /**
4212      * Get the attribute dx on the given element.
4213      */
4214     // double getDx();
4216     /**
4217      * Set the attribute dx on the given element.
4218      */
4219     // void setDx(double val) throw(DOMException);
4221     /**
4222      * Get the attribute dy on the given element.
4223      */
4224     // double getDy();
4226     /**
4227      * Set the attribute dy on the given element.
4228      */
4229     // void setDy(double val) throw(DOMException);
4232     //####################################################################
4233     //# SVGGradientElement
4234     //####################################################################
4237     /**
4238      * Spread Method Types
4239      */
4240     typedef enum
4241         {
4242         SVG_SPREADMETHOD_UNKNOWN = 0,
4243         SVG_SPREADMETHOD_PAD     = 1,
4244         SVG_SPREADMETHOD_REFLECT = 2,
4245         SVG_SPREADMETHOD_REPEAT  = 3
4246         } SpreadMethodType;
4249     /**
4250      * Corresponds to attribute gradientUnits on the given element.
4251      *      Takes one of the constants defined in SVGUnitTypes.
4252      */
4253     SVGAnimatedValue &getGradientUnits();
4255     /**
4256      * Corresponds to attribute gradientTransform on the given element.
4257      */
4258     SVGAnimatedValueList &getGradientTransform();
4260     /**
4261      * Corresponds to attribute spreadMethod on the given element.
4262      *      One of the Spread Method Types.
4263      */
4264     SVGAnimatedValue &getSpreadMethod();
4268     //####################################################################
4269     //# SVGHKernElement
4270     //####################################################################
4272     //####################################################################
4273     //# SVGImageElement
4274     //####################################################################
4276     /**
4277      * Corresponds to attribute x on the given 'image' element.
4278      */
4279     // SVGAnimatedValue getX();
4281     /**
4282      * Corresponds to attribute y on the given 'image' element.
4283      */
4284     // SVGAnimatedValue getY();
4286     /**
4287      * Corresponds to attribute width on the given 'image' element.
4288      */
4289     // SVGAnimatedValue getWidth();
4291     /**
4292      * Corresponds to attribute height on the given 'image' element.
4293      */
4294     // SVGAnimatedValue getHeight();
4297     /**
4298      * Corresponds to attribute preserveAspectRatio on the given element.
4299      */
4300     // SVGAnimatedPreserveAspectRatio getPreserveAspectRatio();
4302     //####################################################################
4303     //# SVGLinearGradientElement
4304     //####################################################################
4306     /**
4307      * Corresponds to attribute x1 on the given 'linearGradient'  element.
4308      */
4309     // SVGAnimatedValue getX1();
4311     /**
4312      * Corresponds to attribute y1 on the given 'linearGradient'  element.
4313      */
4314     // SVGAnimatedValue getY1();
4316     /**
4317      * Corresponds to attribute x2 on the given 'linearGradient'  element.
4318      */
4319     // SVGAnimatedValue getX2();
4321     /**
4322      * Corresponds to attribute y2 on the given 'linearGradient'  element.
4323      */
4324     // SVGAnimatedValue getY2();
4328     //####################################################################
4329     //# SVGLineElement
4330     //####################################################################
4332     /**
4333      * Corresponds to attribute x1 on the given 'line' element.
4334      */
4335     // SVGAnimatedValue getX1();
4337     /**
4338      * Corresponds to attribute y1 on the given 'line' element.
4339      */
4340     // SVGAnimatedValue getY1();
4342     /**
4343      * Corresponds to attribute x2 on the given 'line' element.
4344      */
4345     // SVGAnimatedValue getX2();
4347     /**
4348      * Corresponds to attribute y2 on the given 'line' element.
4349      */
4350     // SVGAnimatedValue getY2();
4353     //####################################################################
4354     //# SVGMarkerElement
4355     //####################################################################
4358     /**
4359      * Marker Unit Types
4360      */
4361     typedef enum
4362         {
4363         SVG_MARKERUNITS_UNKNOWN        = 0,
4364         SVG_MARKERUNITS_USERSPACEONUSE = 1,
4365         SVG_MARKERUNITS_STROKEWIDTH    = 2
4366         } MarkerUnitType;
4368     /**
4369      * Marker Orientation Types
4370      */
4371     typedef enum
4372         {
4373         SVG_MARKER_ORIENT_UNKNOWN      = 0,
4374         SVG_MARKER_ORIENT_AUTO         = 1,
4375         SVG_MARKER_ORIENT_ANGLE        = 2
4376         } MarkerOrientationType;
4379     /**
4380      * Corresponds to attribute refX on the given 'marker' element.
4381      */
4382     SVGAnimatedValue getRefX();
4384     /**
4385      * Corresponds to attribute refY on the given 'marker' element.
4386      */
4387     SVGAnimatedValue getRefY();
4389     /**
4390      * Corresponds to attribute markerUnits on the given 'marker' element.
4391      *      One of the Marker Units Types defined above.
4392      */
4393     SVGAnimatedValue getMarkerUnits();
4395     /**
4396      * Corresponds to attribute markerWidth on the given 'marker' element.
4397      */
4398     SVGAnimatedValue getMarkerWidth();
4400     /**
4401      * Corresponds to attribute markerHeight on the given 'marker' element.
4402      */
4403     SVGAnimatedValue getMarkerHeight();
4405     /**
4406      * Corresponds to attribute orient on the given 'marker' element.
4407      *      One of the Marker Orientation Types defined above.
4408      */
4409     SVGAnimatedValue getOrientType();
4411     /**
4412      * Corresponds to attribute orient on the given 'marker' element.
4413      * If markerUnits is SVG_MARKER_ORIENT_ANGLE, the angle value for
4414      * attribute orient; otherwise, it will be set to zero.
4415      */
4416     SVGAnimatedValue getOrientAngle();
4419     /**
4420      * Sets the value of attribute orient to 'auto'.
4421      */
4422     void setOrientToAuto();
4424     /**
4425      * Sets the value of attribute orient to the given angle.
4426      */
4427     void setOrientToAngle(const SVGAngle &angle);
4430     //####################################################################
4431     //# SVGMaskElement
4432     //####################################################################
4435     /**
4436      * Corresponds to attribute maskUnits on the given 'mask' element. Takes one of
4437      * the constants defined in SVGUnitTypes.
4438      */
4439     SVGAnimatedValue getMaskUnits();
4441     /**
4442      * Corresponds to attribute maskContentUnits on the given 'mask' element. Takes
4443      * one of the constants defined in SVGUnitTypes.
4444      */
4445     SVGAnimatedValue getMaskContentUnits();
4447     /**
4448      * Corresponds to attribute x on the given 'mask' element.
4449      */
4450     // SVGAnimatedValue getX();
4452     /**
4453      * Corresponds to attribute y on the given 'mask' element.
4454      */
4455     // SVGAnimatedValue getY();
4457     /**
4458      * Corresponds to attribute width on the given 'mask' element.
4459      */
4460     // SVGAnimatedValue getWidth();
4462     /**
4463      * Corresponds to attribute height on the given 'mask' element.
4464      */
4465     // SVGAnimatedValue getHeight();
4467     //####################################################################
4468     //# SVGMetadataElement
4469     //####################################################################
4471     //####################################################################
4472     //# SVGMissingGlyphElement
4473     //####################################################################
4476     //####################################################################
4477     //# SVGMPathElement
4478     //####################################################################
4480     /**
4481      * Corresponds to attribute pathLength on the given 'path' element.
4482      */
4483     SVGAnimatedValue getPathLength();
4485     /**
4486      * Returns the user agent's computed value for the total length of the path using
4487      * the user agent's distance-along-a-path algorithm, as a distance in the current
4488      * user coordinate system.
4489      */
4490     double getTotalLength();
4492     /**
4493      * Returns the(x,y) coordinate in user space which is distance units along the
4494      * path, utilizing the user agent's distance-along-a-path algorithm.
4495      */
4496     SVGPoint getPointAtLength(double distance);
4498     /**
4499      * Returns the index into pathSegList which is distance units along the path,
4500      * utilizing the user agent's distance-along-a-path algorithm.
4501      */
4502     unsigned long getPathSegAtLength(double distance);
4504     /**
4505      * Returns a stand-alone, parentless SVGPathSegClosePath object.
4506      */
4507     SVGPathSeg createSVGPathSegClosePath();
4509     /**
4510      * Returns a stand-alone, parentless SVGPathSegMovetoAbs object.
4511      */
4512     SVGPathSeg createSVGPathSegMovetoAbs(double x, double y);
4514     /**
4515      * Returns a stand-alone, parentless SVGPathSegMovetoRel object.
4516      */
4517     SVGPathSeg createSVGPathSegMovetoRel(double x, double y);
4519     /**
4520      * Returns a stand-alone, parentless SVGPathSegLinetoAbs object.
4521      */
4522     SVGPathSeg createSVGPathSegLinetoAbs(double x, double y);
4524     /**
4525      * Returns a stand-alone, parentless SVGPathSegLinetoRel object.
4526      */
4527     SVGPathSeg createSVGPathSegLinetoRel(double x, double y);
4529     /**
4530      * Returns a stand-alone, parentless SVGPathSegCurvetoCubicAbs object.
4531      */
4532     SVGPathSeg createSVGPathSegCurvetoCubicAbs(double x, double y,
4533                         double x1, double y1, double x2, double y2);
4535     /**
4536      * Returns a stand-alone, parentless SVGPathSegCurvetoCubicRel object.
4537      */
4538     SVGPathSeg createSVGPathSegCurvetoCubicRel(double x, double y,
4539                         double x1, double y1, double x2, double y2);
4541     /**
4542      * Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticAbs object.
4543      */
4544     SVGPathSeg createSVGPathSegCurvetoQuadraticAbs(double x, double y,
4545                          double x1, double y1);
4547     /**
4548      * Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticRel object.
4549      */
4550     SVGPathSeg createSVGPathSegCurvetoQuadraticRel(double x, double y,
4551                          double x1, double y1);
4553     /**
4554      * Returns a stand-alone, parentless SVGPathSegArcAbs object.
4555      */
4556     SVGPathSeg createSVGPathSegArcAbs(double x, double y,
4557                          double r1, double r2, double angle,
4558                          bool largeArcFlag, bool sweepFlag);
4560     /**
4561      * Returns a stand-alone, parentless SVGPathSegArcRel object.
4562      */
4563     SVGPathSeg createSVGPathSegArcRel(double x, double y, double r1,
4564                          double r2, double angle, bool largeArcFlag,
4565                          bool sweepFlag);
4567     /**
4568      * Returns a stand-alone, parentless SVGPathSegLinetoHorizontalAbs object.
4569      */
4570     SVGPathSeg createSVGPathSegLinetoHorizontalAbs(double x);
4572     /**
4573      * Returns a stand-alone, parentless SVGPathSegLinetoHorizontalRel object.
4574      */
4575     SVGPathSeg createSVGPathSegLinetoHorizontalRel(double x);
4577     /**
4578      * Returns a stand-alone, parentless SVGPathSegLinetoVerticalAbs object.
4579      */
4580     SVGPathSeg createSVGPathSegLinetoVerticalAbs(double y);
4582     /**
4583      * Returns a stand-alone, parentless SVGPathSegLinetoVerticalRel object.
4584      */
4585     SVGPathSeg createSVGPathSegLinetoVerticalRel(double y);
4587     /**
4588      * Returns a stand-alone, parentless SVGPathSegCurvetoCubicSmoothAbs object.
4589      */
4590     SVGPathSeg createSVGPathSegCurvetoCubicSmoothAbs(double x, double y,
4591                                              double x2, double y2);
4593     /**
4594      * Returns a stand-alone, parentless SVGPathSegCurvetoCubicSmoothRel object.
4595      */
4596     SVGPathSeg createSVGPathSegCurvetoCubicSmoothRel(double x, double y,
4597                                                       double x2, double y2);
4599     /**
4600      * Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticSmoothAbs
4601      *      object.
4602      */
4603     SVGPathSeg createSVGPathSegCurvetoQuadraticSmoothAbs(double x, double y);
4605     /**
4606      * Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticSmoothRel
4607      *      object.
4608      */
4609     SVGPathSeg createSVGPathSegCurvetoQuadraticSmoothRel(double x, double y);
4611     //####################################################################
4612     //# SVGPathElement
4613     //####################################################################
4615     //####################################################################
4616     //# SVGPatternElement
4617     //####################################################################
4619     /**
4620      * Corresponds to attribute patternUnits on the given 'pattern' element.
4621      * Takes one of the constants defined in SVGUnitTypes.
4622      */
4623     SVGAnimatedValue getPatternUnits();
4625     /**
4626      * Corresponds to attribute patternContentUnits on the given 'pattern'
4627      *      element. Takes one of the constants defined in SVGUnitTypes.
4628      */
4629     SVGAnimatedValue getPatternContentUnits();
4631     /**
4632      * Corresponds to attribute patternTransform on the given 'pattern' element.
4633      */
4634     SVGAnimatedValueList &getPatternTransform();
4636     /**
4637      * Corresponds to attribute x on the given 'pattern' element.
4638      */
4639     // SVGAnimatedValue getX();
4641     /**
4642      *
4643      */
4644     // SVGAnimatedValue getY();
4646     /**
4647      * Corresponds to attribute width on the given 'pattern' element.
4648      */
4649     // SVGAnimatedValue getWidth();
4651     /**
4652      * Corresponds to attribute height on the given 'pattern' element.
4653      */
4654     // SVGAnimatedValue getHeight();
4657     //####################################################################
4658     //# SVGPolyLineElement
4659     //####################################################################
4661     //####################################################################
4662     //# SVGPolygonElement
4663     //####################################################################
4665     //####################################################################
4666     //# SVGRadialGradientElement
4667     //####################################################################
4670     /**
4671      * Corresponds to attribute cx on the given 'radialGradient'  element.
4672      */
4673     // SVGAnimatedValue getCx();
4676     /**
4677      * Corresponds to attribute cy on the given 'radialGradient'  element.
4678      */
4679     // SVGAnimatedValue getCy();
4682     /**
4683      * Corresponds to attribute r on the given 'radialGradient'  element.
4684      */
4685     // SVGAnimatedValue getR();
4688     /**
4689      * Corresponds to attribute fx on the given 'radialGradient'  element.
4690      */
4691     SVGAnimatedValue getFx();
4694     /**
4695      * Corresponds to attribute fy on the given 'radialGradient'  element.
4696      */
4697     SVGAnimatedValue getFy();
4700     //####################################################################
4701     //# SVGRectElement
4702     //####################################################################
4704     /**
4705      * Corresponds to attribute x on the given 'rect' element.
4706      */
4707     // SVGAnimatedValue getX();
4709     /**
4710      * Corresponds to attribute y on the given 'rect' element.
4711      */
4712     // SVGAnimatedValue getY();
4714     /**
4715      * Corresponds to attribute width on the given 'rect' element.
4716      */
4717     // SVGAnimatedValue getWidth();
4719     /**
4720      * Corresponds to attribute height on the given 'rect' element.
4721      */
4722     // SVGAnimatedValue getHeight();
4725     /**
4726      * Corresponds to attribute rx on the given 'rect' element.
4727      */
4728     // SVGAnimatedValue getRx();
4730     /**
4731      * Corresponds to attribute ry on the given 'rect' element.
4732      */
4733     // SVGAnimatedValue getRy();
4736     //####################################################################
4737     //# SVGScriptElement
4738     //####################################################################
4740     /**
4741      *
4742      */
4743     // DOMString getType();
4745     /**
4746      *
4747      */
4748     // void setType(const DOMString &val) throw(DOMException);
4750     //####################################################################
4751     //# SVGSetElement
4752     //####################################################################
4754     //####################################################################
4755     //# SVGStopElement
4756     //####################################################################
4759     /**
4760      * Corresponds to attribute offset on the given 'stop' element.
4761      */
4762     // SVGAnimatedValue getOffset();
4765     //####################################################################
4766     //# SVGStyleElement
4767     //####################################################################
4769     /**
4770      * Get the attribute xml:space on the given element.
4771      */
4772     DOMString getXmlspace();
4774     /**
4775      * Set the attribute xml:space on the given element.
4776      */
4777     void setXmlspace(const DOMString &val) throw(DOMException);
4779     /**
4780      * Get the attribute type on the given 'style' element.
4781      */
4782     // DOMString getType();
4784     /**
4785      * Set the attribute type on the given 'style' element.
4786      */
4787     // void setType(const DOMString &val) throw(DOMException);
4789     /**
4790      * Get the attribute media on the given 'style' element.
4791      */
4792     DOMString getMedia();
4794     /**
4795      * Set the attribute media on the given 'style' element.
4796      */
4797     void setMedia(const DOMString &val) throw(DOMException);
4799     /**
4800      * Get the attribute title on the given 'style' element.
4801      */
4802     DOMString getTitle();
4804     /**
4805      * Set the attribute title on the given 'style' element.
4806      */
4807     void setTitle(const DOMString &val) throw(DOMException);
4809     //####################################################################
4810     //# SVGSymbolElement
4811     //####################################################################
4813     //####################################################################
4814     //# SVGSVGElement
4815     //####################################################################
4817     /**
4818      * Corresponds to attribute x on the given 'svg' element.
4819      */
4820     // SVGAnimatedValue getX();
4822     /**
4823      * Corresponds to attribute y on the given 'svg' element.
4824      */
4825     // SVGAnimatedValue getY();
4827     /**
4828      * Corresponds to attribute width on the given 'svg' element.
4829      */
4830     // SVGAnimatedValue getWidth();
4832     /**
4833      * Corresponds to attribute height on the given 'svg' element.
4834      */
4835     // SVGAnimatedValue getHeight();
4837     /**
4838      * Get the attribute contentScriptType on the given 'svg' element.
4839      */
4840     DOMString getContentScriptType();
4842     /**
4843      * Set the attribute contentScriptType on the given 'svg' element.
4844      */
4845     void setContentScriptType(const DOMString &val) throw(DOMException);
4848     /**
4849      * Get the attribute contentStyleType on the given 'svg' element.
4850      */
4851     DOMString getContentStyleType();
4853     /**
4854      * Set the attribute contentStyleType on the given 'svg' element.
4855      */
4856     void setContentStyleType(const DOMString &val) throw(DOMException);
4858     /**
4859      * The position and size of the viewport(implicit or explicit) that corresponds
4860      * to this 'svg' element. When the user agent is actually rendering the content,
4861      * then the position and size values represent the actual values when rendering.
4862      * The position and size values are unitless values in the coordinate system of
4863      * the parent element. If no parent element exists(i.e., 'svg' element
4864      * represents the root of the document tree), if this SVG document is embedded as
4865      * part of another document(e.g., via the HTML 'object' element), then the
4866      * position and size are unitless values in the coordinate system of the parent
4867      * document.(If the parent uses CSS or XSL layout, then unitless values
4868      * represent pixel units for the current CSS or XSL viewport, as described in the
4869      * CSS2 specification.) If the parent element does not have a coordinate system,
4870      * then the user agent should provide reasonable default values for this attribute.
4871      *      */
4872     SVGRect getViewport();
4874     /**
4875      * Size of a pixel units(as defined by CSS2) along the x-axis of the viewport,
4876      * which represents a unit somewhere in the range of 70dpi to 120dpi, and, on
4877      * systems that support this, might actually match the characteristics of the
4878      * target medium. On systems where it is impossible to know the size of a pixel,
4879      * a suitable default pixel size is provided.
4880      */
4881     double getPixelUnitToMillimeterX();
4883     /**
4884      * Corresponding size of a pixel unit along the y-axis of the viewport.
4885      */
4886     double getPixelUnitToMillimeterY();
4888     /**
4889      * User interface(UI) events in DOM Level 2 indicate the screen positions at
4890      * which the given UI event occurred. When the user agent actually knows the
4891      * physical size of a "screen unit", this attribute will express that information;
4892      *  otherwise, user agents will provide a suitable default value such as .28mm.
4893      */
4894     double getScreenPixelToMillimeterX();
4896     /**
4897      * Corresponding size of a screen pixel along the y-axis of the viewport.
4898      */
4899     double getScreenPixelToMillimeterY();
4902     /**
4903      * The initial view(i.e., before magnification and panning) of the current
4904      * innermost SVG document fragment can be either the "standard" view(i.e., based
4905      * on attributes on the 'svg' element such as fitBoxToViewport) or to a "custom"
4906      * view(i.e., a hyperlink into a particular 'view' or other element - see
4907      * Linking into SVG content: URI fragments and SVG views). If the initial view is
4908      * the "standard" view, then this attribute is false. If the initial view is a
4909      * "custom" view, then this attribute is true.
4910      */
4911     bool getUseCurrentView();
4913     /**
4914      * Set the value above
4915      */
4916     void setUseCurrentView(bool val) throw(DOMException);
4918     /**
4919      * The definition of the initial view(i.e., before magnification and panning) of
4920      * the current innermost SVG document fragment. The meaning depends on the
4921      * situation:
4922      * 
4923      *    * If the initial view was a "standard" view, then:
4924      *      o the values for viewBox, preserveAspectRatio and zoomAndPan within
4925      *        currentView will match the values for the corresponding DOM attributes that
4926      *        are on SVGSVGElement directly
4927      *      o the values for transform and viewTarget within currentView will be null
4928      *    * If the initial view was a link into a 'view' element, then:
4929      *      o the values for viewBox, preserveAspectRatio and zoomAndPan within
4930      *        currentView will correspond to the corresponding attributes for the given
4931      *        'view' element
4932      *      o the values for transform and viewTarget within currentView will be null
4933      *    * If the initial view was a link into another element(i.e., other than a
4934      *      'view'), then:
4935      *      o the values for viewBox, preserveAspectRatio and zoomAndPan within
4936      *        currentView will match the values for the corresponding DOM attributes that
4937      *        are on SVGSVGElement directly for the closest ancestor 'svg' element
4938      *      o the values for transform within currentView will be null
4939      *      o the viewTarget within currentView will represent the target of the link
4940      *    * If the initial view was a link into the SVG document fragment using an SVG
4941      *      view specification fragment identifier(i.e., #svgView(...)), then:
4942      *      o the values for viewBox, preserveAspectRatio, zoomAndPan, transform and
4943      *        viewTarget within currentView will correspond to the values from the SVG view
4944      *        specification fragment identifier
4945      * 
4946      */
4947     SVGViewSpec getCurrentView();
4950     /**
4951      * This attribute indicates the current scale factor relative to the initial view
4952      * to take into account user magnification and panning operations, as described
4953      * under Magnification and panning. DOM attributes currentScale and
4954      * currentTranslate are equivalent to the 2x3 matrix [a b c d e f] =
4955      * [currentScale 0 0 currentScale currentTranslate.x currentTranslate.y]. If
4956      * "magnification" is enabled(i.e., zoomAndPan="magnify"), then the effect is as
4957      * if an extra transformation were placed at the outermost level on the SVG
4958      * document fragment(i.e., outside the outermost 'svg' element).
4959      */
4960     double getCurrentScale();
4962     /**
4963      *  Set the value above.
4964      */
4965     void setCurrentScale(double val) throw(DOMException);
4967     /**
4968      * The corresponding translation factor that takes into account
4969      *      user "magnification".
4970      */
4971     SVGPoint getCurrentTranslate();
4973     /**
4974      * Takes a time-out value which indicates that redraw shall not occur until:(a)
4975      * the corresponding unsuspendRedraw(suspend_handle_id) call has been made,(b)
4976      * an unsuspendRedrawAll() call has been made, or(c) its timer has timed out. In
4977      * environments that do not support interactivity(e.g., print media), then
4978      * redraw shall not be suspended. suspend_handle_id =
4979      * suspendRedraw(max_wait_milliseconds) and unsuspendRedraw(suspend_handle_id)
4980      * must be packaged as balanced pairs. When you want to suspend redraw actions as
4981      * a collection of SVG DOM changes occur, then precede the changes to the SVG DOM
4982      * with a method call similar to suspend_handle_id =
4983      * suspendRedraw(max_wait_milliseconds) and follow the changes with a method call
4984      * similar to unsuspendRedraw(suspend_handle_id). Note that multiple
4985      * suspendRedraw calls can be used at once and that each such method call is
4986      * treated independently of the other suspendRedraw method calls.
4987      */
4988     unsigned long suspendRedraw(unsigned long max_wait_milliseconds);
4990     /**
4991      * Cancels a specified suspendRedraw() by providing a unique suspend_handle_id.
4992      */
4993     void unsuspendRedraw(unsigned long suspend_handle_id) throw(DOMException);
4995     /**
4996      * Cancels all currently active suspendRedraw() method calls. This method is most
4997      * useful at the very end of a set of SVG DOM calls to ensure that all pending
4998      * suspendRedraw() method calls have been cancelled.
4999      */
5000     void unsuspendRedrawAll();
5002     /**
5003      * In rendering environments supporting interactivity, forces the user agent to
5004      * immediately redraw all regions of the viewport that require updating.
5005      */
5006     void forceRedraw();
5008     /**
5009      * Suspends(i.e., pauses) all currently running animations that are defined
5010      * within the SVG document fragment corresponding to this 'svg' element, causing
5011      * the animation clock corresponding to this document fragment to stand still
5012      * until it is unpaused.
5013      */
5014     void pauseAnimations();
5016     /**
5017      * Unsuspends(i.e., unpauses) currently running animations that are defined
5018      * within the SVG document fragment, causing the animation clock to continue from
5019      * the time at which it was suspended.
5020      */
5021     void unpauseAnimations();
5023     /**
5024      * Returns true if this SVG document fragment is in a paused state.
5025      */
5026     bool animationsPaused();
5028     /**
5029      * Returns the current time in seconds relative to the start time for
5030      *      the current SVG document fragment.
5031      */
5032     // double getCurrentTime();
5034     /**
5035      * Adjusts the clock for this SVG document fragment, establishing
5036      *      a new current time.
5037      */
5038     void setCurrentTime(double seconds);
5040     /**
5041      * Returns the list of graphics elements whose rendered content intersects the
5042      * supplied rectangle, honoring the 'pointer-events' property value on each
5043      * candidate graphics element.
5044      */
5045     NodeList getIntersectionList(const SVGRect &rect,
5046                                  const SVGElementPtr referenceElement);
5048     /**
5049      * Returns the list of graphics elements whose rendered content is entirely
5050      * contained within the supplied rectangle, honoring the 'pointer-events'
5051      * property value on each candidate graphics element.
5052      */
5053     NodeList getEnclosureList(const SVGRect &rect,
5054                               const SVGElementPtr referenceElement);
5056     /**
5057      * Returns true if the rendered content of the given element intersects the
5058      * supplied rectangle, honoring the 'pointer-events' property value on each
5059      * candidate graphics element.
5060      */
5061     bool checkIntersection(const SVGElementPtr element, const SVGRect &rect);
5063     /**
5064      * Returns true if the rendered content of the given element is entirely
5065      * contained within the supplied rectangle, honoring the 'pointer-events'
5066      * property value on each candidate graphics element.
5067      */
5068     bool checkEnclosure(const SVGElementPtr element, const SVGRect &rect);
5070     /**
5071      * Unselects any selected objects, including any selections of text
5072      *      strings and type-in bars.
5073      */
5074     void deselectAll();
5076     /**
5077      * Creates an SVGNumber object outside of any document trees. The object
5078      *      is initialized to a value of zero.
5079      */
5080     SVGNumber createSVGNumber();
5082     /**
5083      * Creates an SVGLength object outside of any document trees. The object
5084      *      is initialized to the value of 0 user units.
5085      */
5086     SVGLength createSVGLength();
5088     /**
5089      * Creates an SVGAngle object outside of any document trees. The object
5090      *      is initialized to the value 0 degrees(unitless).
5091      */
5092     SVGAngle createSVGAngle();
5094     /**
5095      * Creates an SVGPoint object outside of any document trees. The object
5096      * is initialized to the point(0,0) in the user coordinate system.
5097      */
5098     SVGPoint createSVGPoint();
5100     /**
5101      * Creates an SVGMatrix object outside of any document trees. The object
5102      *      is initialized to the identity matrix.
5103      */
5104     SVGMatrix createSVGMatrix();
5106     /**
5107      * Creates an SVGRect object outside of any document trees. The object
5108      *      is initialized such that all values are set to 0 user units.
5109      */
5110     SVGRect createSVGRect();
5112     /**
5113      * Creates an SVGTransform object outside of any document trees.
5114      * The object is initialized to an identity matrix transform
5115      *    (SVG_TRANSFORM_MATRIX).
5116      */
5117     SVGTransform createSVGTransform();
5119     /**
5120      * Creates an SVGTransform object outside of any document trees.
5121      * The object is initialized to the given matrix transform
5122      *    (i.e., SVG_TRANSFORM_MATRIX).
5123      */
5124     SVGTransform createSVGTransformFromMatrix(const SVGMatrix &matrix);
5126     /**
5127      * Searches this SVG document fragment(i.e., the search is restricted to a
5128      * subset of the document tree) for an Element whose id is given by elementId. If
5129      * an Element is found, that Element is returned. If no such element exists,
5130      * returns null. Behavior is not defined if more than one element has this id.
5131      */
5132     ElementPtr getElementById(const DOMString& elementId);
5135     //####################################################################
5136     //# SVGTextElement
5137     //####################################################################
5140     //####################################################################
5141     //# SVGTextContentElement
5142     //####################################################################
5145     /**
5146      * lengthAdjust Types
5147      */
5148     typedef enum
5149         {
5150         LENGTHADJUST_UNKNOWN          = 0,
5151         LENGTHADJUST_SPACING          = 1,
5152         LENGTHADJUST_SPACINGANDGLYPHS = 2
5153         } LengthAdjustType;
5156     /**
5157      * Corresponds to attribute textLength on the given element.
5158      */
5159     SVGAnimatedValue getTextLength();
5162     /**
5163      * Corresponds to attribute lengthAdjust on the given element. The value must be
5164      * one of the length adjust constants specified above.
5165      */
5166     SVGAnimatedValue getLengthAdjust();
5169     /**
5170      * Returns the total number of characters to be rendered within the current
5171      * element. Includes characters which are included via a 'tref' reference.
5172      */
5173     long getNumberOfChars();
5175     /**
5176      * The total sum of all of the advance values from rendering all of the
5177      * characters within this element, including the advance value on the glyphs
5178      *(horizontal or vertical), the effect of properties 'kerning', 'letter-spacing'
5179      * and 'word-spacing' and adjustments due to attributes dx and dy on 'tspan'
5180      * elements. For non-rendering environments, the user agent shall make reasonable
5181      * assumptions about glyph metrics.
5182      */
5183     double getComputedTextLength();
5185     /**
5186      * The total sum of all of the advance values from rendering the specified
5187      * substring of the characters, including the advance value on the glyphs
5188      *(horizontal or vertical), the effect of properties 'kerning', 'letter-spacing'
5189      * and 'word-spacing' and adjustments due to attributes dx and dy on 'tspan'
5190      * elements. For non-rendering environments, the user agent shall make reasonable
5191      * assumptions about glyph metrics.
5192      */
5193     double getSubStringLength(unsigned long charnum, unsigned long nchars)
5194                                      throw(DOMException);
5196     /**
5197      * Returns the current text position before rendering the character in the user
5198      * coordinate system for rendering the glyph(s) that correspond to the specified
5199      * character. The current text position has already taken into account the
5200      * effects of any inter-character adjustments due to properties 'kerning',
5201      * 'letter-spacing' and 'word-spacing' and adjustments due to attributes x, y, dx
5202      * and dy. If multiple consecutive characters are rendered inseparably(e.g., as
5203      * a single glyph or a sequence of glyphs), then each of the inseparable
5204      * characters will return the start position for the first glyph.
5205      */
5206     SVGPoint getStartPositionOfChar(unsigned long charnum) throw(DOMException);
5208     /**
5209      * Returns the current text position after rendering the character in the user
5210      * coordinate system for rendering the glyph(s) that correspond to the specified
5211      * character. This current text position does not take into account the effects
5212      * of any inter-character adjustments to prepare for the next character, such as
5213      * properties 'kerning', 'letter-spacing' and 'word-spacing' and adjustments due
5214      * to attributes x, y, dx and dy. If multiple consecutive characters are rendered
5215      * inseparably(e.g., as a single glyph or a sequence of glyphs), then each of
5216      * the inseparable characters will return the end position for the last glyph.
5217      */
5218     SVGPoint getEndPositionOfChar(unsigned long charnum) throw(DOMException);
5220     /**
5221      * Returns a tightest rectangle which defines the minimum and maximum X and Y
5222      * values in the user coordinate system for rendering the glyph(s) that
5223      * correspond to the specified character. The calculations assume that all glyphs
5224      * occupy the full standard glyph cell for the font. If multiple consecutive
5225      * characters are rendered inseparably(e.g., as a single glyph or a sequence of
5226      * glyphs), then each of the inseparable characters will return the same extent.
5227      */
5228     SVGRect getExtentOfChar(unsigned long charnum) throw(DOMException);
5230     /**
5231      * Returns the rotation value relative to the current user coordinate system used
5232      * to render the glyph(s) corresponding to the specified character. If multiple
5233      * glyph(s) are used to render the given character and the glyphs each have
5234      * different rotations(e.g., due to text-on-a-path), the user agent shall return
5235      * an average value(e.g., the rotation angle at the midpoint along the path for
5236      * all glyphs used to render this character). The rotation value represents the
5237      * rotation that is supplemental to any rotation due to properties
5238      * 'glyph-orientation-horizontal' and 'glyph-orientation-vertical'; thus, any
5239      * glyph rotations due to these properties are not included into the returned
5240      * rotation value. If multiple consecutive characters are rendered inseparably
5241      *(e.g., as a single glyph or a sequence of glyphs), then each of the
5242      * inseparable characters will return the same rotation value.
5243      */
5244     double getRotationOfChar(unsigned long charnum) throw(DOMException);
5246     /**
5247      * Returns the index of the character whose corresponding glyph cell bounding box
5248      * contains the specified point. The calculations assume that all glyphs occupy
5249      * the full standard glyph cell for the font. If no such character exists, a
5250      * value of -1 is returned. If multiple such characters exist, the character
5251      * within the element whose glyphs were rendered last(i.e., take into account
5252      * any reordering such as for bidirectional text) is used. If multiple
5253      * consecutive characters are rendered inseparably(e.g., as a single glyph or a
5254      * sequence of glyphs), then the user agent shall allocate an equal percentage of
5255      * the text advance amount to each of the contributing characters in determining
5256      * which of the characters is chosen.
5257      */
5258     long getCharNumAtPosition(const SVGPoint &point);
5260     /**
5261      * Causes the specified substring to be selected just as if the user
5262      *      selected the substring interactively.
5263      */
5264     void selectSubString(unsigned long charnum, unsigned long nchars)
5265                                   throw(DOMException);
5271     //####################################################################
5272     //# SVGTextPathElement
5273     //####################################################################
5276     /**
5277      * textPath Method Types
5278      */
5279     typedef enum
5280         {
5281         TEXTPATH_METHODTYPE_UNKNOWN   = 0,
5282         TEXTPATH_METHODTYPE_ALIGN     = 1,
5283         TEXTPATH_METHODTYPE_STRETCH   = 2
5284         } TextPathMethodType;
5286     /**
5287      * textPath Spacing Types
5288      */
5289     typedef enum
5290         {
5291         TEXTPATH_SPACINGTYPE_UNKNOWN  = 0,
5292         TEXTPATH_SPACINGTYPE_AUTO     = 1,
5293         TEXTPATH_SPACINGTYPE_EXACT    = 2
5294         } TextPathSpacingType;
5297     /**
5298      * Corresponds to attribute startOffset on the given 'textPath' element.
5299      */
5300     SVGAnimatedValue getStartOffset();
5302     /**
5303      * Corresponds to attribute method on the given 'textPath' element. The value
5304      * must be one of the method type constants specified above.
5305      */
5306     SVGAnimatedValue getMethod();
5308     /**
5309      * Corresponds to attribute spacing on the given 'textPath' element.
5310      *  The value must be one of the spacing type constants specified above.
5311      */
5312     SVGAnimatedValue getSpacing();
5315     //####################################################################
5316     //# SVGTextPositioningElement
5317     //####################################################################
5320     /**
5321      * Corresponds to attribute x on the given element.
5322      */
5323     // SVGAnimatedValue getX();
5325     /**
5326      * Corresponds to attribute y on the given element.
5327      */
5328     // SVGAnimatedValue getY();
5330     /**
5331      * Corresponds to attribute dx on the given element.
5332      */
5333     // SVGAnimatedValue getDx();
5335     /**
5336      * Corresponds to attribute dy on the given element.
5337      */
5338     // SVGAnimatedValue getDy();
5341     /**
5342      * Corresponds to attribute rotate on the given element.
5343      */
5344     SVGAnimatedValueList getRotate();
5347     //####################################################################
5348     //# SVGTitleElement
5349     //####################################################################
5351     //####################################################################
5352     //# SVGTRefElement
5353     //####################################################################
5355     //####################################################################
5356     //# SVGTSpanElement
5357     //####################################################################
5359     //####################################################################
5360     //# SVGSwitchElement
5361     //####################################################################
5363     //####################################################################
5364     //# SVGUseElement
5365     //####################################################################
5367     /**
5368      * Corresponds to attribute x on the given 'use' element.
5369      */
5370     // SVGAnimatedValue getX();
5372     /**
5373      * Corresponds to attribute y on the given 'use' element.
5374      */
5375     // SVGAnimatedValue getY();
5377     /**
5378      * Corresponds to attribute width on the given 'use' element.
5379      */
5380     // SVGAnimatedValue getWidth();
5382     /**
5383      * Corresponds to attribute height on the given 'use' element.
5384      */
5385     // SVGAnimatedValue getHeight();
5387     /**
5388      * The root of the "instance tree". See description of SVGElementInstance for
5389      * a discussion on the instance tree.
5390      *      */
5391     SVGElementInstance getInstanceRoot();
5393     /**
5394      * If the 'href' attribute is being animated, contains the current animated root
5395      * of the "instance tree". If the 'href' attribute is not currently being
5396      * animated, contains the same value as 'instanceRoot'. The root of the "instance
5397      * tree". See description of SVGElementInstance for a discussion on the instance
5398      * tree.
5399      */
5400     SVGElementInstance getAnimatedInstanceRoot();
5402     //####################################################################
5403     //# SVGVKernElement
5404     //####################################################################
5406     //####################################################################
5407     //# SVGViewElement
5408     //####################################################################
5411     /**
5412      *
5413      */
5414     SVGValueList getViewTarget();
5419     //##################
5420     //# Non-API methods
5421     //##################
5424     /**
5425      *
5426      */
5427     ~SVGElement() {}
5430 };
5434 /*#########################################################################
5435 ## SVGDocument
5436 #########################################################################*/
5438 /**
5439  * When an 'svg' element is embedded inline as a component of a document from
5440  * another namespace, such as when an 'svg' element is embedded inline within an
5441  * XHTML document [XHTML], then an SVGDocument object will not exist; instead,
5442  * the root object in the document object hierarchy will be a Document object of
5443  * a different type, such as an HTMLDocument object.
5444  *
5445  * However, an SVGDocument object will indeed exist when the root element of the
5446  * XML document hierarchy is an 'svg' element, such as when viewing a stand-alone
5447  * SVG file(i.e., a file with MIME type "image/svg+xml"). In this case, the
5448  * SVGDocument object will be the root object of the document object model
5449  * hierarchy.
5450  *
5451  * In the case where an SVG document is embedded by reference, such as when an
5452  * XHTML document has an 'object' element whose href attribute references an SVG
5453  * document(i.e., a document whose MIME type is "image/svg+xml" and whose root
5454  * element is thus an 'svg' element), there will exist two distinct DOM
5455  * hierarchies. The first DOM hierarchy will be for the referencing document
5456  *(e.g., an XHTML document). The second DOM hierarchy will be for the referenced
5457  * SVG document. In this second DOM hierarchy, the root object of the document
5458  * object model hierarchy is an SVGDocument object.
5459  */
5460 class SVGDocument : public Document,
5461                     public events::DocumentEvent
5463 public:
5466     /**
5467      * The title of a document as specified by the title sub-element of the 'svg'
5468      * root element(i.e., <svg><title>Here is the title</title>...</svg>)
5469      */
5470     DOMString getTitle();
5472     /**
5473      * Returns the URI of the page that linked to this page. The value is an empty
5474      * string if the user navigated to the page directly(not through a link, but,
5475      * for example, via a bookmark).
5476      */
5477     DOMString getReferrer();
5479     /**
5480      * The domain name of the server that served the document, or a null string if
5481      * the server cannot be identified by a domain name.
5482      */
5483     DOMString getDomain();
5485     /**
5486      * The complete URI of the document.
5487      */
5488     DOMString getURL();
5490     /**
5491      * The root 'svg'  element in the document hierarchy.
5492      */
5493     SVGElementPtr getRootElement();
5496     //##################
5497     //# Non-API methods
5498     //##################
5500     /**
5501      *
5502      */
5503     ~SVGDocument() {}
5505 };
5509 /*#########################################################################
5510 ## GetSVGDocument
5511 #########################################################################*/
5513 /**
5514  * In the case where an SVG document is embedded by reference, such as when an
5515  * XHTML document has an 'object' element whose href(or equivalent) attribute
5516  * references an SVG document(i.e., a document whose MIME type is
5517  * "image/svg+xml" and whose root element is thus an 'svg' element), the SVG user
5518  * agent is required to implement the GetSVGDocument interface for the element
5519  * which references the SVG document(e.g., the HTML 'object' or comparable
5520  * referencing elements).
5521  */
5522 class GetSVGDocument
5524 public:
5526     /**
5527      * Returns the SVGDocument  object for the referenced SVG document.
5528      */
5529     SVGDocumentPtr getSVGDocument()
5530                     throw(DOMException);
5532     //##################
5533     //# Non-API methods
5534     //##################
5536     /**
5537      *
5538      */
5539     ~GetSVGDocument() {}
5541 };
5549 }  //namespace svg
5550 }  //namespace dom
5551 }  //namespace w3c
5552 }  //namespace org
5554 #endif // __SVG_H__
5555 /*#########################################################################
5556 ## E N D    O F    F I L E
5557 #########################################################################*/