mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
Transfer slot_prop_box to selection_properties_box
This commit is contained in:
parent
4c5284737d
commit
fcae7c7bb5
4 changed files with 32 additions and 14 deletions
|
|
@ -31,8 +31,12 @@
|
||||||
#include "region_fx_properties_box.h"
|
#include "region_fx_properties_box.h"
|
||||||
#include "region_view.h"
|
#include "region_view.h"
|
||||||
#include "route_properties_box.h"
|
#include "route_properties_box.h"
|
||||||
#include "selection_properties_box.h"
|
#include "slot_properties_box.h"
|
||||||
#include "time_info_box.h"
|
#include "time_info_box.h"
|
||||||
|
#include "trigger_strip.h"
|
||||||
|
#include "triggerbox_ui.h"
|
||||||
|
|
||||||
|
#include "selection_properties_box.h"
|
||||||
|
|
||||||
#include "pbd/i18n.h"
|
#include "pbd/i18n.h"
|
||||||
|
|
||||||
|
|
@ -49,9 +53,11 @@ SelectionPropertiesBox::SelectionPropertiesBox ()
|
||||||
|
|
||||||
_time_info_box = new TimeInfoBox ("EditorTimeInfo", true);
|
_time_info_box = new TimeInfoBox ("EditorTimeInfo", true);
|
||||||
_route_prop_box = new RoutePropertiesBox ();
|
_route_prop_box = new RoutePropertiesBox ();
|
||||||
|
_slot_prop_box = new SlotPropertiesBox ();
|
||||||
|
|
||||||
pack_start(*_time_info_box, false, false, 0);
|
pack_start(*_time_info_box, false, false, 0);
|
||||||
pack_start(*_route_prop_box, true, true, 0);
|
pack_start(*_route_prop_box, true, true, 0);
|
||||||
|
pack_start(*_slot_prop_box, true, true, 0);
|
||||||
pack_start(_region_editor_box, true, true, 0);
|
pack_start(_region_editor_box, true, true, 0);
|
||||||
|
|
||||||
_time_info_box->set_no_show_all ();
|
_time_info_box->set_no_show_all ();
|
||||||
|
|
@ -69,6 +75,7 @@ SelectionPropertiesBox::~SelectionPropertiesBox ()
|
||||||
delete _route_prop_box;
|
delete _route_prop_box;
|
||||||
delete _region_editor;
|
delete _region_editor;
|
||||||
delete _region_fx_box;
|
delete _region_fx_box;
|
||||||
|
delete _slot_prop_box;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -102,6 +109,7 @@ SelectionPropertiesBox::set_session (Session* s)
|
||||||
|
|
||||||
_time_info_box->set_session(s);
|
_time_info_box->set_session(s);
|
||||||
_route_prop_box->set_session(s);
|
_route_prop_box->set_session(s);
|
||||||
|
_slot_prop_box->set_session(s);
|
||||||
|
|
||||||
selection_changed();
|
selection_changed();
|
||||||
}
|
}
|
||||||
|
|
@ -146,6 +154,21 @@ SelectionPropertiesBox::selection_changed ()
|
||||||
_time_info_box->hide ();
|
_time_info_box->hide ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool show_slot_properties = false;
|
||||||
|
if (!selection.triggers.empty ()) {
|
||||||
|
TriggerSelection ts = selection.triggers;
|
||||||
|
TriggerEntry* entry = *ts.begin ();
|
||||||
|
TriggerReference ref = entry->trigger_reference ();
|
||||||
|
|
||||||
|
_slot_prop_box->set_slot(ref);
|
||||||
|
show_slot_properties = true;
|
||||||
|
}
|
||||||
|
if (show_slot_properties) {
|
||||||
|
_slot_prop_box->show();
|
||||||
|
} else {
|
||||||
|
_slot_prop_box->hide();
|
||||||
|
}
|
||||||
|
|
||||||
bool show_route_properties = false;
|
bool show_route_properties = false;
|
||||||
if (!selection.tracks.empty ()) {
|
if (!selection.tracks.empty ()) {
|
||||||
TimeAxisView *tav = selection.tracks.back (); //the LAST selected stripable is the clicked one. see selection.cc line ~92
|
TimeAxisView *tav = selection.tracks.back (); //the LAST selected stripable is the clicked one. see selection.cc line ~92
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ class TimeInfoBox;
|
||||||
class RegionEditor;
|
class RegionEditor;
|
||||||
class RegionFxPropertiesBox;
|
class RegionFxPropertiesBox;
|
||||||
class RoutePropertiesBox;
|
class RoutePropertiesBox;
|
||||||
|
class SlotPropertiesBox;
|
||||||
|
|
||||||
class SelectionPropertiesBox : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
class SelectionPropertiesBox : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
||||||
{
|
{
|
||||||
|
|
@ -52,6 +53,7 @@ private:
|
||||||
|
|
||||||
TimeInfoBox* _time_info_box;
|
TimeInfoBox* _time_info_box;
|
||||||
RoutePropertiesBox* _route_prop_box;
|
RoutePropertiesBox* _route_prop_box;
|
||||||
|
SlotPropertiesBox* _slot_prop_box;
|
||||||
Gtk::HBox _region_editor_box;
|
Gtk::HBox _region_editor_box;
|
||||||
RegionEditor* _region_editor;
|
RegionEditor* _region_editor;
|
||||||
RegionFxPropertiesBox* _region_fx_box;
|
RegionFxPropertiesBox* _region_fx_box;
|
||||||
|
|
|
||||||
|
|
@ -152,10 +152,11 @@ TriggerPage::TriggerPage ()
|
||||||
table.set_border_width (8);
|
table.set_border_width (8);
|
||||||
|
|
||||||
int col = 0;
|
int col = 0;
|
||||||
table.attach (_slot_prop_box, col, col + 1, 0, 1, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
|
table.attach (_properties_box, col, col + 1, 0, 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
|
||||||
++col;
|
++col;
|
||||||
table.attach (_audio_trig_box, col, col + 1, 0, 1, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
|
table.attach (_audio_trig_box, col, col + 1, 0, 1, Gtk::FILL, Gtk::SHRINK | Gtk::FILL);
|
||||||
clip_editor_column = ++col;
|
clip_editor_column = ++col;
|
||||||
|
++col;
|
||||||
|
|
||||||
table.set_no_show_all ();
|
table.set_no_show_all ();
|
||||||
|
|
||||||
|
|
@ -194,6 +195,7 @@ TriggerPage::TriggerPage ()
|
||||||
_trigger_clip_picker.show ();
|
_trigger_clip_picker.show ();
|
||||||
_no_strips.show ();
|
_no_strips.show ();
|
||||||
_sidebar_vbox.show_all ();
|
_sidebar_vbox.show_all ();
|
||||||
|
_properties_box.show();
|
||||||
|
|
||||||
/* setup keybidings */
|
/* setup keybidings */
|
||||||
set_widget_bindings (contents(), *bindings, ARDOUR_BINDING_KEY);
|
set_widget_bindings (contents(), *bindings, ARDOUR_BINDING_KEY);
|
||||||
|
|
@ -365,7 +367,7 @@ TriggerPage::set_session (Session* s)
|
||||||
|
|
||||||
initial_track_display ();
|
initial_track_display ();
|
||||||
|
|
||||||
_slot_prop_box.set_session (s);
|
_properties_box.set_session (s);
|
||||||
|
|
||||||
_audio_trig_box.set_session (s);
|
_audio_trig_box.set_session (s);
|
||||||
|
|
||||||
|
|
@ -473,7 +475,6 @@ TriggerPage::trigger_arm_changed (Trigger const * trigger)
|
||||||
|
|
||||||
/* hide everything */
|
/* hide everything */
|
||||||
|
|
||||||
_slot_prop_box.hide ();
|
|
||||||
_audio_trig_box.hide ();
|
_audio_trig_box.hide ();
|
||||||
_midi_trig_box.hide ();
|
_midi_trig_box.hide ();
|
||||||
_midi_editor->viewport().hide ();
|
_midi_editor->viewport().hide ();
|
||||||
|
|
@ -483,9 +484,6 @@ TriggerPage::trigger_arm_changed (Trigger const * trigger)
|
||||||
TriggerBox& box = trigger->box();
|
TriggerBox& box = trigger->box();
|
||||||
TriggerReference ref (trigger->boxptr(), trigger->index());
|
TriggerReference ref (trigger->boxptr(), trigger->index());
|
||||||
|
|
||||||
_slot_prop_box.set_slot (ref);
|
|
||||||
_slot_prop_box.show ();
|
|
||||||
|
|
||||||
if (box.data_type () == DataType::AUDIO) {
|
if (box.data_type () == DataType::AUDIO) {
|
||||||
if (trigger->the_region()) {
|
if (trigger->the_region()) {
|
||||||
_audio_trig_box.set_trigger (ref);
|
_audio_trig_box.set_trigger (ref);
|
||||||
|
|
@ -513,7 +511,6 @@ TriggerPage::selection_changed ()
|
||||||
|
|
||||||
/* hide everything */
|
/* hide everything */
|
||||||
|
|
||||||
_slot_prop_box.hide ();
|
|
||||||
_audio_trig_box.hide ();
|
_audio_trig_box.hide ();
|
||||||
_midi_trig_box.hide ();
|
_midi_trig_box.hide ();
|
||||||
|
|
||||||
|
|
@ -533,9 +530,6 @@ TriggerPage::selection_changed ()
|
||||||
TriggerPtr trigger = entry->trigger ();
|
TriggerPtr trigger = entry->trigger ();
|
||||||
std::shared_ptr<TriggerBox> box = ref.box();
|
std::shared_ptr<TriggerBox> box = ref.box();
|
||||||
|
|
||||||
_slot_prop_box.set_slot (ref);
|
|
||||||
_slot_prop_box.show ();
|
|
||||||
|
|
||||||
if (box->data_type () == DataType::AUDIO) {
|
if (box->data_type () == DataType::AUDIO) {
|
||||||
|
|
||||||
if (trigger->the_region()) {
|
if (trigger->the_region()) {
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
#include "fitted_canvas_widget.h"
|
#include "fitted_canvas_widget.h"
|
||||||
#include "midi_trigger_properties_box.h"
|
#include "midi_trigger_properties_box.h"
|
||||||
#include "route_processor_selection.h"
|
#include "route_processor_selection.h"
|
||||||
#include "slot_properties_box.h"
|
#include "selection_properties_box.h"
|
||||||
#include "trigger_clip_picker.h"
|
#include "trigger_clip_picker.h"
|
||||||
#include "trigger_region_list.h"
|
#include "trigger_region_list.h"
|
||||||
#include "trigger_route_list.h"
|
#include "trigger_route_list.h"
|
||||||
|
|
@ -134,8 +134,7 @@ private:
|
||||||
|
|
||||||
bool _show_bottom_pane;
|
bool _show_bottom_pane;
|
||||||
|
|
||||||
SlotPropertiesBox _slot_prop_box;
|
SelectionPropertiesBox _properties_box;
|
||||||
|
|
||||||
AudioTriggerPropertiesBox _audio_trig_box;
|
AudioTriggerPropertiesBox _audio_trig_box;
|
||||||
MidiTriggerPropertiesBox _midi_trig_box;
|
MidiTriggerPropertiesBox _midi_trig_box;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue