]> git.lyx.org Git - lyx.git/blob - src/frontends/mouse_state.h
namespace grfx -> lyx::graphics
[lyx.git] / src / frontends / mouse_state.h
1 /**
2  * \file mouse_state.h
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * GUII representation of mouse presses and
7  * mouse button states
8  *
9  * \author John Levon
10  *
11  * Full author contact details are available in file CREDITS
12  */
13
14 #ifndef MOUSE_STATE_H
15 #define MOUSE_STATE_H
16
17 /// used both for presses and held during motion
18 namespace mouse_button {
19
20         enum state {
21                 none = 0, //< no buttons held
22                 button1 = 1, //< mouse button 1 pressed
23                 button2 = 2,
24                 button3 = 4,
25                 button4 = 8,
26                 button5 = 16
27         };
28
29 inline void operator|=(state & s1, state s2)
30 {
31         s1 = static_cast<state>(s1 | s2);
32 }
33
34 } // namespace mouse_button
35
36 #endif // MOUSE_STATE_H