Lines Matching refs:knot

43 #include "knot.h"
80 // knot shapes corresponding to GrPointType enum (in sp-gradient.h)
385 // add the knot
398 // add the knot
410 // add the knot
736 static void gr_knot_moved_handler(SPKnot *knot, Geom::Point const &ppointer, guint state, gpointer data)
810 knot->moveto(p);
895 knot->moveto(p);
922 // the draglimits are between knot(lowest_i - 1) and knot(highest_i + 1)
997 * Called when a midpoint knot is dragged.
999 static void gr_knot_moved_midpoint_handler(SPKnot */*knot*/, Geom::Point const &ppointer, guint state, gpointer data)
1037 SPKnot *drgknot = drg->knot;
1061 static void gr_knot_grabbed_handler(SPKnot */*knot*/, unsigned int /*state*/, gpointer data)
1069 * Called when the mouse releases a dragger knot; changes gradient writing to repr, updates other draggers if needed.
1071 static void gr_knot_ungrabbed_handler(SPKnot *knot, unsigned int state, gpointer data)
1077 dragger->point_original = dragger->point = knot->pos;
1105 * Called when a dragger knot is clicked; selects the dragger or deletes it depending on the
1108 static void gr_knot_clicked_handler(SPKnot */*knot*/, guint state, gpointer data)
1115 // delete this knot from vector
1176 * Called when a dragger knot is doubleclicked;
1178 static void gr_knot_doubleclicked_handler(SPKnot */*knot*/, guint /*state*/, gpointer data)
1387 SPKnot *knot = handle->knot;
1389 knot->moveto(pk);
1396 SPKnot *knot = handle->knot;
1398 knot->moveto(pk);
1407 * Updates the statusbar tip of the dragger knot, based on its draggables.
1411 if (this->knot && this->knot->tip) {
1412 g_free (this->knot->tip);
1413 this->knot->tip = NULL;
1423 this->knot->tip = g_strdup_printf (_("%s %d for: %s%s; drag with <b>Ctrl</b> to snap offset; click with <b>Ctrl+Alt</b> to delete stop"),
1431 this->knot->tip = g_strdup_printf (_("%s for: %s%s; drag with <b>Ctrl</b> to snap angle, with <b>Ctrl+Alt</b> to preserve angle, with <b>Ctrl+Shift</b> to scale around center"),
1439 this->knot->tip = g_strdup_printf ("%s", _("Radial gradient <b>center</b> and <b>focus</b>; drag with <b>Shift</b> to separate focus"));
1442 this->knot->tip = g_strdup_printf (ngettext("Gradient point shared by <b>%d</b> gradient; drag with <b>Shift</b> to separate",
1457 g_object_set (G_OBJECT (this->knot->item), "shape", gr_knot_shapes[last->point_type], NULL);
1484 this->knot->moveto(this->point);
1593 // create the knot
1594 this->knot = new SPKnot(parent->desktop, NULL);
1595 this->knot->setMode(SP_KNOT_MODE_XOR);
1596 this->knot->setFill(GR_KNOT_COLOR_NORMAL, GR_KNOT_COLOR_MOUSEOVER, GR_KNOT_COLOR_MOUSEOVER);
1597 this->knot->setStroke(0x0000007f, 0x0000007f, 0x0000007f);
1598 this->knot->updateCtrl();
1600 // move knot to the given point
1601 this->knot->setPosition(p, SP_KNOT_STATE_NORMAL);
1602 this->knot->show();
1604 // connect knot's signals
1611 this->_moved_connection = this->knot->moved_signal.connect(sigc::bind(sigc::ptr_fun(gr_knot_moved_midpoint_handler), this));
1613 this->_moved_connection = this->knot->moved_signal.connect(sigc::bind(sigc::ptr_fun(gr_knot_moved_handler), this));
1616 this->_clicked_connection = this->knot->click_signal.connect(sigc::bind(sigc::ptr_fun(gr_knot_clicked_handler), this));
1617 this->_doubleclicked_connection = this->knot->doubleclicked_signal.connect(sigc::bind(sigc::ptr_fun(gr_knot_doubleclicked_handler), this));
1618 this->_grabbed_connection = this->knot->grabbed_signal.connect(sigc::bind(sigc::ptr_fun(gr_knot_grabbed_handler), this));
1619 this->_ungrabbed_connection = this->knot->ungrabbed_signal.connect(sigc::bind(sigc::ptr_fun(gr_knot_ungrabbed_handler), this));
1645 knot_unref(this->knot);
1689 this->knot->fill [SP_KNOT_STATE_NORMAL] = GR_KNOT_COLOR_SELECTED;
1690 g_object_set (G_OBJECT (this->knot->item), "fill_color", GR_KNOT_COLOR_SELECTED, NULL);
1705 this->knot->fill [SP_KNOT_STATE_NORMAL] = GR_KNOT_COLOR_NORMAL;
1706 g_object_set (G_OBJECT (this->knot->item), "fill_color", GR_KNOT_COLOR_NORMAL, NULL);
2037 * Artificially grab the knot of this dragger; used by the gradient context.
2043 dragger->knot->startDragging(dragger->point, x, y, etime);
2048 * Artificially grab the knot of the dragger with this draggable; used by the gradient context.
2055 dragger->knot->startDragging(dragger->point, x, y, etime);
2120 if (d->knot && (d->knot->flags & SP_KNOT_MOUSEOVER)) {
2353 d->knot->moveto(d->point);
2387 SPKnot *drgknot = drg->knot;
2413 * Select the knot next to the last selected one and deselect all other selected.
2430 * Select the knot previous from the last selected one and deselect all other selected.