1 #define __SP_BOX3D_CONTEXT_C__
3 /*
4 * 3D box drawing context
5 *
6 * Author:
7 * Lauris Kaplinski <lauris@kaplinski.com>
8 * bulia byak <buliabyak@users.sf.net>
9 *
10 * Copyright (C) 2007 Maximilian Albert <Anhalter42@gmx.de>
11 * Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
12 * Copyright (C) 2000-2005 authors
13 * Copyright (C) 2000-2001 Ximian, Inc.
14 *
15 * Released under GNU GPL, read the file 'COPYING' for more information
16 */
18 #include "config.h"
20 #include <gdk/gdkkeysyms.h>
22 #include "macros.h"
23 #include "display/sp-canvas.h"
24 #include "document.h"
25 #include "sp-namedview.h"
26 #include "selection.h"
27 #include "selection-chemistry.h"
28 #include "desktop-handles.h"
29 #include "snap.h"
30 #include "display/curve.h"
31 #include "desktop.h"
32 #include "message-context.h"
33 #include "pixmaps/cursor-3dbox.xpm"
34 #include "box3d.h"
35 #include "box3d-context.h"
36 #include "sp-metrics.h"
37 #include <glibmm/i18n.h>
38 #include "object-edit.h"
39 #include "xml/repr.h"
40 #include "xml/node-event-vector.h"
41 #include "preferences.h"
42 #include "context-fns.h"
43 #include "desktop-style.h"
44 #include "transf_mat_3x4.h"
45 #include "perspective-line.h"
46 #include "persp3d.h"
47 #include "box3d-side.h"
48 #include "document-private.h"
49 #include "line-geometry.h"
50 #include "shape-editor.h"
52 static void sp_box3d_context_class_init(Box3DContextClass *klass);
53 static void sp_box3d_context_init(Box3DContext *box3d_context);
54 static void sp_box3d_context_dispose(GObject *object);
56 static void sp_box3d_context_setup(SPEventContext *ec);
58 static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEvent *event);
59 static gint sp_box3d_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEvent *event);
61 static void sp_box3d_drag(Box3DContext &bc, guint state);
62 static void sp_box3d_finish(Box3DContext *bc);
64 static SPEventContextClass *parent_class;
66 GtkType sp_box3d_context_get_type()
67 {
68 static GType type = 0;
69 if (!type) {
70 GTypeInfo info = {
71 sizeof(Box3DContextClass),
72 NULL, NULL,
73 (GClassInitFunc) sp_box3d_context_class_init,
74 NULL, NULL,
75 sizeof(Box3DContext),
76 4,
77 (GInstanceInitFunc) sp_box3d_context_init,
78 NULL, /* value_table */
79 };
80 type = g_type_register_static(SP_TYPE_EVENT_CONTEXT, "Box3DContext", &info, (GTypeFlags) 0);
81 }
82 return type;
83 }
85 static void sp_box3d_context_class_init(Box3DContextClass *klass)
86 {
87 GObjectClass *object_class = (GObjectClass *) klass;
88 SPEventContextClass *event_context_class = (SPEventContextClass *) klass;
90 parent_class = (SPEventContextClass *) g_type_class_peek_parent(klass);
92 object_class->dispose = sp_box3d_context_dispose;
94 event_context_class->setup = sp_box3d_context_setup;
95 event_context_class->root_handler = sp_box3d_context_root_handler;
96 event_context_class->item_handler = sp_box3d_context_item_handler;
97 }
99 static void sp_box3d_context_init(Box3DContext *box3d_context)
100 {
101 SPEventContext *event_context = SP_EVENT_CONTEXT(box3d_context);
103 event_context->cursor_shape = cursor_3dbox_xpm;
104 event_context->hot_x = 4;
105 event_context->hot_y = 4;
106 event_context->xp = 0;
107 event_context->yp = 0;
108 event_context->tolerance = 0;
109 event_context->within_tolerance = false;
110 event_context->item_to_select = NULL;
112 box3d_context->item = NULL;
114 box3d_context->ctrl_dragged = false;
115 box3d_context->extruded = false;
117 box3d_context->_vpdrag = NULL;
119 new (&box3d_context->sel_changed_connection) sigc::connection();
120 }
122 static void sp_box3d_context_dispose(GObject *object)
123 {
124 Box3DContext *bc = SP_BOX3D_CONTEXT(object);
125 SPEventContext *ec = SP_EVENT_CONTEXT(object);
127 ec->enableGrDrag(false);
129 delete (bc->_vpdrag);
130 bc->_vpdrag = NULL;
132 bc->sel_changed_connection.disconnect();
133 bc->sel_changed_connection.~connection();
135 delete ec->shape_editor;
136 ec->shape_editor = NULL;
138 /* fixme: This is necessary because we do not grab */
139 if (bc->item) {
140 sp_box3d_finish(bc);
141 }
143 if (bc->_message_context) {
144 delete bc->_message_context;
145 }
147 G_OBJECT_CLASS(parent_class)->dispose(object);
148 }
150 /**
151 \brief Callback that processes the "changed" signal on the selection;
152 destroys old and creates new knotholder
153 */
154 static void sp_box3d_context_selection_changed(Inkscape::Selection *selection, gpointer data)
155 {
156 Box3DContext *bc = SP_BOX3D_CONTEXT(data);
157 SPEventContext *ec = SP_EVENT_CONTEXT(bc);
159 ec->shape_editor->unset_item(SH_KNOTHOLDER);
160 SPItem *item = selection->singleItem();
161 ec->shape_editor->set_item(item, SH_KNOTHOLDER);
163 if (selection->perspList().size() == 1) {
164 // selecting a single box changes the current perspective
165 ec->desktop->doc()->current_persp3d = selection->perspList().front();
166 }
167 }
169 /* create a default perspective in document defs if none is present
170 (can happen after 'vacuum defs' or when a pre-0.46 file is opened) */
171 static void sp_box3d_context_check_for_persp_in_defs(SPDocument *document) {
172 SPDefs *defs = (SPDefs *) SP_DOCUMENT_DEFS(document);
174 bool has_persp = false;
175 for (SPObject *child = sp_object_first_child(defs); child != NULL; child = SP_OBJECT_NEXT(child) ) {
176 if (SP_IS_PERSP3D(child)) {
177 has_persp = true;
178 break;
179 }
180 }
182 if (!has_persp) {
183 document->current_persp3d = persp3d_create_xml_element (document);
184 }
185 }
187 static void sp_box3d_context_setup(SPEventContext *ec)
188 {
189 Box3DContext *bc = SP_BOX3D_CONTEXT(ec);
191 if (((SPEventContextClass *) parent_class)->setup) {
192 ((SPEventContextClass *) parent_class)->setup(ec);
193 }
195 sp_box3d_context_check_for_persp_in_defs(sp_desktop_document (ec->desktop));
197 ec->shape_editor = new ShapeEditor(ec->desktop);
199 SPItem *item = sp_desktop_selection(ec->desktop)->singleItem();
200 if (item) {
201 ec->shape_editor->set_item(item, SH_KNOTHOLDER);
202 }
204 bc->sel_changed_connection.disconnect();
205 bc->sel_changed_connection = sp_desktop_selection(ec->desktop)->connectChanged(
206 sigc::bind(sigc::ptr_fun(&sp_box3d_context_selection_changed), (gpointer)bc)
207 );
209 bc->_vpdrag = new Box3D::VPDrag(sp_desktop_document (ec->desktop));
210 Inkscape::Preferences *prefs = Inkscape::Preferences::get();
212 if (prefs->getBool("/tools/shapes/selcue")) {
213 ec->enableSelectionCue();
214 }
216 if (prefs->getBool("/tools/shapes/gradientdrag")) {
217 ec->enableGrDrag();
218 }
220 bc->_message_context = new Inkscape::MessageContext((ec->desktop)->messageStack());
221 }
223 static gint sp_box3d_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEvent *event)
224 {
225 SPDesktop *desktop = event_context->desktop;
227 gint ret = FALSE;
229 switch (event->type) {
230 case GDK_BUTTON_PRESS:
231 if ( event->button.button == 1 && !event_context->space_panning) {
232 Inkscape::setup_for_drag_start(desktop, event_context, event);
233 ret = TRUE;
234 }
235 break;
236 // motion and release are always on root (why?)
237 default:
238 break;
239 }
241 if (((SPEventContextClass *) parent_class)->item_handler) {
242 ret = ((SPEventContextClass *) parent_class)->item_handler(event_context, item, event);
243 }
245 return ret;
246 }
248 static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEvent *event)
249 {
250 static bool dragging;
252 SPDesktop *desktop = event_context->desktop;
253 Inkscape::Selection *selection = sp_desktop_selection (desktop);
254 Inkscape::Preferences *prefs = Inkscape::Preferences::get();
255 int const snaps = prefs->getInt("/options/rotationsnapsperpi/value", 12);
257 Box3DContext *bc = SP_BOX3D_CONTEXT(event_context);
258 g_assert (SP_ACTIVE_DOCUMENT->current_persp3d);
259 Persp3D *cur_persp = SP_ACTIVE_DOCUMENT->current_persp3d;
261 event_context->tolerance = prefs->getIntLimited("/options/dragtolerance/value", 0, 0, 100);
263 gint ret = FALSE;
264 switch (event->type) {
265 case GDK_BUTTON_PRESS:
266 if ( event->button.button == 1 && !event_context->space_panning) {
267 Geom::Point const button_w(event->button.x,
268 event->button.y);
270 // save drag origin
271 event_context->xp = (gint) button_w[Geom::X];
272 event_context->yp = (gint) button_w[Geom::Y];
273 event_context->within_tolerance = true;
275 // remember clicked item, *not* disregarding groups (since a 3D box is a group), honoring Alt
276 event_context->item_to_select = sp_event_context_find_item (desktop, button_w, event->button.state & GDK_MOD1_MASK, event->button.state & GDK_CONTROL_MASK);
278 dragging = true;
279 sp_event_context_snap_window_open(event_context);
281 /* */
282 Geom::Point button_dt(desktop->w2d(button_w));
283 bc->drag_origin = from_2geom(button_dt);
284 bc->drag_ptB = from_2geom(button_dt);
285 bc->drag_ptC = from_2geom(button_dt);
287 /* Projective preimages of clicked point under current perspective */
288 bc->drag_origin_proj = cur_persp->tmat.preimage (from_2geom(button_dt), 0, Proj::Z);
289 bc->drag_ptB_proj = bc->drag_origin_proj;
290 bc->drag_ptC_proj = bc->drag_origin_proj;
291 bc->drag_ptC_proj.normalize();
292 bc->drag_ptC_proj[Proj::Z] = 0.25;
294 /* Snap center */
295 SnapManager &m = desktop->namedview->snap_manager;
296 m.setup(desktop, true, bc->item);
297 m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, button_dt, Inkscape::SNAPSOURCE_HANDLE);
298 bc->center = from_2geom(button_dt);
300 sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
301 ( GDK_KEY_PRESS_MASK |
302 GDK_BUTTON_RELEASE_MASK |
303 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK |
304 GDK_BUTTON_PRESS_MASK ),
305 NULL, event->button.time);
306 ret = TRUE;
307 }
308 break;
309 case GDK_MOTION_NOTIFY:
310 if ( dragging
311 && ( event->motion.state & GDK_BUTTON1_MASK ) && !event_context->space_panning)
312 {
313 if ( event_context->within_tolerance
314 && ( abs( (gint) event->motion.x - event_context->xp ) < event_context->tolerance )
315 && ( abs( (gint) event->motion.y - event_context->yp ) < event_context->tolerance ) ) {
316 break; // do not drag if we're within tolerance from origin
317 }
318 // Once the user has moved farther than tolerance from the original location
319 // (indicating they intend to draw, not click), then always process the
320 // motion notify coordinates as given (no snapping back to origin)
321 event_context->within_tolerance = false;
323 Geom::Point const motion_w(event->motion.x,
324 event->motion.y);
325 Geom::Point motion_dt(desktop->w2d(motion_w));
327 SnapManager &m = desktop->namedview->snap_manager;
328 m.setup(desktop, true, bc->item);
329 m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, motion_dt, Inkscape::SNAPSOURCE_HANDLE);
331 bc->ctrl_dragged = event->motion.state & GDK_CONTROL_MASK;
333 if (event->motion.state & GDK_SHIFT_MASK && !bc->extruded && bc->item) {
334 // once shift is pressed, set bc->extruded
335 bc->extruded = true;
336 }
338 if (!bc->extruded) {
339 bc->drag_ptB = from_2geom(motion_dt);
340 bc->drag_ptC = from_2geom(motion_dt);
342 bc->drag_ptB_proj = cur_persp->tmat.preimage (from_2geom(motion_dt), 0, Proj::Z);
343 bc->drag_ptC_proj = bc->drag_ptB_proj;
344 bc->drag_ptC_proj.normalize();
345 bc->drag_ptC_proj[Proj::Z] = 0.25;
346 } else {
347 // Without Ctrl, motion of the extruded corner is constrained to the
348 // perspective line from drag_ptB to vanishing point Y.
349 if (!bc->ctrl_dragged) {
350 /* snapping */
351 Box3D::PerspectiveLine pline (bc->drag_ptB, Proj::Z, SP_ACTIVE_DOCUMENT->current_persp3d);
352 bc->drag_ptC = pline.closest_to (from_2geom(motion_dt));
354 bc->drag_ptB_proj.normalize();
355 bc->drag_ptC_proj = cur_persp->tmat.preimage (bc->drag_ptC, bc->drag_ptB_proj[Proj::X], Proj::X);
356 } else {
357 bc->drag_ptC = from_2geom(motion_dt);
359 bc->drag_ptB_proj.normalize();
360 bc->drag_ptC_proj = cur_persp->tmat.preimage (from_2geom(motion_dt), bc->drag_ptB_proj[Proj::X], Proj::X);
361 }
362 Geom::Point pt2g = to_2geom(bc->drag_ptC);
363 m.freeSnapReturnByRef(Inkscape::SnapPreferences::SNAPPOINT_NODE, pt2g, Inkscape::SNAPSOURCE_HANDLE);
364 bc->drag_ptC = from_2geom(pt2g);
365 }
367 sp_box3d_drag(*bc, event->motion.state);
369 ret = TRUE;
370 }
371 break;
372 case GDK_BUTTON_RELEASE:
373 event_context->xp = event_context->yp = 0;
374 if ( event->button.button == 1 && !event_context->space_panning) {
375 dragging = false;
376 sp_event_context_snap_window_closed(event_context, false); //button release will also occur on a double-click; in that case suppress warnings
378 if (!event_context->within_tolerance) {
379 // we've been dragging, finish the box
380 sp_box3d_finish(bc);
381 } else if (event_context->item_to_select) {
382 // no dragging, select clicked item if any
383 if (event->button.state & GDK_SHIFT_MASK) {
384 selection->toggle(event_context->item_to_select);
385 } else {
386 selection->set(event_context->item_to_select);
387 }
388 } else {
389 // click in an empty space
390 selection->clear();
391 }
393 event_context->item_to_select = NULL;
394 ret = TRUE;
395 sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
396 event->button.time);
397 }
398 break;
399 case GDK_KEY_PRESS:
400 switch (get_group0_keyval (&event->key)) {
401 case GDK_Up:
402 case GDK_Down:
403 case GDK_KP_Up:
404 case GDK_KP_Down:
405 // prevent the zoom field from activation
406 if (!MOD__CTRL_ONLY)
407 ret = TRUE;
408 break;
410 case GDK_bracketright:
411 persp3d_rotate_VP (inkscape_active_document()->current_persp3d, Proj::X, -180/snaps, MOD__ALT);
412 sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_3DBOX,
413 _("Change perspective (angle of PLs)"));
414 ret = true;
415 break;
417 case GDK_bracketleft:
418 persp3d_rotate_VP (inkscape_active_document()->current_persp3d, Proj::X, 180/snaps, MOD__ALT);
419 sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_3DBOX,
420 _("Change perspective (angle of PLs)"));
421 ret = true;
422 break;
424 case GDK_parenright:
425 persp3d_rotate_VP (inkscape_active_document()->current_persp3d, Proj::Y, -180/snaps, MOD__ALT);
426 sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_3DBOX,
427 _("Change perspective (angle of PLs)"));
428 ret = true;
429 break;
431 case GDK_parenleft:
432 persp3d_rotate_VP (inkscape_active_document()->current_persp3d, Proj::Y, 180/snaps, MOD__ALT);
433 sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_3DBOX,
434 _("Change perspective (angle of PLs)"));
435 ret = true;
436 break;
438 case GDK_braceright:
439 persp3d_rotate_VP (inkscape_active_document()->current_persp3d, Proj::Z, -180/snaps, MOD__ALT);
440 sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_3DBOX,
441 _("Change perspective (angle of PLs)"));
442 ret = true;
443 break;
445 case GDK_braceleft:
446 persp3d_rotate_VP (inkscape_active_document()->current_persp3d, Proj::Z, 180/snaps, MOD__ALT);
447 sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_3DBOX,
448 _("Change perspective (angle of PLs)"));
449 ret = true;
450 break;
452 /* TODO: what is this???
453 case GDK_O:
454 if (MOD__CTRL && MOD__SHIFT) {
455 Box3D::create_canvas_point(persp3d_get_VP(inkscape_active_document()->current_persp3d, Proj::W).affine(),
456 6, 0xff00ff00);
457 }
458 ret = true;
459 break;
460 */
462 case GDK_g:
463 case GDK_G:
464 if (MOD__SHIFT_ONLY) {
465 sp_selection_to_guides(desktop);
466 ret = true;
467 }
468 break;
470 case GDK_x:
471 case GDK_X:
472 if (MOD__ALT_ONLY) {
473 desktop->setToolboxFocusTo ("altx-box3d");
474 ret = TRUE;
475 }
476 if (MOD__SHIFT_ONLY) {
477 persp3d_toggle_VPs(selection->perspList(), Proj::X);
478 bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
479 ret = true;
480 }
481 break;
483 case GDK_y:
484 case GDK_Y:
485 if (MOD__SHIFT_ONLY) {
486 persp3d_toggle_VPs(selection->perspList(), Proj::Y);
487 bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
488 ret = true;
489 }
490 break;
492 case GDK_z:
493 case GDK_Z:
494 if (MOD__SHIFT_ONLY) {
495 persp3d_toggle_VPs(selection->perspList(), Proj::Z);
496 bc->_vpdrag->updateLines(); // FIXME: Shouldn't this be done automatically?
497 ret = true;
498 }
499 break;
501 case GDK_Escape:
502 sp_desktop_selection(desktop)->clear();
503 //TODO: make dragging escapable by Esc
504 break;
506 case GDK_space:
507 if (dragging) {
508 sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
509 event->button.time);
510 dragging = false;
511 sp_event_context_snap_window_closed(event_context);
512 if (!event_context->within_tolerance) {
513 // we've been dragging, finish the box
514 sp_box3d_finish(bc);
515 }
516 // do not return true, so that space would work switching to selector
517 }
518 break;
520 default:
521 break;
522 }
523 break;
524 default:
525 break;
526 }
528 if (!ret) {
529 if (((SPEventContextClass *) parent_class)->root_handler) {
530 ret = ((SPEventContextClass *) parent_class)->root_handler(event_context, event);
531 }
532 }
534 return ret;
535 }
537 static void sp_box3d_drag(Box3DContext &bc, guint /*state*/)
538 {
539 SPDesktop *desktop = SP_EVENT_CONTEXT(&bc)->desktop;
541 if (!bc.item) {
543 if (Inkscape::have_viable_layer(desktop, bc._message_context) == false) {
544 return;
545 }
547 /* Create object */
548 Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_EVENT_CONTEXT_DOCUMENT(&bc));
549 Inkscape::XML::Node *repr = xml_doc->createElement("svg:g");
550 repr->setAttribute("sodipodi:type", "inkscape:box3d");
552 /* Set style */
553 sp_desktop_apply_style_tool (desktop, repr, "/tools/shapes/3dbox", false);
555 bc.item = (SPItem *) desktop->currentLayer()->appendChildRepr(repr);
556 Inkscape::GC::release(repr);
557 Inkscape::XML::Node *repr_side;
558 // TODO: Incorporate this in box3d-side.cpp!
559 for (int i = 0; i < 6; ++i) {
560 repr_side = xml_doc->createElement("svg:path");
561 repr_side->setAttribute("sodipodi:type", "inkscape:box3dside");
562 repr->addChild(repr_side, NULL);
564 Box3DSide *side = SP_BOX3D_SIDE(inkscape_active_document()->getObjectByRepr (repr_side));
566 guint desc = Box3D::int_to_face(i);
568 Box3D::Axis plane = (Box3D::Axis) (desc & 0x7);
569 plane = (Box3D::is_plane(plane) ? plane : Box3D::orth_plane_or_axis(plane));
570 side->dir1 = Box3D::extract_first_axis_direction(plane);
571 side->dir2 = Box3D::extract_second_axis_direction(plane);
572 side->front_or_rear = (Box3D::FrontOrRear) (desc & 0x8);
574 /* Set style */
575 box3d_side_apply_style(side);
577 SP_OBJECT(side)->updateRepr(); // calls box3d_side_write() and updates, e.g., the axes string description
578 }
580 box3d_set_z_orders(SP_BOX3D(bc.item));
581 bc.item->updateRepr();
583 // TODO: It would be nice to show the VPs during dragging, but since there is no selection
584 // at this point (only after finishing the box), we must do this "manually"
585 /**** bc._vpdrag->updateDraggers(); ****/
587 sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
588 }
590 g_assert(bc.item);
592 SPBox3D *box = SP_BOX3D(bc.item);
594 box->orig_corner0 = bc.drag_origin_proj;
595 box->orig_corner7 = bc.drag_ptC_proj;
597 box3d_check_for_swapped_coords(box);
599 /* we need to call this from here (instead of from box3d_position_set(), for example)
600 because z-order setting must not interfere with display updates during undo/redo */
601 box3d_set_z_orders (box);
603 box3d_position_set(box);
605 // status text
606 bc._message_context->setF(Inkscape::NORMAL_MESSAGE, _("<b>3D Box</b>; with <b>Shift</b> to extrude along the Z axis"));
607 }
609 static void sp_box3d_finish(Box3DContext *bc)
610 {
611 bc->_message_context->clear();
612 g_assert (SP_ACTIVE_DOCUMENT->current_persp3d);
614 if ( bc->item != NULL ) {
615 SPDesktop * desktop = SP_EVENT_CONTEXT_DESKTOP(bc);
617 SPBox3D *box = SP_BOX3D(bc->item);
619 box->orig_corner0 = bc->drag_origin_proj;
620 box->orig_corner7 = bc->drag_ptC_proj;
622 box->updateRepr();
624 box3d_relabel_corners(box);
626 sp_canvas_end_forced_full_redraws(desktop->canvas);
628 sp_desktop_selection(desktop)->set(bc->item);
629 sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_3DBOX,
630 _("Create 3D box"));
632 bc->item = NULL;
633 }
635 bc->ctrl_dragged = false;
636 bc->extruded = false;
637 }
639 void sp_box3d_context_update_lines(SPEventContext *ec) {
640 /* update perspective lines if we are in the 3D box tool (so that infinite ones are shown correctly) */
641 if (SP_IS_BOX3D_CONTEXT (ec)) {
642 Box3DContext *bc = SP_BOX3D_CONTEXT (ec);
643 bc->_vpdrag->updateLines();
644 }
645 }
647 /*
648 Local Variables:
649 mode:c++
650 c-file-style:"stroustrup"
651 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
652 indent-tabs-mode:nil
653 fill-column:99
654 End:
655 */
656 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :