2019-08-03 08:34:29 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2006-2007 John Anderson
|
|
|
|
* Copyright (C) 2012-2015 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2012-04-22 13:37:52 -04:00
|
|
|
#ifndef mackie_jog_wheel
|
|
|
|
#define mackie_jog_wheel
|
|
|
|
|
|
|
|
#include "timer.h"
|
|
|
|
|
|
|
|
#include <stack>
|
|
|
|
#include <deque>
|
|
|
|
#include <queue>
|
|
|
|
|
2015-10-04 14:51:05 -04:00
|
|
|
namespace ArdourSurface {
|
2015-04-15 20:37:20 -04:00
|
|
|
|
2012-04-22 13:37:52 -04:00
|
|
|
class MackieControlProtocol;
|
|
|
|
|
|
|
|
namespace Mackie
|
|
|
|
{
|
|
|
|
|
|
|
|
class JogWheel
|
|
|
|
{
|
|
|
|
public:
|
2021-05-04 23:30:22 -04:00
|
|
|
enum Mode { scroll, shuttle };
|
2015-10-05 10:17:49 -04:00
|
|
|
|
2012-04-22 13:37:52 -04:00
|
|
|
JogWheel (MackieControlProtocol & mcp);
|
|
|
|
|
|
|
|
/// As the wheel turns...
|
|
|
|
void jog_event (float delta);
|
|
|
|
void set_mode (Mode m);
|
|
|
|
Mode mode() const { return _mode; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
MackieControlProtocol & _mcp;
|
|
|
|
Mode _mode;
|
|
|
|
};
|
|
|
|
|
2015-04-15 20:37:20 -04:00
|
|
|
}
|
2012-04-22 13:37:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|