summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/pointparam-knotholder.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-03-21 14:49:55 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-03-21 14:49:55 +0000
commitd07bdbd2312a7635ea9f3f46dbeab862cc5e79a1 (patch)
treea220b3fc0db70d3e37b113b82405d4c1ece4057f /src/live_effects/parameter/pointparam-knotholder.cpp
parentRemove unused flag from PathString. (diff)
downloadinkscape-d07bdbd2312a7635ea9f3f46dbeab862cc5e79a1.tar.gz
inkscape-d07bdbd2312a7635ea9f3f46dbeab862cc5e79a1.zip
Clean up event handler functions of pointparam-knotholder.cpp
(bzr r5144)
Diffstat (limited to 'src/live_effects/parameter/pointparam-knotholder.cpp')
-rw-r--r--src/live_effects/parameter/pointparam-knotholder.cpp79
1 files changed, 5 insertions, 74 deletions
diff --git a/src/live_effects/parameter/pointparam-knotholder.cpp b/src/live_effects/parameter/pointparam-knotholder.cpp
index df8c18d41..faf310a68 100644
--- a/src/live_effects/parameter/pointparam-knotholder.cpp
+++ b/src/live_effects/parameter/pointparam-knotholder.cpp
@@ -160,86 +160,17 @@ void pointparam_knot_holder_add_full(
sp_knot_show(e->knot);
}
-/**
- * \param p In desktop coordinates.
- */
-
- // don't write to XML yet...
-//static
-void pointparam_knotholder_update_knots(PointParamKnotHolder *knot_holder, SPItem *item)
+static void pointparam_knot_clicked_handler(SPKnot */*knot*/, guint /*state*/, gpointer data)
{
-
- NR::Matrix const i2d(sp_item_i2d_affine(item));
-/*
- for (GSList *el = knot_holder->entity; el; el = el->next) {
- SPKnotHolderEntity *e = (SPKnotHolderEntity *) el->data;
- GObject *kob = e->knot;
-
- NR::Point dp( e->knot_get(item) * i2d );
- g_signal_handler_block(kob, e->handler_id);
- sp_knot_set_position(e->knot, &dp, SP_KNOT_STATE_NORMAL);
- g_signal_handler_unblock(kob, e->handler_id);
- }
-
- knot_holder->lpeobject->lpe->setParameter(np->repr_key, svgpath);
-
- knot_holder->lpeobject->requestModified(SP_OBJECT_MODIFIED_FLAG);
-*/
-}
-
-static void pointparam_knot_clicked_handler(SPKnot *knot, guint state, gpointer data)
-{
-
SPKnotHolder *knot_holder = (SPKnotHolder *) data;
- SPItem *item = SP_ITEM (knot_holder->item);
-/*
- g_object_ref(knot_holder);
- for (GSList *el = knot_holder->entity; el; el = el->next) {
- SPKnotHolderEntity *e = (SPKnotHolderEntity *) el->data;
- if (e->knot == knot) {
- if (e->knot_click) {
- e->knot_click(item, state);
- }
- break;
- }
- }
-
- if (SP_IS_SHAPE(item)) {
- sp_shape_set_shape(SP_SHAPE(item));
- }
-
- knotholder_update_knots(knot_holder, item);
- g_object_unref(knot_holder);
-
- // for drag, this is done by ungrabbed_handler, but for click we must do it here
- sp_document_done(SP_OBJECT_DOCUMENT(knot_holder->item), SP_VERB_CONTEXT_LPE,
- _("Change LPE point parameter"));
-*/
}
-static void pointparam_knot_moved_handler(SPKnot *knot, NR::Point const *p, guint state, gpointer data)
+/**
+ * \param p In desktop coordinates.
+ */
+static void pointparam_knot_moved_handler(SPKnot */*knot*/, NR::Point const */*p*/, guint /*state*/, gpointer data)
{
-
SPKnotHolder *knot_holder = (SPKnotHolder *) data;
- SPItem *item = SP_ITEM (knot_holder->item);
-/* // this was a local change and the knotholder does not need to be recreated:
- knot_holder->local_change = TRUE;
-
- for (GSList *el = knot_holder->entity; el; el = el->next) {
- SPKnotHolderEntity *e = (SPKnotHolderEntity *) el->data;
- if (e->knot == knot) {
- NR::Point const q = *p / sp_item_i2d_affine(item);
- e->knot_set(item, q, e->knot->drag_origin / sp_item_i2d_affine(item), state);
- break;
- }
- }
-
- if (SP_IS_SHAPE (item)) {
- sp_shape_set_shape(SP_SHAPE (item));
- }
-
- knotholder_update_knots(knot_holder, item);
-*/
}
static void pointparam_knot_ungrabbed_handler(SPKnot *knot, unsigned int /*state*/, PointParamKnotHolder *kh)