allow ControlProtocols to call for undo/redo in GUI; make MCP use this
git-svn-id: svn://localhost/ardour2/branches/3.0@11851 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5d0858940b
commit
e2d62d9af4
|
@ -709,6 +709,8 @@ Editor::Editor ()
|
|||
ControlProtocol::ZoomToSession.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_session, this), gui_context());
|
||||
ControlProtocol::ZoomIn.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_step, this, false), gui_context());
|
||||
ControlProtocol::ZoomOut.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_step, this, true), gui_context());
|
||||
ControlProtocol::Undo.connect (*this, invalidator (*this), boost::bind (&Editor::undo, this, true), gui_context());
|
||||
ControlProtocol::Redo.connect (*this, invalidator (*this), boost::bind (&Editor::redo, this, true), gui_context());
|
||||
ControlProtocol::ScrollTimeline.connect (*this, invalidator (*this), ui_bind (&Editor::control_scroll, this, _1), gui_context());
|
||||
ControlProtocol::SelectByRID.connect (*this, invalidator (*this), ui_bind (&Editor::control_select, this, _1), gui_context());
|
||||
BasicUI::AccessAction.connect (*this, invalidator (*this), ui_bind (&Editor::access_action, this, _1, _2), gui_context());
|
||||
|
|
|
@ -35,6 +35,8 @@ Signal0<void> ControlProtocol::ZoomToSession;
|
|||
Signal0<void> ControlProtocol::ZoomOut;
|
||||
Signal0<void> ControlProtocol::ZoomIn;
|
||||
Signal0<void> ControlProtocol::Enter;
|
||||
Signal0<void> ControlProtocol::Undo;
|
||||
Signal0<void> ControlProtocol::Redo;
|
||||
Signal1<void,float> ControlProtocol::ScrollTimeline;
|
||||
Signal1<void,uint32_t> ControlProtocol::SelectByRID;
|
||||
|
||||
|
|
|
@ -60,6 +60,8 @@ class ControlProtocol : virtual public sigc::trackable, public PBD::Stateful, pu
|
|||
static PBD::Signal0<void> ZoomIn;
|
||||
static PBD::Signal0<void> ZoomOut;
|
||||
static PBD::Signal0<void> Enter;
|
||||
static PBD::Signal0<void> Undo;
|
||||
static PBD::Signal0<void> Redo;
|
||||
static PBD::Signal1<void,float> ScrollTimeline;
|
||||
static PBD::Signal1<void,uint32_t> SelectByRID;
|
||||
|
||||
|
|
|
@ -1720,6 +1720,32 @@ MackieControlProtocol::scrub_release (Mackie::Button &)
|
|||
);
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::undo_press (Button&)
|
||||
{
|
||||
Undo(); /* EMIT SIGNAL */
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::undo_release (Button&)
|
||||
{
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::redo_press (Button&)
|
||||
{
|
||||
Redo(); /* EMIT SIGNAL */
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::redo_release (Button&)
|
||||
{
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::drop_press (Button &)
|
||||
{
|
||||
|
|
|
@ -196,6 +196,10 @@ class MackieControlProtocol
|
|||
Mackie::LedState zoom_release(Mackie::Button &);
|
||||
Mackie::LedState scrub_press(Mackie::Button &);
|
||||
Mackie::LedState scrub_release(Mackie::Button &);
|
||||
Mackie::LedState undo_press (Mackie::Button &);
|
||||
Mackie::LedState undo_release (Mackie::Button &);
|
||||
Mackie::LedState redo_press (Mackie::Button &);
|
||||
Mackie::LedState redo_release (Mackie::Button &);
|
||||
|
||||
/* unimplemented button handlers */
|
||||
|
||||
|
@ -261,14 +265,10 @@ class MackieControlProtocol
|
|||
Mackie::LedState on_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState rec_ready_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState rec_ready_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState undo_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState undo_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState snapshot_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState snapshot_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState touch_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState touch_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState redo_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState redo_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState enter_press (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState enter_release (Mackie::Button &) { return Mackie::off; }
|
||||
Mackie::LedState cancel_press (Mackie::Button &) { return Mackie::off; }
|
||||
|
|
Loading…
Reference in New Issue
Block a user