Lines Matching defs:draggable
157 GrDraggable *draggable = *it2;
165 guint32 c = sp_item_gradient_stop_query_style (draggable->item, draggable->point_type, draggable->point_i, draggable->fill_or_stroke);
312 GrDraggable *draggable = *it2;
314 sp_item_gradient_stop_set_style(draggable->item, draggable->point_type, draggable->point_i, draggable->fill_or_stroke, stop);
335 GrDraggable *draggable = *it2;
337 guint32 c = sp_item_gradient_stop_query_style (draggable->item, draggable->point_type, draggable->point_i, draggable->fill_or_stroke);
589 GrDraggable *draggable = *j;
591 sp_item_gradient_stop_set_style (draggable->item, draggable->point_type, draggable->point_i, draggable->fill_or_stroke, stop);
677 GrDraggable *draggable = (*(this->selected.begin()))->draggables[0];
678 desktop->gr_item = draggable->item;
679 desktop->gr_point_type = draggable->point_type;
680 desktop->gr_point_i = draggable->point_i;
681 desktop->gr_fill_or_stroke = draggable->fill_or_stroke;
748 // with Shift; unsnap if we carry more than one draggable
753 // relink to it all but the first draggable in the list
756 GrDraggable *draggable = *i;
757 dr_new->addDraggable (draggable);
776 GrDraggable *draggable = *i;
777 // copy draggable to d_new:
778 GrDraggable *da_new = new GrDraggable (draggable->item, draggable->point_type, draggable->point_i, draggable->fill_or_stroke);
820 GrDraggable *draggable = *i;
824 if (draggable->point_type == POINT_LG_BEGIN || draggable->point_type == POINT_LG_END) {
829 if (d_new->isA (draggable->item,
830 draggable->point_type == POINT_LG_BEGIN? POINT_LG_END : POINT_LG_BEGIN,
831 draggable->fill_or_stroke)) {
843 } else if (draggable->point_type == POINT_RG_R1 || draggable->point_type == POINT_RG_R2 || draggable->point_type == POINT_RG_FOCUS) {
848 if (d_new->isA (draggable->item,
850 draggable->fill_or_stroke)) {
855 } else if (draggable->point_type == POINT_RG_CENTER) {
858 } else if (draggable->point_type == POINT_MG_CORNER ||
859 draggable->point_type == POINT_MG_HANDLE ||
860 draggable->point_type == POINT_MG_TENSOR ) {
919 GrDraggable *draggable = dragger->draggables[0];
925 guint lowest_i = draggable->point_i;
926 guint highest_i = draggable->point_i;
933 d_add = drag->getDraggerFor(draggable->item, draggable->point_type, lowest_i - 1, draggable->fill_or_stroke);
945 d_add = drag->getDraggerFor(draggable->item, draggable->point_type, highest_i + 1, draggable->fill_or_stroke);
960 d_temp = drag->getDraggerFor (draggable->item, POINT_LG_BEGIN, 0, draggable->fill_or_stroke);
962 d_temp = drag->getDraggerFor (draggable->item, POINT_LG_MID, lowest_i - 1, draggable->fill_or_stroke);
967 d_temp = drag->getDraggerFor (draggable->item, POINT_LG_MID, highest_i + 1, draggable->fill_or_stroke);
969 d_temp = drag->getDraggerFor (draggable->item, POINT_LG_END, num-1, draggable->fill_or_stroke);
977 d_temp = drag->getDraggerFor (draggable->item, POINT_RG_CENTER, 0, draggable->fill_or_stroke);
979 d_temp = drag->getDraggerFor (draggable->item, draggable->point_type, lowest_i - 1, draggable->fill_or_stroke);
984 d_temp = drag->getDraggerFor (draggable->item, draggable->point_type, highest_i + 1, draggable->fill_or_stroke);
986 d_temp = drag->getDraggerFor (draggable->item, (draggable->point_type==POINT_RG_MID1) ? POINT_RG_R1 : POINT_RG_R2, num-1, draggable->fill_or_stroke);
1004 GrDraggable *draggable = dragger->draggables[0];
1013 SPObject *server = draggable->getServer();
1111 GrDraggable *draggable = dragger->draggables[0];
1112 if (!draggable) return;
1116 SPGradient *gradient = getGradient(draggable->item, draggable->fill_or_stroke);
1120 switch (draggable->point_type) { // if we delete first or last stop, move the next/previous to the edge
1150 stop = sp_get_stop_i(gradient, draggable->point_i);
1190 //GrDraggable *draggable = (GrDraggable *) dragger->draggables->data;
1191 //sp_item_gradient_edit_stop (draggable->item, draggable->point_type, draggable->point_i, draggable->fill_or_stroke);
1200 GrDraggable *draggable = *i;
1208 !(draggable->point_type == POINT_RG_FOCUS && this->isA(draggable->item, POINT_RG_CENTER, draggable->point_i, draggable->fill_or_stroke)))
1210 sp_item_gradient_set_coords (draggable->item, draggable->point_type, draggable->point_i, this->point, draggable->fill_or_stroke, write_repr, scale_radial);
1216 * Checks if the dragger has a draggable with this point_type.
1221 GrDraggable *draggable = *i;
1222 if (draggable->point_type == point_type) {
1230 * Checks if the dragger has a draggable with this item, point_type + point_i (number), fill_or_stroke.
1235 GrDraggable *draggable = *i;
1236 if ( (draggable->point_type == point_type) && (draggable->point_i == point_i) && (draggable->item == item) && (draggable->fill_or_stroke == fill_or_stroke) ) {
1244 * Checks if the dragger has a draggable with this item, point_type, fill_or_stroke.
1249 GrDraggable *draggable = *i;
1250 if ( (draggable->point_type == point_type) && (draggable->item == item) && (draggable->fill_or_stroke == fill_or_stroke) ) {
1341 GrDraggable *draggable = *it2;
1343 // Check draggable is of type POINT_MG_CORNER (don't allow selection of POINT_MG_HANDLE)
1344 if( draggable->point_type != POINT_MG_CORNER ) continue;
1347 SPGradient *gradient = getGradient(draggable->item, draggable->fill_or_stroke);
1350 selected_corners[ gradient ].push_back( draggable->point_i );
1360 GrDraggable *draggable = *j;
1362 SPItem *item = draggable->item;
1363 gint point_type = draggable->point_type;
1364 gint point_i = draggable->point_i;
1366 fill_or_stroke = draggable->fill_or_stroke;
1368 // Check draggable is of type POINT_MG_CORNER (don't allow selection of POINT_MG_HANDLE)
1417 GrDraggable *draggable = this->draggables[0];
1418 char *item_desc = draggable->item->detailedDescription();
1419 switch (draggable->point_type) {
1424 _(gr_knot_descr[draggable->point_type]),
1425 draggable->point_i,
1427 (draggable->fill_or_stroke == Inkscape::FOR_STROKE) ? _(" (stroke)") : "");
1432 _(gr_knot_descr[draggable->point_type]),
1434 (draggable->fill_or_stroke == Inkscape::FOR_STROKE) ? _(" (stroke)") : "");
1450 * Adds a draggable to the dragger.
1461 * Adds a draggable to the dragger.
1463 void GrDragger::addDraggable(GrDraggable *draggable)
1465 this->draggables.insert(this->draggables.begin(), draggable);
1472 * Moves this dragger to the point of the given draggable, acting upon all other draggables.
1492 // Don't move initial draggable
1504 void GrDragger::updateMidstopDependencies(GrDraggable *draggable, bool write_repr)
1506 SPObject *server = draggable->getServer();
1514 this->moveOtherToDraggable (draggable->item, POINT_LG_MID, i, draggable->fill_or_stroke, write_repr);
1518 this->moveOtherToDraggable (draggable->item, POINT_RG_MID1, i, draggable->fill_or_stroke, write_repr);
1519 this->moveOtherToDraggable (draggable->item, POINT_RG_MID2, i, draggable->fill_or_stroke, write_repr);
1531 GrDraggable *draggable = *j;
1532 switch (draggable->point_type) {
1536 this->moveOtherToDraggable (draggable->item, POINT_LG_END, -1, draggable->fill_or_stroke, write_repr);
1538 this->updateMidstopDependencies (draggable, write_repr);
1544 this->moveOtherToDraggable (draggable->item, POINT_LG_BEGIN, 0, draggable->fill_or_stroke, write_repr);
1546 this->updateMidstopDependencies (draggable, write_repr);
1553 this->moveOtherToDraggable (draggable->item, POINT_RG_R1, -1, draggable->fill_or_stroke, write_repr);
1554 this->moveOtherToDraggable (draggable->item, POINT_RG_FOCUS, -1, draggable->fill_or_stroke, write_repr);
1555 this->updateMidstopDependencies (draggable, write_repr);
1558 this->moveOtherToDraggable (draggable->item, POINT_RG_R2, -1, draggable->fill_or_stroke, write_repr);
1559 this->moveOtherToDraggable (draggable->item, POINT_RG_FOCUS, -1, draggable->fill_or_stroke, write_repr);
1560 this->updateMidstopDependencies (draggable, write_repr);
1563 this->moveOtherToDraggable (draggable->item, POINT_RG_R1, -1, draggable->fill_or_stroke, write_repr);
1564 this->moveOtherToDraggable (draggable->item, POINT_RG_R2, -1, draggable->fill_or_stroke, write_repr);
1565 this->moveOtherToDraggable (draggable->item, POINT_RG_FOCUS, -1, draggable->fill_or_stroke, write_repr);
1566 this->updateMidstopDependencies (draggable, write_repr);
1572 this->moveOtherToDraggable (draggable->item, POINT_RG_MID2, draggable->point_i, draggable->fill_or_stroke, write_repr);
1575 this->moveOtherToDraggable (draggable->item, POINT_RG_MID1, draggable->point_i, draggable->fill_or_stroke, write_repr);
1585 GrDragger::GrDragger(GrDrag *parent, Geom::Point p, GrDraggable *draggable)
1605 if ( (draggable) // it can be NULL if a node in unsnapped (eg. focus point unsnapped from center)
1607 && ( (draggable->point_type == POINT_LG_MID)
1608 || (draggable->point_type == POINT_RG_MID1)
1609 || (draggable->point_type == POINT_RG_MID2) ) )
1621 // add the initial draggable
1622 if (draggable) {
1623 this->addDraggable (draggable);
1655 * Select the dragger which has the given draggable.
1693 // GrDraggable *draggable = (GrDraggable*) drgble->data;
1694 // //if( draggable != NULL ) std::cout << " draggable" << std::endl;
1888 * If there already exists a dragger within MERGE_DIST of p, add the draggable to it; otherwise create
1891 void GrDrag::addDragger(GrDraggable *draggable)
1893 Geom::Point p = getGradientCoords(draggable->item, draggable->point_type, draggable->point_i, draggable->fill_or_stroke);
1897 if (dragger->mayMerge (draggable) && Geom::L2 (dragger->point - p) < MERGE_DIST) {
1898 // distance is small, merge this draggable into dragger, no need to create new dragger
1899 dragger->addDraggable (draggable);
1905 GrDragger *new_dragger = new GrDragger(this, p, draggable);
1996 nodes[i][j]->draggable = icorner;
2007 nodes[i][j]->draggable = ihandle;
2019 nodes[i][j]->draggable = itensor;
2026 std::cout << "Bad Mesh draggable type" << std::endl;
2048 * Artificially grab the knot of the dragger with this draggable; used by the gradient context.
2341 // FIXME: here we take into account only the first draggable!
2372 GrDraggable *draggable = dragger->draggables[0];
2377 SPObject *server = draggable->getServer();
2456 GrDraggable * draggable;
2466 GrDraggable *draggable = *drgble;
2467 SPGradient *gradient = getGradient(draggable->item, draggable->fill_or_stroke);
2470 switch (draggable->point_type) {
2475 SPStop *stop = sp_get_stop_i(vector, draggable->point_i);
2495 if ( (draggable->point_type == POINT_LG_BEGIN) || (draggable->point_type == POINT_RG_CENTER) ) {
2503 stopinfo->draggable = draggable;
2550 switch (stopinfo->draggable->point_type) {
2661 if (stopinfo->draggable->fill_or_stroke == Inkscape::FOR_FILL) {
2668 if (stopinfo->draggable->fill_or_stroke == Inkscape::FOR_FILL) {
2678 sp_repr_css_change(stopinfo->draggable->item->getRepr(), css, "style");