Code

Tweaked smaller size to be 3/4ths the menu size
[inkscape.git] / src / dom / svgimpl.cpp
1 /**
2  * Phoebe DOM Implementation.
3  *
4  * This is a C++ approximation of the W3C DOM model, which follows
5  * fairly closely the specifications in the various .idl files, copies of
6  * which are provided for reference.  Most important is this one:
7  *
8  * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
9  *
10  * Authors:
11  *   Bob Jamison
12  *
13  * Copyright (C) 2005 Bob Jamison
14  *
15  *  This library is free software; you can redistribute it and/or
16  *  modify it under the terms of the GNU Lesser General Public
17  *  License as published by the Free Software Foundation; either
18  *  version 2.1 of the License, or (at your option) any later version.
19  *
20  *  This library is distributed in the hope that it will be useful,
21  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23  *  Lesser General Public License for more details.
24  *
25  *  You should have received a copy of the GNU Lesser General Public
26  *  License along with this library; if not, write to the Free Software
27  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
28  */
30 #include "svgimpl.h"
34 namespace org
35 {
36 namespace w3c
37 {
38 namespace dom
39 {
40 namespace svg
41 {
44 /*#########################################################################
45 ## SVGElementImpl
46 #########################################################################*/
49 //##################
50 //# Non-API methods
51 //##################
56 /*#########################################################################
57 ## SVGDocumentImpl
58 #########################################################################*/
62 //####################################################
63 //# Overload some createXXX() methods from DocumentImpl,
64 //# To create our SVG-DOM types
65 //####################################################
67 /**
68  *
69  */
70 Element *SVGDocumentImpl::createElement(const DOMString& tagName)
71                            throw(DOMException)
72 {
73     SVGElementImpl *impl = new SVGElementImpl(this, tagName);
74     return impl;
75 }
78 /**
79  *
80  */
81 Element *SVGDocumentImpl::createElementNS(const DOMString& namespaceURI,
82                              const DOMString& qualifiedName)
83                              throw(DOMException)
84 {
85     SVGElementImpl *elem = new SVGElementImpl(this, namespaceURI, qualifiedName);
86     return elem;
87 }
91 //##################
92 //# Non-API methods
93 //##################
101 /*#########################################################################
102 ## SVGSVGElementImpl
103 #########################################################################*/
106 /**
107  *
108  */
109 unsigned long SVGSVGElementImpl::suspendRedraw(unsigned long max_wait_milliseconds )
111     return 0L;
114 /**
115  *
116  */
117 void SVGSVGElementImpl::unsuspendRedraw(unsigned long suspend_handle_id )
118                                   throw ( DOMException )
123 /**
124  *
125  */
126 void SVGSVGElementImpl::unsuspendRedrawAll(  )
130 /**
131  *
132  */
133 void SVGSVGElementImpl::forceRedraw(  )
137 /**
138  *
139  */
140 void SVGSVGElementImpl::pauseAnimations(  )
144 /**
145  *
146  */
147 void SVGSVGElementImpl::unpauseAnimations(  )
151 /**
152  *
153  */
154 bool SVGSVGElementImpl::animationsPaused(  )
156     return false;
160 /**
161  *
162  */
163 NodeList SVGSVGElementImpl::getIntersectionList(const SVGRect &rect,
164                                            const SVGElement *referenceElement )
166     NodeList list;
167     return list;
170 /**
171  *
172  */
173 NodeList SVGSVGElementImpl::getEnclosureList(const SVGRect &rect,
174                                         const SVGElement *referenceElement )
176     NodeList list;
177     return list;
180 /**
181  *
182  */
183 bool SVGSVGElementImpl::checkIntersection(const SVGElement *element,
184                                           const SVGRect &rect )
186     return false;
189 /**
190  *
191  */
192 bool SVGSVGElementImpl::checkEnclosure(const SVGElement *element,
193                                        const SVGRect &rect )
195     return false;
198 /**
199  *
200  */
201 void SVGSVGElementImpl::deselectAll(  )
205 /**
206  *
207  */
208 Element *SVGSVGElementImpl::getElementById(const DOMString& elementId )
210     return NULL;
215 //##################
216 //# Non-API methods
217 //##################
223 /*#########################################################################
224 ## SVGGElementImpl
225 #########################################################################*/
228 //##################
229 //# Non-API methods
230 //##################
237 /*#########################################################################
238 ## SVGDefsElementImpl
239 #########################################################################*/
243 //##################
244 //# Non-API methods
245 //##################
252 /*#########################################################################
253 ## SVGDescElementImpl
254 #########################################################################*/
258 //##################
259 //# Non-API methods
260 //##################
267 /*#########################################################################
268 ## SVGTitleElementImpl
269 #########################################################################*/
273 //##################
274 //# Non-API methods
275 //##################
280 /*#########################################################################
281 ## SVGSymbolElementImpl
282 #########################################################################*/
287 //##################
288 //# Non-API methods
289 //##################
296 /*#########################################################################
297 ## SVGUseElementImpl
298 #########################################################################*/
302 //##################
303 //# Non-API methods
304 //##################
314 /*#########################################################################
315 ## SVGImageElementImpl
316 #########################################################################*/
320 //##################
321 //# Non-API methods
322 //##################
331 /*#########################################################################
332 ## SVGSwitchElementImpl
333 #########################################################################*/
337 //##################
338 //# Non-API methods
339 //##################
346 /*#########################################################################
347 ## GetSVGDocumentImpl
348 #########################################################################*/
350 /**
351  *
352  */
353 SVGDocument *GetSVGDocumentImpl::getSVGDocument(  )
354                     throw ( DOMException )
356     return NULL;
359 //##################
360 //# Non-API methods
361 //##################
370 /*#########################################################################
371 ## SVGStyleElementImpl
372 #########################################################################*/
378 //##################
379 //# Non-API methods
380 //##################
385 /*#########################################################################
386 ## SVGPathElementImpl
387 #########################################################################*/
389 /**
390  *
391  */
392 SVGAnimatedNumber SVGPathElementImpl::getPathLength()
394     SVGAnimatedNumber ret;
395     return ret;
398 /**
399  *
400  */
401 double SVGPathElementImpl::getTotalLength(  )
403     return 0.0;
406 /**
407  *
408  */
409 SVGPoint SVGPathElementImpl::getPointAtLength(double distance )
411     SVGPoint ret;
412     return ret;
415 /**
416  *
417  */
418 unsigned long SVGPathElementImpl::getPathSegAtLength(double distance )
420     return 0L;
424 //##################
425 //# Non-API methods
426 //##################
435 /*#########################################################################
436 ## SVGRectElementImpl
437 #########################################################################*/
443 //##################
444 //# Non-API methods
445 //##################
454 /*#########################################################################
455 ## SVGCircleElementImpl
456 #########################################################################*/
461 //##################
462 //# Non-API methods
463 //##################
472 /*#########################################################################
473 ## SVGEllipseElementImpl
474 #########################################################################*/
478 //##################
479 //# Non-API methods
480 //##################
489 /*#########################################################################
490 ## SVGLineElementImpl
491 #########################################################################*/
494 //##################
495 //# Non-API methods
496 //##################
505 /*#########################################################################
506 ## SVGPolylineElementImpl
507 #########################################################################*/
513 //##################
514 //# Non-API methods
515 //##################
522 /*#########################################################################
523 ## SVGPolygonElementImpl
524 #########################################################################*/
531 //##################
532 //# Non-API methods
533 //##################
541 /*#########################################################################
542 ## SVGTextContentElementImpl
543 #########################################################################*/
545 /**
546  *
547  */
548 SVGAnimatedLength SVGTextContentElementImpl::getTextLength()
550     SVGAnimatedLength ret;
551     return ret;
555 /**
556  *
557  */
558 SVGAnimatedEnumeration SVGTextContentElementImpl::getLengthAdjust()
560     SVGAnimatedEnumeration ret;
561     return ret;
565 /**
566  *
567  */
568 long SVGTextContentElementImpl::getNumberOfChars(  )
570     return 0L;
573 /**
574  *
575  */
576 double SVGTextContentElementImpl::getComputedTextLength(  )
578     return 0.0;
581 /**
582  *
583  */
584 double SVGTextContentElementImpl::getSubStringLength(unsigned long charnum, unsigned long nchars )
585                                      throw ( DOMException )
587     return 0.0;
590 /**
591  *
592  */
593 SVGPoint SVGTextContentElementImpl::getStartPositionOfChar(unsigned long charnum )
594                                               throw ( DOMException )
596     SVGPoint ret;
597     return ret;
600 /**
601  *
602  */
603 SVGPoint SVGTextContentElementImpl::getEndPositionOfChar(unsigned long charnum )
604                                            throw ( DOMException )
606     SVGPoint ret;
607     return ret;
610 /**
611  *
612  */
613 SVGRect SVGTextContentElementImpl::getExtentOfChar(unsigned long charnum )
614                                       throw ( DOMException )
616     SVGRect ret;
617     return ret;
620 /**
621  *
622  */
623 double SVGTextContentElementImpl::getRotationOfChar(unsigned long charnum )
624                                      throw ( DOMException )
626     return 0.0;
629 /**
630  *
631  */
632 long SVGTextContentElementImpl::getCharNumAtPosition(const SVGPoint &point )
634     return 0L;
637 /**
638  *
639  */
640 void SVGTextContentElementImpl::selectSubString(unsigned long charnum,
641                                                 unsigned long nchars )
642                                                 throw ( DOMException )
648 //##################
649 //# Non-API methods
650 //##################
660 /*#########################################################################
661 ## SVGTextPositioningElementImpl
662 #########################################################################*/
667 //##################
668 //# Non-API methods
669 //##################
678 /*#########################################################################
679 ## SVGTextElementImpl
680 #########################################################################*/
686 //##################
687 //# Non-API methods
688 //##################
696 /*#########################################################################
697 ## SVGTSpanElementImpl
698 #########################################################################*/
704 //##################
705 //# Non-API methods
706 //##################
713 /*#########################################################################
714 ## SVGTRefElementImpl
715 #########################################################################*/
721 //##################
722 //# Non-API methods
723 //##################
731 /*#########################################################################
732 ## SVGTextPathElementImpl
733 #########################################################################*/
738 //##################
739 //# Non-API methods
740 //##################
750 /*#########################################################################
751 ## SVGAltGlyphElementImpl
752 #########################################################################*/
759 //##################
760 //# Non-API methods
761 //##################
769 /*#########################################################################
770 ## SVGAltGlyphDefElementImpl
771 #########################################################################*/
777 //##################
778 //# Non-API methods
779 //##################
787 /*#########################################################################
788 ## SVGAltGlyphItemElementImpl
789 #########################################################################*/
795 //##################
796 //# Non-API methods
797 //##################
805 /*#########################################################################
806 ## SVGGlyphRefElementImpl
807 #########################################################################*/
812 //##################
813 //# Non-API methods
814 //##################
823 /*#########################################################################
824 ## SVGMarkerElementImpl
825 #########################################################################*/
830 //##################
831 //# Non-API methods
832 //##################
841 /*#########################################################################
842 ## SVGColorProfileElementImpl
843 #########################################################################*/
848 //##################
849 //# Non-API methods
850 //##################
860 /*#########################################################################
861 ## SVGGradientElementImpl
862 #########################################################################*/
866 //##################
867 //# Non-API methods
868 //##################
876 /*#########################################################################
877 ## SVGLinearGradientElementImpl
878 #########################################################################*/
883 //##################
884 //# Non-API methods
885 //##################
894 /*#########################################################################
895 ## SVGRadialGradientElementImpl
896 #########################################################################*/
902 //##################
903 //# Non-API methods
904 //##################
913 /*#########################################################################
914 ## SVGStopElementImpl
915 #########################################################################*/
921 //##################
922 //# Non-API methods
923 //##################
933 /*#########################################################################
934 ## SVGPatternElementImpl
935 #########################################################################*/
939 //##################
940 //# Non-API methods
941 //##################
950 /*#########################################################################
951 ## SVGClipPathElementImpl
952 #########################################################################*/
959 //##################
960 //# Non-API methods
961 //##################
971 /*#########################################################################
972 ## SVGMaskElementImpl
973 #########################################################################*/
977 //##################
978 //# Non-API methods
979 //##################
989 /*#########################################################################
990 ## SVGFilterElementImpl
991 #########################################################################*/
997 //##################
998 //# Non-API methods
999 //##################
1009 /*#########################################################################
1010 ## SVGFEBlendElementImpl
1011 #########################################################################*/
1016 //##################
1017 //# Non-API methods
1018 //##################
1027 /*#########################################################################
1028 ## SVGFEColorMatrixElementImpl
1029 #########################################################################*/
1033 //##################
1034 //# Non-API methods
1035 //##################
1045 /*#########################################################################
1046 ## SVGFEComponentTransferElementImpl
1047 #########################################################################*/
1052 //##################
1053 //# Non-API methods
1054 //##################
1065 /*#########################################################################
1066 ## SVGComponentTransferFunctionElementImpl
1067 #########################################################################*/
1071 //##################
1072 //# Non-API methods
1073 //##################
1083 /*#########################################################################
1084 ## SVGFEFuncRElementImpl
1085 #########################################################################*/
1089 //##################
1090 //# Non-API methods
1091 //##################
1099 /*#########################################################################
1100 ## SVGFEFuncGElementImpl
1101 #########################################################################*/
1107 //##################
1108 //# Non-API methods
1109 //##################
1117 /*#########################################################################
1118 ## SVGFEFuncBElementImpl
1119 #########################################################################*/
1125 //##################
1126 //# Non-API methods
1127 //##################
1135 /*#########################################################################
1136 ## SVGFEFuncAElementImpl
1137 #########################################################################*/
1143 //##################
1144 //# Non-API methods
1145 //##################
1153 /*#########################################################################
1154 ## SVGFECompositeElementImpl
1155 #########################################################################*/
1160 //##################
1161 //# Non-API methods
1162 //##################
1171 /*#########################################################################
1172 ## SVGFEConvolveMatrixElementImpl
1173 #########################################################################*/
1177 //##################
1178 //# Non-API methods
1179 //##################
1188 /*#########################################################################
1189 ## SVGFEDiffuseLightingElementImpl
1190 #########################################################################*/
1195 //##################
1196 //# Non-API methods
1197 //##################
1203 /*#########################################################################
1204 ## SVGFEDistantLightElementImpl
1205 #########################################################################*/
1211 //##################
1212 //# Non-API methods
1213 //##################
1223 /*#########################################################################
1224 ## SVGFEPointLightElementImpl
1225 #########################################################################*/
1229 //##################
1230 //# Non-API methods
1231 //##################
1241 /*#########################################################################
1242 ## SVGFESpotLightElementImpl
1243 #########################################################################*/
1250 //##################
1251 //# Non-API methods
1252 //##################
1262 /*#########################################################################
1263 ## SVGFEDisplacementMapElementImpl
1264 #########################################################################*/
1269 //##################
1270 //# Non-API methods
1271 //##################
1281 /*#########################################################################
1282 ## SVGFEFloodElementImpl
1283 #########################################################################*/
1289 //##################
1290 //# Non-API methods
1291 //##################
1301 /*#########################################################################
1302 ## SVGFEGaussianBlurElementImpl
1303 #########################################################################*/
1309 //##################
1310 //# Non-API methods
1311 //##################
1321 /*#########################################################################
1322 ## SVGFEImageElementImpl
1323 #########################################################################*/
1328 //##################
1329 //# Non-API methods
1330 //##################
1338 /*#########################################################################
1339 ## SVGFEMergeElementImpl
1340 #########################################################################*/
1345 //##################
1346 //# Non-API methods
1347 //##################
1355 /*#########################################################################
1356 ## SVGFEMergeNodeElementImpl
1357 #########################################################################*/
1363 //##################
1364 //# Non-API methods
1365 //##################
1374 /*#########################################################################
1375 ## SVGFEMorphologyElementImpl
1376 #########################################################################*/
1380 //##################
1381 //# Non-API methods
1382 //##################
1391 /*#########################################################################
1392 ## SVGFEOffsetElementImpl
1393 #########################################################################*/
1398 //##################
1399 //# Non-API methods
1400 //##################
1407 /*#########################################################################
1408 ## SVGFESpecularLightingElementImpl
1409 #########################################################################*/
1413 //##################
1414 //# Non-API methods
1415 //##################
1425 /*#########################################################################
1426 ## SVGFETileElementImpl
1427 #########################################################################*/
1433 //##################
1434 //# Non-API methods
1435 //##################
1445 /*#########################################################################
1446 ## SVGFETurbulenceElementImpl
1447 #########################################################################*/
1454 //##################
1455 //# Non-API methods
1456 //##################
1466 /*#########################################################################
1467 ## SVGCursorElementImpl
1468 #########################################################################*/
1472 //##################
1473 //# Non-API methods
1474 //##################
1484 /*#########################################################################
1485 ## SVGAElementImpl
1486 #########################################################################*/
1492 //##################
1493 //# Non-API methods
1494 //##################
1503 /*#########################################################################
1504 ## SVGViewElementImpl
1505 #########################################################################*/
1512 //##################
1513 //# Non-API methods
1514 //##################
1523 /*#########################################################################
1524 ## SVGScriptElementImpl
1525 #########################################################################*/
1530 //##################
1531 //# Non-API methods
1532 //##################
1540 /*#########################################################################
1541 ## SVGAnimationElementImpl
1542 #########################################################################*/
1548 //##################
1549 //# Non-API methods
1550 //##################
1560 /*#########################################################################
1561 ## SVGAnimateElementImpl
1562 #########################################################################*/
1565 //##################
1566 //# Non-API methods
1567 //##################
1575 /*#########################################################################
1576 ## SVGSetElementImpl
1577 #########################################################################*/
1582 //##################
1583 //# Non-API methods
1584 //##################
1592 /*#########################################################################
1593 ## SVGAnimateMotionElementImpl
1594 #########################################################################*/
1597 //##################
1598 //# Non-API methods
1599 //##################
1607 /*#########################################################################
1608 ## SVGMPathElementImpl
1609 #########################################################################*/
1612 //##################
1613 //# Non-API methods
1614 //##################
1622 /*#########################################################################
1623 ## SVGAnimateColorElementImpl
1624 #########################################################################*/
1627 //##################
1628 //# Non-API methods
1629 //##################
1637 /*#########################################################################
1638 ## SVGAnimateTransformElementImpl
1639 #########################################################################*/
1643 //##################
1644 //# Non-API methods
1645 //##################
1653 /*#########################################################################
1654 ## SVGFontElementImpl
1655 #########################################################################*/
1659 //##################
1660 //# Non-API methods
1661 //##################
1669 /*#########################################################################
1670 ## SVGGlyphElementImpl
1671 #########################################################################*/
1675 //##################
1676 //# Non-API methods
1677 //##################
1685 /*#########################################################################
1686 ## SVGMissingGlyphElementImpl
1687 #########################################################################*/
1691 //##################
1692 //# Non-API methods
1693 //##################
1701 /*#########################################################################
1702 ## SVGHKernElementImpl
1703 #########################################################################*/
1707 //##################
1708 //# Non-API methods
1709 //##################
1717 /*#########################################################################
1718 ## SVGVKernElementImpl
1719 #########################################################################*/
1723 //##################
1724 //# Non-API methods
1725 //##################
1733 /*#########################################################################
1734 ## SVGFontFaceElementImpl
1735 #########################################################################*/
1739 //##################
1740 //# Non-API methods
1741 //##################
1749 /*#########################################################################
1750 ## SVGFontFaceSrcElementImpl
1751 #########################################################################*/
1755 //##################
1756 //# Non-API methods
1757 //##################
1765 /*#########################################################################
1766 ## SVGFontFaceUriElementImpl
1767 #########################################################################*/
1771 //##################
1772 //# Non-API methods
1773 //##################
1779 /*#########################################################################
1780 ## SVGFontFaceFormatElementImpl
1781 #########################################################################*/
1786 //##################
1787 //# Non-API methods
1788 //##################
1795 /*#########################################################################
1796 ## SVGFontFaceNameElementImpl
1797 #########################################################################*/
1801 //##################
1802 //# Non-API methods
1803 //##################
1811 /*#########################################################################
1812 ## SVGDefinitionSrcElementImpl
1813 #########################################################################*/
1817 //##################
1818 //# Non-API methods
1819 //##################
1827 /*#########################################################################
1828 ## SVGMetadataElementImpl
1829 #########################################################################*/
1832 //##################
1833 //# Non-API methods
1834 //##################
1840 /*#########################################################################
1841 ## SVGForeignObjectElementImpl
1842 #########################################################################*/
1846 //##################
1847 //# Non-API methods
1848 //##################
1861 }  //namespace svg
1862 }  //namespace dom
1863 }  //namespace w3c
1864 }  //namespace org
1867 /*#########################################################################
1868 ## E N D    O F    F I L E
1869 #########################################################################*/