~ubuntu-branches/debian/experimental/inkscape/experimental

« back to all changes in this revision

Viewing changes to src/dom/svg/svgimpl.h

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-09-09 23:29:02 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080909232902-c50iujhk1w79u8e7
Tags: 0.46-2.1
* Non-maintainer upload.
* Add upstream patch fixing a crash in the open dialog
  in the zh_CN.utf8 locale. Closes: #487623.
  Thanks to Luca Bruno for the patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
 
61
61
class SVGSVGElementImpl;
 
62
typedef Ptr<SVGSVGElementImpl> SVGSVGElementImplPtr;
 
63
class SVGElementImpl;
 
64
typedef Ptr<SVGElementImpl> SVGElementImplPtr;
 
65
class SVGDocumentImpl;
 
66
typedef Ptr<SVGDocumentImpl> SVGDocumentImplPtr;
62
67
 
63
68
/*#########################################################################
64
69
## SVGDocumentImpl
99
104
    /**
100
105
     *
101
106
     */
102
 
    virtual SVGSVGElement *getRootElement()
 
107
    virtual SVGSVGElementPtr getRootElement()
103
108
        { return rootElement; }
104
109
 
105
110
 
111
116
    /**
112
117
     *
113
118
     */
114
 
    virtual Element *createElement(const DOMString& tagName)
 
119
    virtual ElementPtr createElement(const DOMString& tagName)
115
120
                           throw(DOMException);
116
121
 
117
122
 
118
123
    /**
119
124
     *
120
125
     */
121
 
    virtual Element *createElementNS(const DOMString& namespaceURI,
122
 
                                     const DOMString& qualifiedName)
123
 
                                     throw(DOMException);
 
126
    virtual ElementPtr createElementNS(const DOMString& namespaceURI,
 
127
                                       const DOMString& qualifiedName)
 
128
                                       throw(DOMException);
124
129
 
125
130
    //##################
126
131
    //# Non-API methods
127
132
    //##################
128
133
 
129
134
    SVGDocumentImpl(const DOMImplementation *domImpl,
130
 
                    const DOMString    &namespaceURI,
131
 
                    const DOMString    &qualifiedName,
132
 
                    const DocumentType *doctype)
 
135
                    const DOMString         &namespaceURI,
 
136
                    const DOMString         &qualifiedName,
 
137
                    const DocumentTypePtr   doctype)
133
138
                    : DocumentImpl(domImpl, namespaceURI,
134
139
                          qualifiedName, doctype)
135
140
        {
142
147
     */
143
148
    virtual ~SVGDocumentImpl()
144
149
        {
145
 
        if (rootElement)
146
 
            delete rootElement;
147
150
        }
148
151
 
149
152
protected:
162
165
    DOMString referrer;
163
166
    DOMString domain;
164
167
    DOMString url;
165
 
    SVGSVGElement *rootElement;
 
168
    SVGSVGElementPtr rootElement;
166
169
};
167
170
 
168
171
 
208
211
    /**
209
212
     *
210
213
     */
211
 
    virtual SVGSVGElement *getOwnerSVGElement()
 
214
    virtual SVGSVGElementPtr getOwnerSVGElement()
212
215
        { return ownerSvgElement; }
213
216
 
214
217
    /**
215
218
     *
216
219
     */
217
 
    virtual SVGElement *getViewportElement()
 
220
    virtual SVGElementPtr getViewportElement()
218
221
        { return viewportElement; }
219
222
 
220
223
 
232
235
    /**
233
236
     *
234
237
     */
235
 
    SVGElementImpl(SVGDocumentImpl *owner, const DOMString &tagName)
 
238
    SVGElementImpl(SVGDocumentImplPtr owner, const DOMString &tagName)
236
239
                    : ElementImpl(owner, tagName)
237
240
        { init(); }
238
241
 
239
242
    /**
240
243
     *
241
244
     */
242
 
    SVGElementImpl(SVGDocumentImpl *owner,
 
245
    SVGElementImpl(SVGDocumentImplPtr owner,
243
246
                   const DOMString &namespaceURI,
244
247
                   const DOMString &tagName)
245
248
                   : ElementImpl(owner, namespaceURI, tagName)
262
265
        viewportElement = NULL;
263
266
        }
264
267
 
265
 
    DOMString id;
266
 
    DOMString xmlBase;
267
 
    SVGSVGElement *ownerSvgElement;
268
 
    SVGElement *viewportElement;
 
268
    DOMString        id;
 
269
    DOMString        xmlBase;
 
270
    SVGSVGElementPtr ownerSvgElement;
 
271
    SVGElementPtr    viewportElement;
269
272
 
270
273
};
271
274
 
456
459
     *
457
460
     */
458
461
    virtual NodeList getIntersectionList (const SVGRect &rect,
459
 
                                          const SVGElement *referenceElement );
 
462
                                          const SVGElementPtr referenceElement );
460
463
 
461
464
    /**
462
465
     *
463
466
     */
