From 1576e4cb9a983ecd228902aab0a70d90e9b95dad Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Wed, 4 Jun 2008 14:47:17 +0000 Subject: Some cleanup of knotholder code; mostly renaming knot_(get|set|click)_func --> knot_(get|set_click) for reduced verbosity (bzr r5802) --- src/live_effects/parameter/pointparam-knotholder.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/live_effects/parameter/pointparam-knotholder.cpp') 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); -- cgit v1.2.3