2002-05-26 17:33:14 +00:00
|
|
|
/**
|
|
|
|
* \file mouse_state.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-05-26 17:33:14 +00:00
|
|
|
*
|
|
|
|
* GUII representation of mouse presses and
|
|
|
|
* mouse button states
|
|
|
|
*
|
2002-12-01 22:59:25 +00:00
|
|
|
* \author John Levon
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2002-05-26 17:33:14 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MOUSE_STATE_H
|
|
|
|
#define MOUSE_STATE_H
|
|
|
|
|
|
|
|
/// used both for presses and held during motion
|
|
|
|
namespace mouse_button {
|
|
|
|
|
|
|
|
enum state {
|
|
|
|
none = 0, //< no buttons held
|
|
|
|
button1 = 1, //< mouse button 1 pressed
|
|
|
|
button2 = 2,
|
|
|
|
button3 = 4,
|
|
|
|
button4 = 8,
|
|
|
|
button5 = 16
|
|
|
|
};
|
|
|
|
|
|
|
|
inline void operator|=(state & s1, state s2)
|
|
|
|
{
|
|
|
|
s1 = static_cast<state>(s1 | s2);
|
|
|
|
}
|
2002-12-01 22:59:25 +00:00
|
|
|
|
2002-05-26 17:33:14 +00:00
|
|
|
} // namespace mouse_button
|
|
|
|
|
|
|
|
#endif // MOUSE_STATE_H
|