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