summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/pointparam-knotholder.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-06-04 14:47:17 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-06-04 14:47:17 +0000
commit1576e4cb9a983ecd228902aab0a70d90e9b95dad (patch)
tree6a47f964fa3702967431b6493bbc61d4f1f94739 /src/live_effects/parameter/pointparam-knotholder.cpp
parentIcon for spiro spline mode (diff)
downloadinkscape-1576e4cb9a983ecd228902aab0a70d90e9b95dad.tar.gz
inkscape-1576e4cb9a983ecd228902aab0a70d90e9b95dad.zip
Some cleanup of knotholder code; mostly renaming knot_(get|set|click)_func --> knot_(get|set_click) for reduced verbosity
(bzr r5802)
Diffstat (limited to 'src/live_effects/parameter/pointparam-knotholder.cpp')
-rw-r--r--src/live_effects/parameter/pointparam-knotholder.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/live_effects/parameter/pointparam-knotholder.cpp b/src/live_effects/parameter/pointparam-knotholder.cpp
index 8e929a59e..f59b2f7eb 100644
--- a/src/live_effects/parameter/pointparam-knotholder.cpp
+++ b/src/live_effects/parameter/pointparam-knotholder.cpp
@@ -60,6 +60,21 @@ PointParamKnotHolder::~PointParamKnotHolder()
g_object_unref(G_OBJECT(this->lpeobject));
}
+class KnotHolderEntityPointParam : public KnotHolderEntity {
+public:
+ virtual NR::Point knot_get();
+ virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);
+};
+
+NR::Point
+KnotHolderEntityPointParam::knot_get() {
+ return NR::Point(0,0);
+}
+
+void
+KnotHolderEntityPointParam::knot_set(NR::Point const &p, NR::Point const &origin, guint state) {
+}
+
void
PointParamKnotHolder::add_knot (
Geom::Point & p,
@@ -70,8 +85,7 @@ PointParamKnotHolder::add_knot (
const gchar *tip )
{
/* create new SPKnotHolderEntry */
- // TODO: knot_click can't be set any more with the new KnotHolder design; make it a virtual function?
- KnotHolderEntity *e = new KnotHolderEntity();
+ KnotHolderEntity *e = new KnotHolderEntityPointParam();
e->create(this->desktop, this->item, this, tip, shape, mode, color);
entity.push_back(e);