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