2015-05-20 15:50:47 +00:00
|
|
|
|
// This code is distributed under MIT license.
|
|
|
|
|
// Copyright (c) 2015 George Mamaladze
|
|
|
|
|
// See license.txt or http://opensource.org/licenses/mit-license.php
|
|
|
|
|
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
2015-07-26 17:36:11 +00:00
|
|
|
|
namespace xClient.Core.MouseKeyHook.Implementation
|
2015-05-20 15:50:47 +00:00
|
|
|
|
{
|
|
|
|
|
internal class ButtonSet
|
|
|
|
|
{
|
|
|
|
|
private MouseButtons m_Set;
|
|
|
|
|
|
|
|
|
|
public ButtonSet()
|
|
|
|
|
{
|
|
|
|
|
m_Set = MouseButtons.None;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Add(MouseButtons element)
|
|
|
|
|
{
|
|
|
|
|
m_Set |= element;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Remove(MouseButtons element)
|
|
|
|
|
{
|
|
|
|
|
m_Set &= ~element;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Contains(MouseButtons element)
|
|
|
|
|
{
|
|
|
|
|
return (m_Set & element) != MouseButtons.None;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|