From ad092a3d734fcec79273f957e8d86c7a9ceb767b Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Sun, 8 Jun 2008 17:33:58 +0000 Subject: Make knotholders for LPE items finally work; each effect can now overload the addKnotHolderHandles() method to add handles which control its parameters. There is now also a virtual onKnotUngrabbed() method for each knotholder entity which can be used to do cleanup tasks (for LPE parameters it currently writes the value to SVG, although this should probably happen automatically) (bzr r5855) --- src/live_effects/parameter/point.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/live_effects/parameter/point.cpp') diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp index 49a47660f..502af1f23 100644 --- a/src/live_effects/parameter/point.cpp +++ b/src/live_effects/parameter/point.cpp @@ -162,12 +162,33 @@ PointParam::set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint knot_color = color; } +void +PointParam::knot_set(NR::Point const &p, NR::Point const &origin, guint state) +{ + g_print ("PointParam::knot_set() was called!\n"); + param_setValue(p.to_2geom()); +} + +NR::Point +PointParam::knot_get() +{ + g_print ("PointParam::knot_get() was called.\n"); + g_print ("We return (%f, %f)\n", (*this)[0], (*this)[1]); + return *this; +} + +void +PointParam::knot_click(guint state) +{ + g_print ("PointParam::knot_click() was called!\n"); +} // CALLBACKS: void PointParam::on_button_click() { + g_print ("PointParam::on_button_click()\n"); SPDesktop *desktop = SP_ACTIVE_DESKTOP; SPItem * item = sp_desktop_selection(desktop)->singleItem(); if (item != NULL) { -- cgit v1.2.3