1 /** @file
2 * @brief Event handlers for SPDesktop
3 */
4 /* Author:
5 * Lauris Kaplinski <lauris@kaplinski.com>
6 * Abhishek Sharma
7 *
8 * Copyright (C) 1999-2002 Lauris Kaplinski
9 * Copyright (C) 1999-2010 Others
10 *
11 * Released under GNU GPL, read the file 'COPYING' for more information
12 */
14 #ifdef HAVE_CONFIG_H
15 # include <config.h>
16 #endif
17 #include <map>
18 #include <string>
19 #include <2geom/line.h>
20 #include <glibmm/i18n.h>
22 #include "desktop.h"
23 #include "desktop-handles.h"
24 #include "dialogs/dialog-events.h"
25 #include "display/canvas-axonomgrid.h"
26 #include "display/canvas-grid.h"
27 #include "display/guideline.h"
28 #include "display/snap-indicator.h"
29 #include "document.h"
30 #include "event-context.h"
31 #include "helper/action.h"
32 #include "helper/unit-menu.h"
33 #include "helper/units.h"
34 #include "message-context.h"
35 #include "preferences.h"
36 #include "snap.h"
37 #include "sp-guide.h"
38 #include "sp-metrics.h"
39 #include "sp-namedview.h"
40 #include "tools-switch.h"
41 #include "ui/dialog/guides.h"
42 #include "widgets/desktop-widget.h"
43 #include "xml/repr.h"
45 using Inkscape::DocumentUndo;
47 static void snoop_extended(GdkEvent* event, SPDesktop *desktop);
48 static void init_extended();
50 /* Root item handler */
52 int sp_desktop_root_handler(SPCanvasItem */*item*/, GdkEvent *event, SPDesktop *desktop)
53 {
54 static bool watch = false;
55 static bool first = true;
57 if ( first ) {
58 Inkscape::Preferences *prefs = Inkscape::Preferences::get();
59 if ( prefs->getBool("/options/useextinput/value", true)
60 && prefs->getBool("/options/switchonextinput/value") ) {
61 watch = true;
62 init_extended();
63 }
64 first = false;
65 }
66 if ( watch ) {
67 snoop_extended(event, desktop);
68 }
70 return sp_event_context_root_handler(desktop->event_context, event);
71 }
73 static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidget *dtw, bool horiz)
74 {
75 static bool dragging = false;
76 static SPCanvasItem *guide = NULL;
77 static Geom::Point normal;
78 int wx, wy;
80 SPDesktop *desktop = dtw->desktop;
82 gdk_window_get_pointer(GTK_WIDGET(dtw->canvas)->window, &wx, &wy, NULL);
83 Geom::Point const event_win(wx, wy);
85 gint width, height;
86 gdk_window_get_geometry(GTK_WIDGET(dtw->canvas)->window, NULL /*x*/, NULL /*y*/, &width, &height, NULL/*depth*/);
88 switch (event->type) {
89 case GDK_BUTTON_PRESS:
90 if (event->button.button == 1) {
91 dragging = true;
93 Geom::Point const event_w(sp_canvas_window_to_world(dtw->canvas, event_win));
94 Geom::Point const event_dt(desktop->w2d(event_w));
96 // explicitly show guidelines; if I draw a guide, I want them on
97 desktop->namedview->setGuides(true);
99 // calculate the normal of the guidelines when dragged from the edges of rulers.
100 Geom::Point normal_bl_to_tr(-1.,1.); //bottomleft to topright
101 Geom::Point normal_tr_to_bl(1.,1.); //topright to bottomleft
102 normal_bl_to_tr.normalize();
103 normal_tr_to_bl.normalize();
104 Inkscape::CanvasGrid * grid = sp_namedview_get_first_enabled_grid(desktop->namedview);
105 if ( grid && grid->getGridType() == Inkscape::GRID_AXONOMETRIC ) {
106 Inkscape::CanvasAxonomGrid *axonomgrid = dynamic_cast<Inkscape::CanvasAxonomGrid *>(grid);
107 if (event->button.state & GDK_CONTROL_MASK) {
108 // guidelines normal to gridlines
109 normal_bl_to_tr = Geom::Point::polar(-axonomgrid->angle_rad[0], 1.0);
110 normal_tr_to_bl = Geom::Point::polar(axonomgrid->angle_rad[2], 1.0);
111 } else {
112 normal_bl_to_tr = rot90(Geom::Point::polar(axonomgrid->angle_rad[2], 1.0));
113 normal_tr_to_bl = rot90(Geom::Point::polar(-axonomgrid->angle_rad[0], 1.0));
114 }
115 }
116 if (horiz) {
117 if (wx < 50) {
118 normal = normal_bl_to_tr;
119 } else if (wx > width - 50) {
120 normal = normal_tr_to_bl;
121 } else {
122 normal = Geom::Point(0.,1.);
123 }
124 } else {
125 if (wy < 50) {
126 normal = normal_bl_to_tr;
127 } else if (wy > height - 50) {
128 normal = normal_tr_to_bl;
129 } else {
130 normal = Geom::Point(1.,0.);
131 }
132 }
134 guide = sp_guideline_new(desktop->guides, event_dt, normal);
135 sp_guideline_set_color(SP_GUIDELINE(guide), desktop->namedview->guidehicolor);
136 gdk_pointer_grab(widget->window, FALSE,
137 (GdkEventMask)(GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK ),
138 NULL, NULL,
139 event->button.time);
140 }
141 break;
142 case GDK_MOTION_NOTIFY:
143 if (dragging) {
144 Geom::Point const event_w(sp_canvas_window_to_world(dtw->canvas, event_win));
145 Geom::Point event_dt(desktop->w2d(event_w));
147 if (!(event->motion.state & GDK_SHIFT_MASK)) {
148 SnapManager &m = desktop->namedview->snap_manager;
149 m.setup(desktop);
150 // We only have a temporary guide which is not stored in our document yet.
151 // Because the guide snapper only looks in the document for guides to snap to,
152 // we don't have to worry about a guide snapping to itself here
153 m.guideFreeSnap(event_dt, normal, SP_DRAG_MOVE_ORIGIN);
154 m.unSetup();
155 }
157 sp_guideline_set_position(SP_GUIDELINE(guide), from_2geom(event_dt));
158 desktop->set_coordinate_status(to_2geom(event_dt));
159 desktop->setPosition(to_2geom(event_dt));
160 }
161 break;
162 case GDK_BUTTON_RELEASE:
163 if (dragging && event->button.button == 1) {
164 sp_event_context_discard_delayed_snap_event(desktop->event_context);
166 gdk_pointer_ungrab(event->button.time);
167 Geom::Point const event_w(sp_canvas_window_to_world(dtw->canvas, event_win));
168 Geom::Point event_dt(desktop->w2d(event_w));
170 if (!(event->button.state & GDK_SHIFT_MASK)) {
171 SnapManager &m = desktop->namedview->snap_manager;
172 m.setup(desktop);
173 // We only have a temporary guide which is not stored in our document yet.
174 // Because the guide snapper only looks in the document for guides to snap to,
175 // we don't have to worry about a guide snapping to itself here
176 m.guideFreeSnap(event_dt, normal, SP_DRAG_MOVE_ORIGIN);
177 m.unSetup();
178 }
180 dragging = false;
182 gtk_object_destroy(GTK_OBJECT(guide));
183 guide = NULL;
184 if ((horiz ? wy : wx) >= 0) {
185 Inkscape::XML::Document *xml_doc = desktop->doc()->getReprDoc();
186 Inkscape::XML::Node *repr = xml_doc->createElement("sodipodi:guide");
187 sp_repr_set_point(repr, "orientation", normal);
188 sp_repr_set_point(repr, "position", from_2geom(event_dt));
189 desktop->namedview->appendChild(repr);
190 Inkscape::GC::release(repr);
191 DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_NONE,
192 _("Create guide"));
193 }
194 desktop->set_coordinate_status(from_2geom(event_dt));
195 }
196 default:
197 break;
198 }
200 return FALSE;
201 }
203 int sp_dt_hruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidget *dtw)
204 {
205 if (event->type == GDK_MOTION_NOTIFY) {
206 sp_event_context_snap_delay_handler(dtw->desktop->event_context, (gpointer) widget, (gpointer) dtw, (GdkEventMotion *)event, DelayedSnapEvent::GUIDE_HRULER);
207 }
208 return sp_dt_ruler_event(widget, event, dtw, true);
209 }
211 int sp_dt_vruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidget *dtw)
212 {
213 if (event->type == GDK_MOTION_NOTIFY) {
214 sp_event_context_snap_delay_handler(dtw->desktop->event_context, (gpointer) widget, (gpointer) dtw, (GdkEventMotion *)event, DelayedSnapEvent::GUIDE_VRULER);
215 }
216 return sp_dt_ruler_event(widget, event, dtw, false);
217 }
219 static Geom::Point drag_origin;
220 static SPGuideDragType drag_type = SP_DRAG_NONE;
221 //static bool reset_drag_origin = false; // when Ctrl is pressed while dragging, this is used to trigger resetting of the
222 // // drag origin to that location so that constrained movement is more intuitive
224 // Min distance from anchor to initiate rotation, measured in screenpixels
225 #define tol 40.0
227 gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data)
228 {
229 static bool moved = false;
230 gint ret = FALSE;
232 SPGuide *guide = SP_GUIDE(data);
233 SPDesktop *desktop = static_cast<SPDesktop*>(gtk_object_get_data(GTK_OBJECT(item->canvas), "SPDesktop"));
235 switch (event->type) {
236 case GDK_2BUTTON_PRESS:
237 if (event->button.button == 1) {
238 drag_type = SP_DRAG_NONE;
239 sp_event_context_discard_delayed_snap_event(desktop->event_context);
240 sp_canvas_item_ungrab(item, event->button.time);
241 Inkscape::UI::Dialogs::GuidelinePropertiesDialog::showDialog(guide, desktop);
242 ret = TRUE;
243 }
244 break;
245 case GDK_BUTTON_PRESS:
246 if (event->button.button == 1) {
247 Geom::Point const event_w(event->button.x, event->button.y);
248 Geom::Point const event_dt(desktop->w2d(event_w));
250 // Due to the tolerance allowed when grabbing a guide, event_dt will generally
251 // be close to the guide but not just exactly on it. The drag origin calculated
252 // here must be exactly on the guide line though, otherwise
253 // small errors will occur once we snap, see
254 // https://bugs.launchpad.net/inkscape/+bug/333762
255 drag_origin = Geom::projection(event_dt, Geom::Line(guide->point_on_line, guide->angle()));
257 if (event->button.state & GDK_SHIFT_MASK) {
258 // with shift we rotate the guide
259 drag_type = SP_DRAG_ROTATE;
260 } else {
261 if (event->button.state & GDK_CONTROL_MASK) {
262 drag_type = SP_DRAG_MOVE_ORIGIN;
263 } else {
264 drag_type = SP_DRAG_TRANSLATE;
265 }
266 }
268 if (drag_type == SP_DRAG_ROTATE || drag_type == SP_DRAG_TRANSLATE) {
269 sp_canvas_item_grab(item,
270 ( GDK_BUTTON_RELEASE_MASK |
271 GDK_BUTTON_PRESS_MASK |
272 GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK ),
273 NULL,
274 event->button.time);
275 }
276 ret = TRUE;
277 }
278 break;
279 case GDK_MOTION_NOTIFY:
280 if (drag_type != SP_DRAG_NONE) {
281 Geom::Point const motion_w(event->motion.x,
282 event->motion.y);
283 Geom::Point motion_dt(desktop->w2d(motion_w));
285 sp_event_context_snap_delay_handler(desktop->event_context, (gpointer) item, data, (GdkEventMotion *)event, DelayedSnapEvent::GUIDE_HANDLER);
287 // This is for snapping while dragging existing guidelines. New guidelines,
288 // which are dragged off the ruler, are being snapped in sp_dt_ruler_event
289 SnapManager &m = desktop->namedview->snap_manager;
290 m.setup(desktop, true, NULL, NULL, guide);
291 if (drag_type == SP_DRAG_MOVE_ORIGIN) {
292 // If we snap in guideConstrainedSnap() below, then motion_dt will
293 // be forced to be on the guide. If we don't snap however, then
294 // the origin should still be constrained to the guide. So let's do
295 // that explicitly first:
296 Geom::Line line(guide->point_on_line, guide->angle());
297 Geom::Coord t = line.nearestPoint(motion_dt);
298 motion_dt = line.pointAt(t);
299 if (!(event->motion.state & GDK_SHIFT_MASK)) {
300 m.guideConstrainedSnap(motion_dt, *guide);
301 }
302 } else if (!((drag_type == SP_DRAG_ROTATE) && (event->motion.state & GDK_CONTROL_MASK))) {
303 // cannot use shift here to disable snapping, because we already use it for rotating the guide
304 m.guideFreeSnap(motion_dt, guide->normal_to_line, drag_type);
305 }
306 m.unSetup();
308 switch (drag_type) {
309 case SP_DRAG_TRANSLATE:
310 {
311 sp_guide_moveto(*guide, motion_dt, false);
312 break;
313 }
314 case SP_DRAG_ROTATE:
315 {
316 Geom::Point pt = motion_dt - guide->point_on_line;
317 double angle = std::atan2(pt[Geom::Y], pt[Geom::X]);
318 if (event->motion.state & GDK_CONTROL_MASK) {
319 Inkscape::Preferences *prefs = Inkscape::Preferences::get();
320 unsigned const snaps = abs(prefs->getInt("/options/rotationsnapsperpi/value", 12));
321 if (snaps) {
322 double sections = floor(angle * snaps / M_PI + .5);
323 angle = (M_PI / snaps) * sections;
324 }
325 }
326 sp_guide_set_normal(*guide, Geom::Point(1,0) * Geom::Rotate(angle + M_PI_2), false);
327 break;
328 }
329 case SP_DRAG_MOVE_ORIGIN:
330 {
331 sp_guide_moveto(*guide, motion_dt, false);
332 break;
333 }
334 case SP_DRAG_NONE:
335 g_assert_not_reached();
336 break;
337 }
338 moved = true;
339 desktop->set_coordinate_status(from_2geom(motion_dt));
340 desktop->setPosition(from_2geom(motion_dt));
342 ret = TRUE;
343 }
344 break;
345 case GDK_BUTTON_RELEASE:
346 if (drag_type != SP_DRAG_NONE && event->button.button == 1) {
347 sp_event_context_discard_delayed_snap_event(desktop->event_context);
349 if (moved) {
350 Geom::Point const event_w(event->button.x,
351 event->button.y);
352 Geom::Point event_dt(desktop->w2d(event_w));
354 SnapManager &m = desktop->namedview->snap_manager;
355 m.setup(desktop, true, NULL, NULL, guide);
356 if (drag_type == SP_DRAG_MOVE_ORIGIN) {
357 // If we snap in guideConstrainedSnap() below, then motion_dt will
358 // be forced to be on the guide. If we don't snap however, then
359 // the origin should still be constrained to the guide. So let's
360 // do that explicitly first:
361 Geom::Line line(guide->point_on_line, guide->angle());
362 Geom::Coord t = line.nearestPoint(event_dt);
363 event_dt = line.pointAt(t);
364 if (!(event->button.state & GDK_SHIFT_MASK)) {
365 m.guideConstrainedSnap(event_dt, *guide);
366 }
367 } else if (!((drag_type == SP_DRAG_ROTATE) && (event->motion.state & GDK_CONTROL_MASK))) {
368 // cannot use shift here to disable snapping, because we already use it for rotating the guide
369 m.guideFreeSnap(event_dt, guide->normal_to_line, drag_type);
370 }
371 m.unSetup();
373 if (sp_canvas_world_pt_inside_window(item->canvas, event_w)) {
374 switch (drag_type) {
375 case SP_DRAG_TRANSLATE:
376 {
377 sp_guide_moveto(*guide, event_dt, true);
378 break;
379 }
380 case SP_DRAG_ROTATE:
381 {
382 Geom::Point pt = event_dt - guide->point_on_line;
383 double angle = std::atan2(pt[Geom::Y], pt[Geom::X]);
384 if (event->motion.state & GDK_CONTROL_MASK) {
385 Inkscape::Preferences *prefs = Inkscape::Preferences::get();
386 unsigned const snaps = abs(prefs->getInt("/options/rotationsnapsperpi/value", 12));
387 if (snaps) {
388 double sections = floor(angle * snaps / M_PI + .5);
389 angle = (M_PI / snaps) * sections;
390 }
391 }
392 sp_guide_set_normal(*guide, Geom::Point(1,0) * Geom::Rotate(angle + M_PI_2), true);
393 break;
394 }
395 case SP_DRAG_MOVE_ORIGIN:
396 {
397 sp_guide_moveto(*guide, event_dt, true);
398 break;
399 }
400 case SP_DRAG_NONE:
401 g_assert_not_reached();
402 break;
403 }
404 DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_NONE,
405 _("Move guide"));
406 } else {
407 /* Undo movement of any attached shapes. */
408 sp_guide_moveto(*guide, guide->point_on_line, false);
409 sp_guide_set_normal(*guide, guide->normal_to_line, false);
410 sp_guide_remove(guide);
411 DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_NONE,
412 _("Delete guide"));
413 }
414 moved = false;
415 desktop->set_coordinate_status(from_2geom(event_dt));
416 desktop->setPosition (from_2geom(event_dt));
417 }
418 drag_type = SP_DRAG_NONE;
419 sp_canvas_item_ungrab(item, event->button.time);
420 ret=TRUE;
421 }
422 case GDK_ENTER_NOTIFY:
423 {
424 sp_guideline_set_color(SP_GUIDELINE(item), guide->hicolor);
426 // set move or rotate cursor
427 Geom::Point const event_w(event->crossing.x, event->crossing.y);
428 Geom::Point const event_dt(desktop->w2d(event_w));
430 if ((event->crossing.state & GDK_SHIFT_MASK) && (drag_type != SP_DRAG_MOVE_ORIGIN)) {
431 GdkCursor *guide_cursor;
432 guide_cursor = gdk_cursor_new (GDK_EXCHANGE);
433 gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, guide_cursor);
434 gdk_cursor_unref(guide_cursor);
435 }
437 char *guide_description = sp_guide_description(guide);
438 desktop->guidesMessageContext()->setF(Inkscape::NORMAL_MESSAGE, _("<b>Guideline</b>: %s"), guide_description);
439 g_free(guide_description);
440 break;
441 }
442 case GDK_LEAVE_NOTIFY:
443 sp_guideline_set_color(SP_GUIDELINE(item), guide->color);
445 // restore event context's cursor
446 gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, desktop->event_context->cursor);
448 desktop->guidesMessageContext()->clear();
449 break;
450 case GDK_KEY_PRESS:
451 switch (get_group0_keyval (&event->key)) {
452 case GDK_Delete:
453 case GDK_KP_Delete:
454 case GDK_BackSpace:
455 {
456 SPDocument *doc = SP_OBJECT_DOCUMENT(guide);
457 sp_guide_remove(guide);
458 DocumentUndo::done(doc, SP_VERB_NONE, _("Delete guide"));
459 ret = TRUE;
460 sp_event_context_discard_delayed_snap_event(desktop->event_context);
461 break;
462 }
463 case GDK_Shift_L:
464 case GDK_Shift_R:
465 if (drag_type != SP_DRAG_MOVE_ORIGIN) {
466 GdkCursor *guide_cursor;
467 guide_cursor = gdk_cursor_new (GDK_EXCHANGE);
468 gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, guide_cursor);
469 gdk_cursor_unref(guide_cursor);
470 ret = TRUE;
471 break;
472 }
474 default:
475 // do nothing;
476 break;
477 }
478 break;
479 case GDK_KEY_RELEASE:
480 switch (get_group0_keyval (&event->key)) {
481 case GDK_Shift_L:
482 case GDK_Shift_R:
483 GdkCursor *guide_cursor;
484 guide_cursor = gdk_cursor_new (GDK_EXCHANGE);
485 gdk_window_set_cursor(GTK_WIDGET(sp_desktop_canvas(desktop))->window, guide_cursor);
486 gdk_cursor_unref(guide_cursor);
487 break;
488 default:
489 // do nothing;
490 break;
491 }
492 default:
493 break;
494 }
496 return ret;
497 }
499 //static std::map<GdkInputSource, std::string> switchMap;
500 static std::map<std::string, int> toolToUse;
501 static std::string lastName;
502 static GdkInputSource lastType = GDK_SOURCE_MOUSE;
504 static void init_extended()
505 {
506 std::string avoidName = "pad";
507 GList* devices = gdk_devices_list();
508 if ( devices ) {
509 for ( GList* curr = devices; curr; curr = g_list_next(curr) ) {
510 GdkDevice* dev = reinterpret_cast<GdkDevice*>(curr->data);
511 if ( dev->name
512 && (avoidName != dev->name)
513 && (dev->source != GDK_SOURCE_MOUSE) ) {
514 // g_message("Adding '%s' as [%d]", dev->name, dev->source);
516 // Set the initial tool for the device
517 switch ( dev->source ) {
518 case GDK_SOURCE_PEN:
519 toolToUse[dev->name] = TOOLS_CALLIGRAPHIC;
520 break;
521 case GDK_SOURCE_ERASER:
522 toolToUse[dev->name] = TOOLS_ERASER;
523 break;
524 case GDK_SOURCE_CURSOR:
525 toolToUse[dev->name] = TOOLS_SELECT;
526 break;
527 default:
528 ; // do not add
529 }
530 // } else if (dev->name) {
531 // g_message("Skippn '%s' as [%s]", dev->name, dev->source);
532 }
533 }
534 }
535 }
538 void snoop_extended(GdkEvent* event, SPDesktop *desktop)
539 {
540 GdkInputSource source = GDK_SOURCE_MOUSE;
541 std::string name;
543 switch ( event->type ) {
544 case GDK_MOTION_NOTIFY:
545 {
546 GdkEventMotion* event2 = reinterpret_cast<GdkEventMotion*>(event);
547 if ( event2->device ) {
548 source = event2->device->source;
549 name = event2->device->name;
550 }
551 }
552 break;
554 case GDK_BUTTON_PRESS:
555 case GDK_2BUTTON_PRESS:
556 case GDK_3BUTTON_PRESS:
557 case GDK_BUTTON_RELEASE:
558 {
559 GdkEventButton* event2 = reinterpret_cast<GdkEventButton*>(event);
560 if ( event2->device ) {
561 source = event2->device->source;
562 name = event2->device->name;
563 }
564 }
565 break;
567 case GDK_SCROLL:
568 {
569 GdkEventScroll* event2 = reinterpret_cast<GdkEventScroll*>(event);
570 if ( event2->device ) {
571 source = event2->device->source;
572 name = event2->device->name;
573 }
574 }
575 break;
577 case GDK_PROXIMITY_IN:
578 case GDK_PROXIMITY_OUT:
579 {
580 GdkEventProximity* event2 = reinterpret_cast<GdkEventProximity*>(event);
581 if ( event2->device ) {
582 source = event2->device->source;
583 name = event2->device->name;
584 }
585 }
586 break;
588 default:
589 ;
590 }
592 if (!name.empty()) {
593 if ( lastType != source || lastName != name ) {
594 // The device switched. See if it is one we 'count'
595 //g_message("Changed device %s -> %s", lastName.c_str(), name.c_str());
596 std::map<std::string, int>::iterator it = toolToUse.find(lastName);
597 if (it != toolToUse.end()) {
598 // Save the tool currently selected for next time the input
599 // device shows up.
600 it->second = tools_active(desktop);
601 }
603 it = toolToUse.find(name);
604 if (it != toolToUse.end() ) {
605 tools_switch(desktop, it->second);
606 }
608 lastName = name;
609 lastType = source;
610 }
611 }
612 }
616 /*
617 Local Variables:
618 mode:c++
619 c-file-style:"stroustrup"
620 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
621 indent-tabs-mode:nil
622 fill-column:99
623 End:
624 */
625 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :