13
0

trigger page: rough-in a control for Cue Recording

This commit is contained in:
Ben Loftis 2022-01-21 17:45:18 -06:00
parent 094fbfa132
commit d6815d7e40
2 changed files with 21 additions and 0 deletions

View File

@ -84,6 +84,7 @@ TriggerPage::TriggerPage ()
_cue_area_box.pack_start (*spacer, Gtk::PACK_SHRINK); _cue_area_box.pack_start (*spacer, Gtk::PACK_SHRINK);
_cue_area_box.pack_start (_cue_box, Gtk::PACK_SHRINK); _cue_area_box.pack_start (_cue_box, Gtk::PACK_SHRINK);
_cue_area_box.pack_start (_master_widget, Gtk::PACK_SHRINK); _cue_area_box.pack_start (_master_widget, Gtk::PACK_SHRINK);
_cue_area_box.pack_start (_cue_rec_enable, Gtk::PACK_SHRINK);
/* left-side frame, same layout as TriggerStrip. /* left-side frame, same layout as TriggerStrip.
* use Alignment instead of Frame with SHADOW_IN (2px) * use Alignment instead of Frame with SHADOW_IN (2px)
@ -286,6 +287,10 @@ TriggerPage::set_session (Session* s)
Editor::instance ().get_selection ().TriggersChanged.connect (sigc::mem_fun (*this, &TriggerPage::selection_changed)); Editor::instance ().get_selection ().TriggersChanged.connect (sigc::mem_fun (*this, &TriggerPage::selection_changed));
TriggerBox::CueRecordingChanged.connect (_session_connections, invalidator (*this), boost::bind (&TriggerPage::rec_state_changed, this), gui_context ());
rec_state_changed();
_cue_rec_enable.signal_clicked.connect(sigc::mem_fun(*this, &TriggerPage::rec_state_clicked));
initial_track_display (); initial_track_display ();
_slot_prop_box.set_session (s); _slot_prop_box.set_session (s);
@ -481,6 +486,18 @@ TriggerPage::redisplay_track_list ()
} }
} }
void
TriggerPage::rec_state_clicked ()
{
TriggerBox::set_cue_recording(!TriggerBox::cue_recording());
}
void
TriggerPage::rec_state_changed ()
{
_cue_rec_enable.set_active_state( TriggerBox::cue_recording() ? Gtkmm2ext::ExplicitActive : Gtkmm2ext::Off);
}
void void
TriggerPage::parameter_changed (string const& p) TriggerPage::parameter_changed (string const& p)
{ {

View File

@ -74,6 +74,9 @@ private:
void pi_property_changed (PBD::PropertyChange const&); void pi_property_changed (PBD::PropertyChange const&);
void stripable_property_changed (PBD::PropertyChange const&, boost::weak_ptr<ARDOUR::Stripable>); void stripable_property_changed (PBD::PropertyChange const&, boost::weak_ptr<ARDOUR::Stripable>);
void rec_state_changed ();
void rec_state_clicked ();
void add_sidebar_page (std::string const&, Gtk::Widget&); void add_sidebar_page (std::string const&, Gtk::Widget&);
bool no_strip_button_event (GdkEventButton*); bool no_strip_button_event (GdkEventButton*);
@ -111,6 +114,7 @@ private:
CueBoxWidget _cue_box; CueBoxWidget _cue_box;
FittedCanvasWidget _master_widget; FittedCanvasWidget _master_widget;
CueMaster _master; CueMaster _master;
ArdourWidgets::ArdourButton _cue_rec_enable;
SlotPropertiesBox _slot_prop_box; SlotPropertiesBox _slot_prop_box;