464
467
    virtual NodeList getEnclosureList (const SVGRect &rect,
465
 
                                       const SVGElement *referenceElement );
466
 
 
467
 
    /**
468
 
     *
469
 
     */
470
 
    virtual bool checkIntersection (const SVGElement *element, const SVGRect &rect );
471
 
 
472
 
    /**
473
 
     *
474
 
     */
475
 
    virtual bool checkEnclosure (const SVGElement *element, const SVGRect &rect );
 
468
                                       const SVGElementPtr referenceElement );
 
469
 
 
470
    /**
 
471
     *
 
472
     */
 
473
    virtual bool checkIntersection (const SVGElementPtr element, const SVGRect &rect );
 
474
 
 
475
    /**
 
476
     *
 
477
     */
 
478
    virtual bool checkEnclosure (const SVGElementPtr element, const SVGRect &rect );
476
479
 
477
480
    /**
478
481
     *
556
559
    /**
557
560
     *
558
561
     */
559
 
    virtual Element *getElementById (const DOMString& elementId );
 
562
    virtual ElementPtr getElementById (const DOMString& elementId );
560
563
 
561
564
 
562
565
 
977
980
    /**
978
981
     *
979
982
     */
980
 
    virtual SVGDocument *getSVGDocument (  )
 
983
    virtual SVGDocumentPtr getSVGDocument (  )
981
984
                    throw( DOMException );
982
985
 
983
986
    //##################
1705
1708
    /**
1706
1709
     *
1707
1710
     */
1708
 
    virtual long getNumberOfChars (  );
1709
 
 
1710
 
    /**
1711
 
     *
1712
 
     */
1713
 
    virtual double getComputedTextLength (  );
1714
 
 
1715
 
    /**
1716
 
     *
1717
 
     */
1718
 
    virtual double getSubStringLength (unsigned long charnum, unsigned long nchars )
1719
 
                                     throw( DOMException );
1720
 
 
1721
 
    /**
1722
 
     *
1723
 
     */
1724
 
    virtual SVGPoint getStartPositionOfChar (unsigned long charnum )
1725
 
                                              throw( DOMException );
1726
 
 
1727
 
    /**
1728
 
     *
1729
 
     */
1730
 
    virtual SVGPoint getEndPositionOfChar (unsigned long charnum )
1731
 
                                           throw( DOMException );
1732
 
 
1733
 
    /**
1734
 
     *
1735
 
     */
1736
 
    virtual SVGRect getExtentOfChar (unsigned long charnum )
 
1711
    virtual long getNumberOfChars(  );
 
1712
 
 
1713
    /**
 
1714
     *
 
1715
     */
 
1716
    virtual double getComputedTextLength(  );
 
1717
 
 
1718
    /**
 
1719
     *
 
1720
     */
 
1721
    virtual double getSubStringLength(unsigned long charnum,
 
1722
                                          unsigned long nchars )
1737
1723
                                      throw( DOMException );
1738
1724
 
1739
1725
    /**
1740
1726
     *
1741
1727
     */
1742
 
    virtual double getRotationOfChar (unsigned long charnum )
 
1728
    virtual SVGPoint getStartPositionOfChar(unsigned long charnum )
 
1729
                                            throw( DOMException );
 
1730
 
 
1731
    /**
 
1732
     *
 
1733
     */
 
1734
    virtual SVGPoint getEndPositionOfChar(unsigned long charnum )
 
1735
                                          throw( DOMException );
 
1736
 
 
1737
    /**
 
1738
     *
 
1739
     */
 
1740
    virtual SVGRect getExtentOfChar(unsigned long charnum )
 
1741
                                    throw( DOMException );
 
1742
 
 
1743
    /**
 
1744
     *
 
1745
     */
 
1746
    virtual double getRotationOfChar(unsigned long charnum )
1743
1747
                                     throw( DOMException );
1744
1748
 
1745
1749
    /**
1746
1750
     *
1747
1751
     */
1748
 
    virtual long getCharNumAtPosition (const SVGPoint &point );
 
1752
    virtual long getCharNumAtPosition(const SVGPoint &point );
1749
1753
 
1750
1754
    /**
1751
1755
     *
1752
1756
     */
1753
 
    virtual void selectSubString (unsigned long charnum, unsigned long nchars )
1754
 
                                  throw( DOMException );
 
1757
    virtual void selectSubString(unsigned long charnum, unsigned long nchars )
 
1758
                                 throw( DOMException );
1755
1759
 
1756
1760
 
1757
1761
 
4453
4457
    /**
4454
4458
     *
4455
4459
     */
4456
 
    virtual SVGElement *getTargetElement()
 
4460
    virtual SVGElementPtr getTargetElement()
4457
4461
        { return targetElement; }
4458
4462
 
4459
4463
 
4488
4492
 
4489
4493
protected:
4490
4494
 
4491
 
    SVGElement *targetElement;
 
4495
    SVGElementPtr targetElement;
4492
4496
    double startTime, currentTime, simpleDuration;
4493
4497
};
4494
4498