summaryrefslogtreecommitdiffstats
path: root/src/sp-guide.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-guide.h
downloadinkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz
inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/sp-guide.h')
-rw-r--r--src/sp-guide.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/sp-guide.h b/src/sp-guide.h
new file mode 100644
index 000000000..a3b876483
--- /dev/null
+++ b/src/sp-guide.h
@@ -0,0 +1,64 @@
+#ifndef SP_GUIDE_H
+#define SP_GUIDE_H
+
+/*
+ * SPGuide
+ *
+ * A guideline
+ *
+ * Copyright (C) Lauris Kaplinski 2000
+ *
+ */
+
+#include <vector>
+
+#include "display/display-forward.h"
+#include "libnr/nr-point.h"
+#include "sp-object.h"
+#include "sp-guide-attachment.h"
+
+#define SP_TYPE_GUIDE (sp_guide_get_type())
+#define SP_GUIDE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), SP_TYPE_GUIDE, SPGuide))
+#define SP_GUIDE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SP_TYPE_GUIDE, SPGuideClass))
+#define SP_IS_GUIDE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), SP_TYPE_GUIDE))
+#define SP_IS_GUIDE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_GUIDE))
+
+/* Represents the constraint on p that dot(g.direction, p) == g.position. */
+struct SPGuide : public SPObject {
+ NR::Point normal;
+ gdouble position;
+ guint32 color;
+ guint32 hicolor;
+ GSList *views;
+ std::vector<SPGuideAttachment> attached_items;
+};
+
+struct SPGuideClass {
+ SPObjectClass parent_class;
+};
+
+GType sp_guide_get_type();
+
+void sp_guide_show(SPGuide *guide, SPCanvasGroup *group, GCallback handler);
+void sp_guide_hide(SPGuide *guide, SPCanvas *canvas);
+void sp_guide_sensitize(SPGuide *guide, SPCanvas *canvas, gboolean sensitive);
+
+double sp_guide_position_from_pt(SPGuide const *guide, NR::Point const &pt);
+void sp_guide_moveto(SPGuide const &guide, gdouble const position, bool const commit);
+void sp_guide_remove(SPGuide *guide);
+
+char *sp_guide_description(SPGuide const *guide);
+
+
+#endif /* !SP_GUIDE_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:encoding=utf-8:textwidth=99 :