Code

Node tool: fix handle retraction with non-cusp nodes
[inkscape.git] / src / ui / tool / modifier-tracker.h
1 /** @file
2  * Fine-grained modifier tracker for event handling.
3  */
4 /* Authors:
5  *   Krzysztof KosiƄski <tweenk.pl@gmail.com>
6  *
7  * Copyright (C) 2009 Authors
8  * Released under GNU GPL, read the file 'COPYING' for more information
9  */
11 #ifndef SEEN_UI_TOOL_MODIFIER_TRACKER_H
12 #define SEEN_UI_TOOL_MODIFIER_TRACKER_H
14 #include <gdk/gdk.h>
16 namespace Inkscape {
17 namespace UI {
19 class ModifierTracker {
20 public:
21     ModifierTracker();
22     bool event(GdkEvent *);
24     bool leftShift() const { return _left_shift; }
25     bool rightShift() const { return _right_shift; }
26     bool leftControl() const { return _left_ctrl; }
27     bool rightControl() const { return _right_ctrl; }
28     bool leftAlt() const { return _left_alt; }
29     bool rightAlt() const { return _right_alt; }
31 private:
32     bool _left_shift;
33     bool _right_shift;
34     bool _left_ctrl;
35     bool _right_ctrl;
36     bool _left_alt;
37     bool _right_alt;
38 };
40 } // namespace UI
41 } // namespace Inkscape
43 #endif // SEEN_UI_TOOL_MODIFIER_TRACKER_H
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 :