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>
16 class Path;
18 namespace Inkscape {
19 namespace XML {
20 struct Node;
21 }
22 }
25 class SPUseReference : public Inkscape::URIReference {
26 public:
27 SPUseReference(SPObject *owner) : URIReference(owner) {}
29 SPItem *getObject() const {
30 return (SPItem *)URIReference::getObject();
31 }
33 protected:
34 virtual bool _acceptObject(SPObject * const obj) const;
36 };
39 class SPUsePath : public SPUseReference {
40 public:
41 Path *originalPath;
42 bool sourceDirty;
44 SPObject *owner;
45 gchar *sourceHref;
46 Inkscape::XML::Node *sourceRepr;
47 SPObject *sourceObject;
49 sigc::connection _modified_connection;
50 sigc::connection _delete_connection;
51 sigc::connection _changed_connection;
52 sigc::connection _transformed_connection;
54 SPUsePath(SPObject* i_owner);
55 ~SPUsePath(void);
57 void link(char* to);
58 void unlink(void);
59 void start_listening(SPObject* to);
60 void quit_listening(void);
61 void refresh_source(void);
63 void (*user_unlink) (SPObject *user);
64 };
66 #endif /* !SEEN_SP_USE_REFERENCE_H */
68 /*
69 Local Variables:
70 mode:c++
71 c-file-style:"stroustrup"
72 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
73 indent-tabs-mode:nil
74 fill-column:99
75 End:
76 */
77 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :