Code

create inkview on dist
[inkscape.git] / src / sp-use-reference.h
1 #ifndef SEEN_SP_USE_REFERENCE_H
2 #define SEEN_SP_USE_REFERENCE_H
4 /*
5  * The reference corresponding to href of <use> element.
6  *
7  * Copyright (C) 2004 Bulia Byak
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information.
10  */
12 #include <forward.h>
13 #include <uri-references.h>
14 #include <sigc++/sigc++.h>
17 class SPUseReference : public Inkscape::URIReference {
18 public:
19     SPUseReference(SPObject *owner) : URIReference(owner) {}
21     SPItem *getObject() const {
22         return (SPItem *)URIReference::getObject();
23     }
25 protected:
26     virtual bool _acceptObject(SPObject * const obj) const;
28 };
30 class Path;
31 namespace Inkscape {
32 namespace XML {
33 struct Node;
34 }
35 }
38 class SPUsePath : public SPUseReference {
39 public: 
40         Path           *originalPath;   
41         bool           sourceDirty;
42         
43         SPObject       *owner;
44         gchar                                    *sourceHref;
45   Inkscape::XML::Node         *sourceRepr;
46         SPObject                         *sourceObject;
47         
48         sigc::connection _modified_connection;
49         sigc::connection _delete_connection;
50         sigc::connection _changed_connection;
51         sigc::connection _transformed_connection;
53         SPUsePath(SPObject* i_owner);
54         ~SPUsePath(void);
55         
56         void            link(char* to);
57         void            unlink(void);
58         void            start_listening(SPObject* to);
59         void            quit_listening(void);
60         void            refresh_source(void);
62     void (*user_unlink) (SPObject *user);
63 };
65 #endif /* !SEEN_SP_USE_REFERENCE_H */
67 /*
68   Local Variables:
69   mode:c++
70   c-file-style:"stroustrup"
71   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
72   indent-tabs-mode:nil
73   fill-column:99
74   End:
75 */
76 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :