diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2019-01-09 10:35:17 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2019-01-09 10:35:17 +0000 |
| commit | 7f5d2af69c85e840274dda25a20aa63031a26b2c (patch) | |
| tree | 84ea7938d55ec7ea8db58eb11be9617377c405d3 /src/inkscape-window.cpp | |
| parent | Remove helper/window.h helper/window.cpp (diff) | |
| download | inkscape-7f5d2af69c85e840274dda25a20aa63031a26b2c.tar.gz inkscape-7f5d2af69c85e840274dda25a20aa63031a26b2c.zip | |
First baby step in adding InkscapeWindow (Gtk::ApplicationWindow)
Diffstat (limited to 'src/inkscape-window.cpp')
| -rw-r--r-- | src/inkscape-window.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/inkscape-window.cpp b/src/inkscape-window.cpp new file mode 100644 index 000000000..3d60a3e65 --- /dev/null +++ b/src/inkscape-window.cpp @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/** + * @file + * Inkscape - An SVG editor. + */ +/* + * Authors: + * Tavmjong Bah + * + * Copyright (C) 2018 Authors + * + * The contents of this file may be used under the GNU General Public License Version 2 or later. + * Read the file 'COPYING' for more information. + * + */ + + +#include "inkscape-window.h" +#include "inkscape.h" // SP_ACTIVE_DESKTOP +#include "shortcuts.h" + +InkscapeWindow::InkscapeWindow() +{ + + // Callbacks + signal_key_press_event().connect(sigc::mem_fun(*this, &InkscapeWindow::key_press), false); + + // Actions +} + +bool +InkscapeWindow::key_press(GdkEventKey* event) +{ + unsigned shortcut = sp_shortcut_get_for_event(event); + return sp_shortcut_invoke (shortcut, SP_ACTIVE_DESKTOP); // We should own desktop. +} + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : |
