Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
modifier-tracker.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
5/* Authors:
6 * Krzysztof KosiƄski <tweenk.pl@gmail.com>
7 *
8 * Copyright (C) 2009 Authors
9 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
10 */
11
12#ifndef INKSCAPE_UI_TOOL_MODIFIER_TRACKER_H
13#define INKSCAPE_UI_TOOL_MODIFIER_TRACKER_H
14
15namespace Inkscape { struct CanvasEvent; }
16namespace Inkscape::UI {
17
19{
20public:
21 ModifierTracker() = default;
22
23 void event(CanvasEvent const &event);
24
25 bool leftShift() const { return _left_shift; }
26 bool rightShift() const { return _right_shift; }
27 bool leftControl() const { return _left_ctrl; }
28 bool rightControl() const { return _right_ctrl; }
29 bool leftAlt() const { return _left_alt; }
30 bool rightAlt() const { return _right_alt; }
31
32private:
33 bool _left_shift = false;
34 bool _right_shift = false;
35 bool _left_ctrl = false;
36 bool _right_ctrl = false;
37 bool _left_alt = false;
38 bool _right_alt = false;
39};
40
41} // namespace Inkscape::UI
42
43#endif // INKSCAPE_UI_TOOL_MODIFIER_TRACKER_H
44
45/*
46 Local Variables:
47 mode:c++
48 c-file-style:"stroustrup"
49 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
50 indent-tabs-mode:nil
51 fill-column:99
52 End:
53*/
54// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
void event(CanvasEvent const &event)
User interface code.
Definition desktop.h:113
Helper class to stream background task notifications as a series of messages.
Abstract base class for events.