From 09089a141e8d8f5073bc4f767c02efc0fec711b1 Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Mon, 19 May 2008 15:52:07 +0000 Subject: Provide knotholder for LPEPerpBisector; TODO: this replaces the usual nodepath in node context but in the long run it is desired to use both along with each other (bzr r5701) --- src/live_effects/effect.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 1d4481415..2a90687f1 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -299,9 +299,24 @@ Effect::registerParameter(Parameter * param) param_vector.push_back(param); } +void +Effect::registerKnotHolderHandle(SPKnotHolderSetFunc set_func, SPKnotHolderGetFunc get_func) +{ + knotholder_func_vector.push_back(std::make_pair(set_func, get_func)); +} + +// TODO: allow for adding click_functions and description strings, too +void +Effect::addHandles(SPKnotHolder *knotholder) { + std::vector >::iterator i; + for (i = knotholder_func_vector.begin(); i != knotholder_func_vector.end(); ++i) { + sp_knot_holder_add(knotholder, i->first, i->second, NULL, ("")); + } +} + /** -* This *creates* a new widget, management of deletion should be done by the caller -*/ + * This *creates* a new widget, management of deletion should be done by the caller + */ Gtk::Widget * Effect::newWidget(Gtk::Tooltips * tooltips) { -- cgit v1.2.3