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