summaryrefslogtreecommitdiffstats
path: root/src/sp-use.h
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2006-01-16 02:36:01 +0000
committermental <mental@users.sourceforge.net>2006-01-16 02:36:01 +0000
commit179fa413b047bede6e32109e2ce82437c5fb8d34 (patch)
treea5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/sp-use.h
downloadinkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz
inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/sp-use.h')
-rw-r--r--src/sp-use.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/sp-use.h b/src/sp-use.h
new file mode 100644
index 000000000..9668de21c
--- /dev/null
+++ b/src/sp-use.h
@@ -0,0 +1,64 @@
+#ifndef __SP_USE_H__
+#define __SP_USE_H__
+
+/*
+ * SVG <use> implementation
+ *
+ * Authors:
+ * Lauris Kaplinski <lauris@kaplinski.com>
+ *
+ * Copyright (C) 1999-2002 Lauris Kaplinski
+ * Copyright (C) 2000-2001 Ximian, Inc.
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include <sigc++/sigc++.h>
+#include "svg/svg-length.h"
+#include "sp-item.h"
+
+
+#define SP_TYPE_USE (sp_use_get_type ())
+#define SP_USE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_USE, SPUse))
+#define SP_USE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_USE, SPUseClass))
+#define SP_IS_USE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SP_TYPE_USE))
+#define SP_IS_USE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_USE))
+
+class SPUse;
+class SPUseClass;
+class SPUseReference;
+
+struct SPUse : public SPItem {
+ // item built from the original's repr (the visible clone)
+ // relative to the SPUse itself, it is treated as a child, similar to a grouped item relative to its group
+ SPObject *child;
+
+ // SVG attrs
+ SVGLength x;
+ SVGLength y;
+ SVGLength width;
+ SVGLength height;
+ gchar *href;
+
+ // the reference to the original object
+ SPUseReference *ref;
+
+ // a sigc connection for delete notifications
+ sigc::connection _delete_connection;
+ sigc::connection _changed_connection;
+
+ // a sigc connection for transformed signal, used to do move compensation
+ sigc::connection _transformed_connection;
+};
+
+struct SPUseClass {
+ SPItemClass parent_class;
+};
+
+GType sp_use_get_type (void);
+
+SPItem *sp_use_unlink (SPUse *use);
+SPItem *sp_use_get_original (SPUse *use);
+NR::Matrix sp_use_get_parent_transform (SPUse *use);
+
+#endif