mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-14 06:57:01 +00:00
6c300f72a2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
43 lines
762 B
C++
43 lines
762 B
C++
// -*- C++ -*-
|
|
/**
|
|
* \file mouse_state.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* GUII representation of mouse presses and
|
|
* mouse button states
|
|
*
|
|
* \author John Levon
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef MOUSE_STATE_H
|
|
#define MOUSE_STATE_H
|
|
|
|
namespace lyx {
|
|
|
|
/// 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);
|
|
}
|
|
|
|
} // namespace mouse_button
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
#endif // MOUSE_STATE_H
|