Code

Draw perspective lines; provide shortcuts to toggle their visibility and the corners...
[inkscape.git] / src / box3d-context.cpp
1 #define __SP_3DBOX_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 "desktop-handles.h"
28 #include "snap.h"
29 #include "display/curve.h"
30 #include "desktop.h"
31 #include "message-context.h"
32 #include "pixmaps/cursor-rect.xpm"
33 #include "box3d.h"
34 #include "box3d-context.h"
35 #include "sp-metrics.h"
36 #include <glibmm/i18n.h>
37 #include "object-edit.h"
38 #include "xml/repr.h"
39 #include "xml/node-event-vector.h"
40 #include "prefs-utils.h"
41 #include "context-fns.h"
43 static void sp_3dbox_context_class_init(SP3DBoxContextClass *klass);
44 static void sp_3dbox_context_init(SP3DBoxContext *box3d_context);
45 static void sp_3dbox_context_dispose(GObject *object);
47 static void sp_3dbox_context_setup(SPEventContext *ec);
48 static void sp_3dbox_context_set(SPEventContext *ec, gchar const *key, gchar const *val);
50 static gint sp_3dbox_context_root_handler(SPEventContext *event_context, GdkEvent *event);
51 static gint sp_3dbox_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEvent *event);
53 static void sp_3dbox_drag(SP3DBoxContext &bc, guint state);
54 static void sp_3dbox_finish(SP3DBoxContext *bc);
56 static SPEventContextClass *parent_class;
59 GtkType sp_3dbox_context_get_type()
60 {
61     static GType type = 0;
62     if (!type) {
63         GTypeInfo info = {
64             sizeof(SP3DBoxContextClass),
65             NULL, NULL,
66             (GClassInitFunc) sp_3dbox_context_class_init,
67             NULL, NULL,
68             sizeof(SP3DBoxContext),
69             4,
70             (GInstanceInitFunc) sp_3dbox_context_init,
71             NULL,    /* value_table */
72         };
73         type = g_type_register_static(SP_TYPE_EVENT_CONTEXT, "SP3DBoxContext", &info, (GTypeFlags) 0);
74     }
75     return type;
76 }
78 static void sp_3dbox_context_class_init(SP3DBoxContextClass *klass)
79 {
80     GObjectClass *object_class = (GObjectClass *) klass;
81     SPEventContextClass *event_context_class = (SPEventContextClass *) klass;
83     parent_class = (SPEventContextClass *) g_type_class_peek_parent(klass);
85     object_class->dispose = sp_3dbox_context_dispose;
87     event_context_class->setup = sp_3dbox_context_setup;
88     event_context_class->set = sp_3dbox_context_set;
89     event_context_class->root_handler  = sp_3dbox_context_root_handler;
90     event_context_class->item_handler  = sp_3dbox_context_item_handler;
91 }
93 guint SP3DBoxContext::number_of_handles = 3;
95 static void sp_3dbox_context_init(SP3DBoxContext *box3d_context)
96 {
97     SPEventContext *event_context = SP_EVENT_CONTEXT(box3d_context);
99     event_context->cursor_shape = cursor_rect_xpm;
100     event_context->hot_x = 4;
101     event_context->hot_y = 4;
102     event_context->xp = 0;
103     event_context->yp = 0;
104     event_context->tolerance = 0;
105     event_context->within_tolerance = false;
106     event_context->item_to_select = NULL;
108     event_context->shape_repr = NULL;
109     event_context->shape_knot_holder = NULL;
111     box3d_context->item = NULL;
113     box3d_context->ctrl_dragged = false;
114     box3d_context->extruded = false;
115     
116     box3d_context->_vpdrag = NULL;
118     new (&box3d_context->sel_changed_connection) sigc::connection();
121 static void sp_3dbox_context_dispose(GObject *object)
123     SP3DBoxContext *bc = SP_3DBOX_CONTEXT(object);
124     SPEventContext *ec = SP_EVENT_CONTEXT(object);
126     ec->enableGrDrag(false);
128     delete (bc->_vpdrag);
129     bc->_vpdrag = NULL;
131     bc->sel_changed_connection.disconnect();
132     bc->sel_changed_connection.~connection();
134     /* fixme: This is necessary because we do not grab */
135     if (bc->item) {
136         sp_3dbox_finish(bc);
137     }
139     if (ec->shape_knot_holder) {
140         sp_knot_holder_destroy(ec->shape_knot_holder);
141         ec->shape_knot_holder = NULL;
142     }
144     if (ec->shape_repr) { // remove old listener
145         sp_repr_remove_listener_by_data(ec->shape_repr, ec);
146         Inkscape::GC::release(ec->shape_repr);
147         ec->shape_repr = 0;
148     }
150     if (bc->_message_context) {
151         delete bc->_message_context;
152     }
154     G_OBJECT_CLASS(parent_class)->dispose(object);
157 static Inkscape::XML::NodeEventVector ec_shape_repr_events = {
158     NULL, /* child_added */
159     NULL, /* child_removed */
160     ec_shape_event_attr_changed,
161     NULL, /* content_changed */
162     NULL  /* order_changed */
163 };
165 /**
166 \brief  Callback that processes the "changed" signal on the selection;
167 destroys old and creates new knotholder
168 */
169 void sp_3dbox_context_selection_changed(Inkscape::Selection *selection, gpointer data)
171     SP3DBoxContext *bc = SP_3DBOX_CONTEXT(data);
172     SPEventContext *ec = SP_EVENT_CONTEXT(bc);
174     if (ec->shape_knot_holder) { // destroy knotholder
175         sp_knot_holder_destroy(ec->shape_knot_holder);
176         ec->shape_knot_holder = NULL;
177     }
179     if (ec->shape_repr) { // remove old listener
180         sp_repr_remove_listener_by_data(ec->shape_repr, ec);
181         Inkscape::GC::release(ec->shape_repr);
182         ec->shape_repr = 0;
183     }
185     SPItem *item = selection->singleItem();
186     if (item) {
187         ec->shape_knot_holder = sp_item_knot_holder(item, ec->desktop);
188         Inkscape::XML::Node *shape_repr = SP_OBJECT_REPR(item);
189         if (shape_repr) {
190             ec->shape_repr = shape_repr;
191             Inkscape::GC::anchor(shape_repr);
192             sp_repr_add_listener(shape_repr, &ec_shape_repr_events, ec);
193         }
194     }
197 static void sp_3dbox_context_setup(SPEventContext *ec)
199     SP3DBoxContext *bc = SP_3DBOX_CONTEXT(ec);
201     if (((SPEventContextClass *) parent_class)->setup) {
202         ((SPEventContextClass *) parent_class)->setup(ec);
203     }
205     SPItem *item = sp_desktop_selection(ec->desktop)->singleItem();
206     if (item) {
207         ec->shape_knot_holder = sp_item_knot_holder(item, ec->desktop);
208         Inkscape::XML::Node *shape_repr = SP_OBJECT_REPR(item);
209         if (shape_repr) {
210             ec->shape_repr = shape_repr;
211             Inkscape::GC::anchor(shape_repr);
212             sp_repr_add_listener(shape_repr, &ec_shape_repr_events, ec);
213         }
214     }
216     bc->sel_changed_connection.disconnect();
217     bc->sel_changed_connection = sp_desktop_selection(ec->desktop)->connectChanged(
218         sigc::bind(sigc::ptr_fun(&sp_3dbox_context_selection_changed), (gpointer)bc)
219     );
221     bc->_vpdrag = new Box3D::VPDrag(ec->desktop);
223     if (prefs_get_int_attribute("tools.shapes", "selcue", 0) != 0) {
224         ec->enableSelectionCue();
225     }
227     if (prefs_get_int_attribute("tools.shapes", "gradientdrag", 0) != 0) {
228         ec->enableGrDrag();
229     }
231     bc->_message_context = new Inkscape::MessageContext((ec->desktop)->messageStack());
234 static void sp_3dbox_context_set(SPEventContext *ec, gchar const *key, gchar const *val)
236     //SP3DBoxContext *bc = SP_3DBOX_CONTEXT(ec);
238     /* fixme: Proper error handling for non-numeric data.  Use a locale-independent function like
239      * g_ascii_strtod (or a thin wrapper that does the right thing for invalid values inf/nan). */
240     /**
241     if ( strcmp(key, "rx") == 0 ) {
242         bc->rx = ( val
243                          ? g_ascii_strtod (val, NULL)
244                          : 0.0 );
245     } else if ( strcmp(key, "ry") == 0 ) {
246         bc->ry = ( val
247                          ? g_ascii_strtod (val, NULL)
248                          : 0.0 );
249     }
250     **/
253 static gint sp_3dbox_context_item_handler(SPEventContext *event_context, SPItem *item, GdkEvent *event)
255     SPDesktop *desktop = event_context->desktop;
257     gint ret = FALSE;
259     switch (event->type) {
260     case GDK_BUTTON_PRESS:
261         if ( event->button.button == 1 && !event_context->space_panning) {
262             Inkscape::setup_for_drag_start(desktop, event_context, event);
263             ret = TRUE;
264         }
265         break;
266         // motion and release are always on root (why?)
267     default:
268         break;
269     }
271     if (((SPEventContextClass *) parent_class)->item_handler) {
272         ret = ((SPEventContextClass *) parent_class)->item_handler(event_context, item, event);
273     }
275     return ret;
278 static gint sp_3dbox_context_root_handler(SPEventContext *event_context, GdkEvent *event)
280     static bool dragging;
282     SPDesktop *desktop = event_context->desktop;
283     Inkscape::Selection *selection = sp_desktop_selection (desktop);
285     SP3DBoxContext *bc = SP_3DBOX_CONTEXT(event_context);
287     event_context->tolerance = prefs_get_int_attribute_limited("options.dragtolerance", "value", 0, 0, 100);
289     gint ret = FALSE;
290     switch (event->type) {
291     case GDK_BUTTON_PRESS:
292         if ( event->button.button == 1  && !event_context->space_panning) {
293             NR::Point const button_w(event->button.x,
294                                      event->button.y);
296             // save drag origin
297             event_context->xp = (gint) button_w[NR::X];
298             event_context->yp = (gint) button_w[NR::Y];
299             event_context->within_tolerance = true;
300             
301             // remember clicked item, disregarding groups, honoring Alt
302             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);
304             dragging = true;
305             
306             /* Position center */
307             NR::Point const button_dt(desktop->w2d(button_w));
308             bc->drag_origin = button_dt;
309             bc->drag_ptB = button_dt;
310             bc->drag_ptC = button_dt;
312             /* Snap center */
313             SnapManager const &m = desktop->namedview->snap_manager;
314             bc->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE | Inkscape::Snapper::SNAPPOINT_BBOX,
315                                     button_dt, bc->item).getPoint();
317             sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate),
318                                 ( GDK_KEY_PRESS_MASK |
319                                   GDK_BUTTON_RELEASE_MASK       |
320                                   GDK_POINTER_MOTION_MASK       |
321                                   GDK_BUTTON_PRESS_MASK ),
322                                 NULL, event->button.time);
323             ret = TRUE;
324         }
325         break;
326     case GDK_MOTION_NOTIFY:
327         if ( dragging
328              && ( event->motion.state & GDK_BUTTON1_MASK )  && !event_context->space_panning)
329         {
330             if ( event_context->within_tolerance
331                  && ( abs( (gint) event->motion.x - event_context->xp ) < event_context->tolerance )
332                  && ( abs( (gint) event->motion.y - event_context->yp ) < event_context->tolerance ) ) {
333                 break; // do not drag if we're within tolerance from origin
334             }
335             // Once the user has moved farther than tolerance from the original location
336             // (indicating they intend to draw, not click), then always process the
337             // motion notify coordinates as given (no snapping back to origin)
338             event_context->within_tolerance = false;
340             NR::Point const motion_w(event->motion.x,
341                                      event->motion.y);
342             NR::Point motion_dt(desktop->w2d(motion_w));
344             SnapManager const &m = desktop->namedview->snap_manager;
345             motion_dt = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, motion_dt, bc->item).getPoint();
347             bc->ctrl_dragged  = event->motion.state & GDK_CONTROL_MASK;
349             if (event->motion.state & GDK_SHIFT_MASK && !bc->extruded) {
350                 /* once shift is pressed, set bc->extruded (no need to create further faces;
351                    all of them are already created in sp_3dbox_init) */
352                 bc->extruded = true;
353             }
355             if (!bc->extruded) {
356                 bc->drag_ptB = motion_dt;
357                 bc->drag_ptC = motion_dt;
358             } else {
359                 // Without Ctrl, motion of the extruded corner is constrained to the
360                 // perspective line from drag_ptB to vanishing point Y.
361                 if (!bc->ctrl_dragged) {
362                         bc->drag_ptC = Box3D::perspective_line_snap (bc->drag_ptB, Box3D::Z, motion_dt, Box3D::Perspective3D::current_perspective);
363                 } else {
364                     bc->drag_ptC = motion_dt;
365                 }
366                 bc->drag_ptC = m.freeSnap(Inkscape::Snapper::SNAPPOINT_BBOX | Inkscape::Snapper::SNAPPOINT_NODE, bc->drag_ptC, bc->item).getPoint();
367                 if (bc->ctrl_dragged) {
368                         Box3D::PerspectiveLine pl1 (NR::Point (event_context->xp, event_context->yp), Box3D::Y, Box3D::Perspective3D::current_perspective);
369                         Box3D::PerspectiveLine pl2 (bc->drag_ptB, Box3D::X, Box3D::Perspective3D::current_perspective);
370                         NR::Point corner1 = pl1.meet(pl2);
371                         
372                         Box3D::PerspectiveLine pl3 (corner1, Box3D::X, Box3D::Perspective3D::current_perspective);
373                         Box3D::PerspectiveLine pl4 (bc->drag_ptC, Box3D::Z, Box3D::Perspective3D::current_perspective);
374                         bc->drag_ptB = pl3.meet(pl4);
375                 }
376             }
377             
378             
379             sp_3dbox_drag(*bc, event->motion.state);
380             
381             ret = TRUE;
382         }
383         break;
384     case GDK_BUTTON_RELEASE:
385         event_context->xp = event_context->yp = 0;
386         if ( event->button.button == 1  && !event_context->space_panning) {
387             dragging = false;
389             if (!event_context->within_tolerance) {
390                 // we've been dragging, finish the box
391                 sp_3dbox_finish(bc);
392             } else if (event_context->item_to_select) {
393                 // no dragging, select clicked item if any
394                 if (event->button.state & GDK_SHIFT_MASK) {
395                     selection->toggle(event_context->item_to_select);
396                 } else {
397                     selection->set(event_context->item_to_select);
398                 }
399             } else {
400                 // click in an empty space
401                 selection->clear();
402             }
404             event_context->item_to_select = NULL;
405             ret = TRUE;
406             sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
407                                   event->button.time);
408         }
409         break;
410     case GDK_KEY_PRESS:
411         switch (get_group0_keyval (&event->key)) {
412         case GDK_Alt_L:
413         case GDK_Alt_R:
414         case GDK_Control_L:
415         case GDK_Control_R:
416         case GDK_Shift_L:
417         case GDK_Shift_R:
418         case GDK_Meta_L:  // Meta is when you press Shift+Alt (at least on my machine)
419         case GDK_Meta_R:
420             /***
421             if (!dragging){
422                 sp_event_show_modifier_tip (event_context->defaultMessageContext(), event,
423                                             _("<b>Ctrl</b>: make square or integer-ratio rect, lock a rounded corner circular"),
424                                             _("<b>Shift</b>: draw around the starting point"),
425                                             NULL);
426             }
427             ***/
428             break;
429         case GDK_Up:
430         case GDK_Down:
431         case GDK_KP_Up:
432         case GDK_KP_Down:
433             // prevent the zoom field from activation
434             if (!MOD__CTRL_ONLY)
435                 ret = TRUE;
436             break;
438         case GDK_I:
439             Box3D::Perspective3D::print_debugging_info();
440             ret = true;
441             break;
443         case GDK_L:
444         case GDK_l:
445             bc->_vpdrag->show_lines = !bc->_vpdrag->show_lines;
446             bc->_vpdrag->updateLines();
447             ret = true;
448             break;
450         case GDK_A:
451         case GDK_a:
452             if (MOD__CTRL) break; // Don't catch Ctrl+A ("select all")
453             if (bc->_vpdrag->show_lines) {
454                 bc->_vpdrag->front_or_rear_lines = bc->_vpdrag->front_or_rear_lines ^ 0x2; // toggle rear PLs
455             }
456             bc->_vpdrag->updateLines();
457             ret = true;
458             break;
460         case GDK_x:
461         case GDK_X:
462         {
463             if (MOD__CTRL) break; // Don't catch Ctrl+X ('cut') and Ctrl+Shift+X ('open XML editor')
464             // FIXME: Shouldn't we access _vpdrag->selection instead?
465             Inkscape::Selection *selection = sp_desktop_selection (bc->_vpdrag->desktop);
466             for (GSList const *i = selection->itemList(); i != NULL; i = i->next) {
467                 if (!SP_IS_3DBOX (i->data)) continue;
468                 sp_3dbox_switch_front_face (SP_3DBOX (i->data), Box3D::X);
469              }
470             bc->_vpdrag->updateLines();
471             ret = true;
472             break;
473         }
474  
475         case GDK_y:
476         case GDK_Y:
477         {
478             if (MOD__CTRL) break; // Don't catch Ctrl+Y ("redo")
479             // FIXME: Shouldn't we access _vpdrag->selection instead?
480             Inkscape::Selection *selection = sp_desktop_selection (bc->_vpdrag->desktop);
481             for (GSList const *i = selection->itemList(); i != NULL; i = i->next) {
482                 if (!SP_IS_3DBOX (i->data)) continue;
483                 sp_3dbox_switch_front_face (SP_3DBOX (i->data), Box3D::Y);
484             }
485             bc->_vpdrag->updateLines();
486             ret = true;
487             break;
488         }
490         case GDK_z:
491         case GDK_Z:
492         {
493             if (MOD__CTRL) break; // Don't catch Ctrl+Z ("undo")
494             // FIXME: Shouldn't we access _vpdrag->selection instead?
495             Inkscape::Selection *selection = sp_desktop_selection (bc->_vpdrag->desktop);
496             for (GSList const *i = selection->itemList(); i != NULL; i = i->next) {
497                 if (!SP_IS_3DBOX (i->data)) continue;
498                 sp_3dbox_switch_front_face (SP_3DBOX (i->data), Box3D::Z);
499             }
500             bc->_vpdrag->updateLines();
501             ret = true;
502             break;
503         }
505         case GDK_Escape:
506             sp_desktop_selection(desktop)->clear();
507             //TODO: make dragging escapable by Esc
508             break;
510         case GDK_space:
511             if (dragging) {
512                 sp_canvas_item_ungrab(SP_CANVAS_ITEM(desktop->acetate),
513                                       event->button.time);
514                 dragging = false;
515                 if (!event_context->within_tolerance) {
516                     // we've been dragging, finish the box
517                     sp_3dbox_finish(bc);
518                 }
519                 // do not return true, so that space would work switching to selector
520             }
521             break;
523         default:
524             break;
525         }
526         break;
527     case GDK_KEY_RELEASE:
528         switch (get_group0_keyval (&event->key)) {
529         case GDK_Alt_L:
530         case GDK_Alt_R:
531         case GDK_Control_L:
532         case GDK_Control_R:
533         case GDK_Shift_L:
534         case GDK_Shift_R:
535         case GDK_Meta_L:  // Meta is when you press Shift+Alt
536         case GDK_Meta_R:
537             event_context->defaultMessageContext()->clear();
538             break;
539         default:
540             break;
541         }
542         break;
543     default:
544         break;
545     }
547     if (!ret) {
548         if (((SPEventContextClass *) parent_class)->root_handler) {
549             ret = ((SPEventContextClass *) parent_class)->root_handler(event_context, event);
550         }
551     }
553     return ret;
556 static void sp_3dbox_drag(SP3DBoxContext &bc, guint state)
558     SPDesktop *desktop = SP_EVENT_CONTEXT(&bc)->desktop;
560     if (!bc.item) {
562         if (Inkscape::have_viable_layer(desktop, bc._message_context) == false) {
563             return;
564         }
566         /* Create object */
567         Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_EVENT_CONTEXT_DOCUMENT(&bc));
568         Inkscape::XML::Node *repr = xml_doc->createElement("svg:g");
569         repr->setAttribute("sodipodi:type", "inkscape:3dbox");
571         /* Set style */
572         sp_desktop_apply_style_tool (desktop, repr, "tools.shapes.3dbox", false);
574         bc.item = (SPItem *) desktop->currentLayer()->appendChildRepr(repr);
575         Inkscape::GC::release(repr);
576         bc.item->transform = SP_ITEM(desktop->currentRoot())->getRelativeTransform(desktop->currentLayer());
578         /* Hook paths to the faces of the box */
579         for (int i = 0; i < 6; ++i) {
580             SP_3DBOX(bc.item)->faces[i]->hook_path_to_3dbox();
581         }
583         bc.item->updateRepr();
584         // TODO: It would be nice to show the VPs during dragging, but since there is no selection
585         //       at this point (only after finishing the box), we must do this "manually"
586         bc._vpdrag->updateDraggers();
588         sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
589     }
591     // FIXME: remove these extra points
592     NR::Point pt = bc.drag_ptB;
593     NR::Point shift_pt = bc.drag_ptC;
595     NR::Rect r;
596     if (!(state & GDK_SHIFT_MASK)) {
597         r = Inkscape::snap_rectangular_box(desktop, bc.item, pt, bc.center, state);
598     } else {
599         r = Inkscape::snap_rectangular_box(desktop, bc.item, shift_pt, bc.center, state);
600     }
602     SPEventContext *ec = SP_EVENT_CONTEXT(&bc);
603     NR::Point origin_w(ec->xp, ec->yp);
604     NR::Point origin(desktop->w2d(origin_w));
605     sp_3dbox_position_set(bc);
607     // status text
608     //GString *Ax = SP_PX_TO_METRIC_STRING(origin[NR::X], desktop->namedview->getDefaultMetric());
609     //GString *Ay = SP_PX_TO_METRIC_STRING(origin[NR::Y], desktop->namedview->getDefaultMetric());
610     bc._message_context->setF(Inkscape::NORMAL_MESSAGE, _("<b>3D Box</b>; with <b>Shift</b> to extrude along the Z axis"));
611     //g_string_free(Ax, FALSE);
612     //g_string_free(Ay, FALSE);
615 static void sp_3dbox_finish(SP3DBoxContext *bc)
617     bc->_message_context->clear();
619     if ( bc->item != NULL ) {
620         SPDesktop * desktop;
622         desktop = SP_EVENT_CONTEXT_DESKTOP(bc);
624         SP_OBJECT(bc->item)->updateRepr();
625         sp_3dbox_set_ratios(SP_3DBOX(bc->item));
627         sp_canvas_end_forced_full_redraws(desktop->canvas);
629         sp_desktop_selection(desktop)->set(bc->item);
630         sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_3DBOX,
631                          _("Create 3D box"));
633         bc->item = NULL;
634     }
636     bc->ctrl_dragged = false;
637     bc->extruded = false;
640 /*
641   Local Variables:
642   mode:c++
643   c-file-style:"stroustrup"
644   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
645   indent-tabs-mode:nil
646   fill-column:99
647   End:
648 */
649 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :