summaryrefslogtreecommitdiffstats
path: root/src/object/sp-use-reference.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:29:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:29:01 +0000
commit35a96bde514a8897f6f0fcc41c5833bf63df2e2a (patch)
tree657d15a03cc46bd099fc2c6546a7a4ad43815d9f /src/object/sp-use-reference.h
parentInitial commit. (diff)
downloadinkscape-35a96bde514a8897f6f0fcc41c5833bf63df2e2a.tar.xz
inkscape-35a96bde514a8897f6f0fcc41c5833bf63df2e2a.zip
Adding upstream version 1.0.2.upstream/1.0.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/object/sp-use-reference.h')
-rw-r--r--src/object/sp-use-reference.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/object/sp-use-reference.h b/src/object/sp-use-reference.h
new file mode 100644
index 0000000..0cb207d
--- /dev/null
+++ b/src/object/sp-use-reference.h
@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+#ifndef SEEN_SP_USE_REFERENCE_H
+#define SEEN_SP_USE_REFERENCE_H
+
+/*
+ * The reference corresponding to href of <use> element.
+ *
+ * Copyright (C) 2004 Bulia Byak
+ *
+ * Released under GNU GPL v2+, read the file 'COPYING' for more information.
+ */
+
+#include <sigc++/sigc++.h>
+
+#include "sp-item.h"
+#include "uri-references.h"
+
+class SPCurve;
+
+namespace Inkscape {
+namespace XML {
+class Node;
+}
+}
+
+
+class SPUseReference : public Inkscape::URIReference {
+public:
+ SPUseReference(SPObject *owner) : URIReference(owner) {}
+
+ SPItem *getObject() const {
+ return static_cast<SPItem *>(URIReference::getObject());
+ }
+
+protected:
+ bool _acceptObject(SPObject * const obj) const override;
+
+};
+
+
+class SPUsePath : public SPUseReference {
+public:
+ SPCurve *originalPath;
+ bool sourceDirty;
+
+ SPObject *owner;
+ char *sourceHref;
+ Inkscape::XML::Node *sourceRepr;
+ SPObject *sourceObject;
+
+ sigc::connection _modified_connection;
+ sigc::connection _delete_connection;
+ sigc::connection _changed_connection;
+ sigc::connection _transformed_connection;
+
+ SPUsePath(SPObject* i_owner);
+ ~SPUsePath() override;
+
+ void link(char* to);
+ void unlink();
+ void start_listening(SPObject* to);
+ void quit_listening();
+ void refresh_source();
+
+ void (*user_unlink) (SPObject *user);
+};
+
+#endif /* !SEEN_SP_USE_REFERENCE_H */
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :