Property Boxen: populate the Trigger page with property-editor placeholders
This commit is contained in:
parent
d30f87bf00
commit
132779ab39
@ -32,9 +32,18 @@
|
||||
|
||||
#include "actions.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "editor.h"
|
||||
#include "gui_thread.h"
|
||||
#include "public_editor.h"
|
||||
#include "timers.h"
|
||||
|
||||
#include "audio_region_properties_box.h"
|
||||
#include "midi_region_properties_box.h"
|
||||
#include "audio_region_operations_box.h"
|
||||
#include "midi_region_operations_box.h"
|
||||
#include "slot_properties_box.h"
|
||||
#include "midi_region_trimmer_box.h"
|
||||
|
||||
#include "trigger_page.h"
|
||||
#include "trigger_strip.h"
|
||||
#include "cuebox_ui.h"
|
||||
@ -70,11 +79,29 @@ TriggerPage::TriggerPage ()
|
||||
_master = new CueMaster(_master_widget.root());
|
||||
_slot_area_box.pack_start (_master_widget, Gtk::PACK_SHRINK);
|
||||
|
||||
_midi_prop_box = new MidiRegionPropertiesBox ();
|
||||
_audio_prop_box = new AudioRegionPropertiesBox ();
|
||||
_midi_ops_box = new MidiRegionOperationsBox ();
|
||||
_audio_ops_box = new AudioRegionOperationsBox ();
|
||||
_slot_prop_box = new SlotPropertiesBox ();
|
||||
_midi_trim_box = new MidiRegionTrimmerBox ();
|
||||
|
||||
Gtk::Table* table = manage (new Gtk::Table);
|
||||
table->set_homogeneous (false);
|
||||
table->set_spacings (16);
|
||||
table->set_border_width (8);
|
||||
|
||||
int col = 0;
|
||||
table->attach(*_slot_prop_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_midi_prop_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_midi_trim_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
table->attach(*_midi_ops_box, col, col+1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND ); col++;
|
||||
|
||||
_parameter_box.pack_start (*table);
|
||||
|
||||
#if 1 /* Placeholders */
|
||||
_browser_box.pack_start (*Gtk::manage (new Gtk::Label ("File Browser")));
|
||||
_parameter_box.pack_start (*Gtk::manage (new Gtk::Label ("Parameter HBox")));
|
||||
_browser_box.show_all ();
|
||||
_parameter_box.show_all ();
|
||||
#endif
|
||||
|
||||
/* Upper pane (slot | strips | file browser) */
|
||||
@ -136,7 +163,16 @@ TriggerPage::TriggerPage ()
|
||||
|
||||
TriggerPage::~TriggerPage ()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
delete _master;
|
||||
=======
|
||||
delete _slot_prop_box;
|
||||
delete _midi_ops_box;
|
||||
delete _audio_ops_box;
|
||||
delete _midi_prop_box;
|
||||
delete _audio_prop_box;
|
||||
delete _midi_trim_box;
|
||||
>>>>>>> Property Boxen: populate the Trigger page with property-editor placeholders
|
||||
}
|
||||
|
||||
Gtk::Window*
|
||||
@ -212,8 +248,17 @@ TriggerPage::set_session (Session* s)
|
||||
|
||||
_session->config.ParameterChanged.connect (_session_connections, invalidator (*this), boost::bind (&TriggerPage::parameter_changed, this, _1), gui_context ());
|
||||
|
||||
Editor::instance().get_selection().TriggersChanged.connect (sigc::mem_fun (*this, &TriggerPage::selection_changed));
|
||||
|
||||
initial_track_display ();
|
||||
|
||||
_midi_prop_box->set_session(s);
|
||||
_audio_prop_box->set_session(s);
|
||||
_midi_ops_box->set_session(s);
|
||||
_audio_ops_box->set_session(s);
|
||||
_slot_prop_box->set_session(s);
|
||||
_midi_trim_box->set_session(s);
|
||||
|
||||
update_title ();
|
||||
start_updating ();
|
||||
}
|
||||
@ -278,6 +323,39 @@ TriggerPage::initial_track_display ()
|
||||
add_routes (rl);
|
||||
}
|
||||
|
||||
void
|
||||
TriggerPage::selection_changed ()
|
||||
{
|
||||
Selection& selection (Editor::instance().get_selection());
|
||||
|
||||
_midi_ops_box->hide();
|
||||
_audio_ops_box->hide();
|
||||
_midi_prop_box->hide();
|
||||
_audio_prop_box->hide();
|
||||
_slot_prop_box->hide();
|
||||
_midi_trim_box->hide();
|
||||
|
||||
if (!selection.triggers.empty()) {
|
||||
TriggerSelection ts = selection.triggers;
|
||||
TriggerEntry* entry = *ts.begin();
|
||||
Trigger* slot = &entry->trigger();
|
||||
|
||||
_slot_prop_box->set_slot(slot);
|
||||
if (slot->region()) {
|
||||
_midi_prop_box->set_region(slot->region());
|
||||
_audio_prop_box->set_region(slot->region());
|
||||
_midi_trim_box->set_region(slot->region());
|
||||
|
||||
_midi_ops_box->show();
|
||||
_audio_ops_box->show();
|
||||
_midi_prop_box->show();
|
||||
_audio_prop_box->show();
|
||||
_slot_prop_box->show();
|
||||
_midi_trim_box->show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
TriggerPage::add_routes (RouteList& rl)
|
||||
{
|
||||
|
@ -33,6 +33,12 @@
|
||||
|
||||
class TriggerStrip;
|
||||
class CueMaster;
|
||||
class SlotPropertiesBox;
|
||||
class AudioRegionPropertiesBox;
|
||||
class MidiRegionPropertiesBox;
|
||||
class AudioRegionOperationsBox;
|
||||
class MidiRegionOperationsBox;
|
||||
class MidiRegionTrimmerBox;
|
||||
|
||||
class TriggerPage : public ArdourWidgets::Tabbable, public ARDOUR::SessionHandlePtr, public PBD::ScopedConnectionList
|
||||
{
|
||||
@ -62,6 +68,9 @@ private:
|
||||
void pi_property_changed (PBD::PropertyChange const&);
|
||||
void stripable_property_changed (PBD::PropertyChange const&, boost::weak_ptr<ARDOUR::Stripable>);
|
||||
|
||||
void selection_changed ();
|
||||
PBD::ScopedConnectionList editor_connections;
|
||||
|
||||
gint start_updating ();
|
||||
gint stop_updating ();
|
||||
void fast_update_strips ();
|
||||
@ -82,6 +91,13 @@ private:
|
||||
FittedCanvasWidget _master_widget;
|
||||
CueMaster *_master;
|
||||
|
||||
AudioRegionPropertiesBox* _audio_prop_box;
|
||||
MidiRegionPropertiesBox* _midi_prop_box;
|
||||
AudioRegionOperationsBox* _audio_ops_box;
|
||||
MidiRegionOperationsBox* _midi_ops_box;
|
||||
SlotPropertiesBox* _slot_prop_box;
|
||||
MidiRegionTrimmerBox *_midi_trim_box;
|
||||
|
||||
std::list<TriggerStrip*> _strips;
|
||||
sigc::connection _fast_screen_update_connection;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user