summaryrefslogtreecommitdiff
path: root/libs/surfaces/mackie/fader.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-04-09 17:48:16 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-04-09 17:48:16 +0000
commitdb5258fea395f4553fe4fe4a2a9a046602f7bcff (patch)
tree2c5625d45a53599e63dab29ada583a43a84168ac /libs/surfaces/mackie/fader.cc
parent086a6c56f3fba21556f4a7023fb67bddc4913adb (diff)
MCP: maybe handle multiple MCUs better; add support for modifier keys; rearrange source so that all button handlesr are in mcp_buttons.cc
git-svn-id: svn://localhost/ardour2/branches/3.0@11855 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/fader.cc')
-rw-r--r--libs/surfaces/mackie/fader.cc38
1 files changed, 38 insertions, 0 deletions
diff --git a/libs/surfaces/mackie/fader.cc b/libs/surfaces/mackie/fader.cc
new file mode 100644
index 0000000000..a7283f42d1
--- /dev/null
+++ b/libs/surfaces/mackie/fader.cc
@@ -0,0 +1,38 @@
+/*
+ Copyright (C) 2006,2007 John Anderson
+ Copyright (C) 2012 Paul Davis
+
+ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include "fader.h"
+#include "surface.h"
+#include "control_group.h"
+
+using namespace Mackie;
+
+Control*
+Fader::factory (Surface& surface, int id, int ordinal, const char* name, Group& group)
+{
+ Fader* f = new Fader (id, ordinal, name, group);
+
+ std::cerr << "Registering fader " << id << " ord " << ordinal << std::endl;
+
+ surface.faders[id] = f;
+ surface.controls.push_back (f);
+ group.add (*f);
+ return f;
+}
+