summaryrefslogtreecommitdiff
path: root/libs/surfaces/faderport8/actions.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-04-20 17:19:03 +0200
committerRobin Gareus <robin@gareus.org>2017-04-20 17:19:03 +0200
commitb6c222555f33fdab72a0d823d77faa24246a83d6 (patch)
tree294c8f530a3304d288da50979006f6cde8673a5c /libs/surfaces/faderport8/actions.cc
parent8add4eefad58458acb7212b3cdba2807f593cfc8 (diff)
NO-OP: re-order code, add comments
Diffstat (limited to 'libs/surfaces/faderport8/actions.cc')
-rw-r--r--libs/surfaces/faderport8/actions.cc35
1 files changed, 25 insertions, 10 deletions
diff --git a/libs/surfaces/faderport8/actions.cc b/libs/surfaces/faderport8/actions.cc
index 0c1112288b..fd75969211 100644
--- a/libs/surfaces/faderport8/actions.cc
+++ b/libs/surfaces/faderport8/actions.cc
@@ -48,6 +48,11 @@ using namespace ArdourSurface::FP8Types;
_ctrls.button (ID).pressed.connect_same_thread (button_connections, boost::bind (&FaderPort8::button_user, this, true, ID)); \
_ctrls.button (ID).released.connect_same_thread (button_connections, boost::bind (&FaderPort8::button_user, this, false, ID));
+
+/* Bind button signals (press, release) to callback methods
+ * (called once after constructing buttons).
+ * Bound actions are handled the the ctrl-surface thread.
+ */
void
FaderPort8::setup_actions ()
{
@@ -101,6 +106,10 @@ FaderPort8::setup_actions ()
}
}
+/* ****************************************************************************
+ * Direct control callback Actions
+ */
+
void
FaderPort8::button_play ()
{
@@ -255,27 +264,33 @@ FaderPort8::button_mute_clear ()
}
void
-FaderPort8::button_arm (bool press)
-{
- FaderMode fadermode = _ctrls.fader_mode ();
- if (fadermode == ModeTrack || fadermode == ModePan) {
- _ctrls.button (FP8Controls::BtnArm).set_active (press);
- ARMButtonChange (press);
- }
-}
-
-void
FaderPort8::button_arm_all ()
{
BasicUI::all_tracks_rec_in ();
}
+/* access generic action */
void
FaderPort8::button_action (const std::string& group, const std::string& item)
{
AccessAction (group, item);
}
+/* ****************************************************************************
+ * Mode specific and internal callbacks
+ */
+
+/* handle "ARM" press -- act like shift, change "Select" button mode */
+void
+FaderPort8::button_arm (bool press)
+{
+ FaderMode fadermode = _ctrls.fader_mode ();
+ if (fadermode == ModeTrack || fadermode == ModePan) {
+ _ctrls.button (FP8Controls::BtnArm).set_active (press);
+ ARMButtonChange (press); /* EMIT SIGNAL */
+ }
+}
+
void
FaderPort8::button_prev_next (bool next)
{