mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
VCA TimeAxis Context Menu
NB. This calls for a vca_ui (alike route_ui) to consolidate common methods like choose_color, assign/drop slaves etc)
This commit is contained in:
parent
fff9a3cc7f
commit
f1ae16fe8f
2 changed files with 50 additions and 0 deletions
|
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
#include "gui_thread.h"
|
#include "gui_thread.h"
|
||||||
#include "public_editor.h"
|
#include "public_editor.h"
|
||||||
|
#include "mixer_ui.h"
|
||||||
#include "ui_config.h"
|
#include "ui_config.h"
|
||||||
#include "vca_time_axis.h"
|
#include "vca_time_axis.h"
|
||||||
|
|
||||||
|
|
@ -437,6 +438,32 @@ VCATimeAxisView::create_automation_child (const Evoral::Parameter& param, bool s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
VCATimeAxisView::build_display_menu ()
|
||||||
|
{
|
||||||
|
using namespace Menu_Helpers;
|
||||||
|
/* prepare it */
|
||||||
|
TimeAxisView::build_display_menu ();
|
||||||
|
|
||||||
|
MenuList& items = display_menu->items();
|
||||||
|
items.push_back (MenuElem (_("Color..."), sigc::mem_fun (*this, &VCATimeAxisView::choose_color)));
|
||||||
|
if (_size_menu) {
|
||||||
|
detach_menu (*_size_menu);
|
||||||
|
}
|
||||||
|
build_size_menu ();
|
||||||
|
items.push_back (MenuElem (_("Height"), *_size_menu));
|
||||||
|
items.push_back (SeparatorElem());
|
||||||
|
|
||||||
|
build_automation_action_menu (true);
|
||||||
|
items.push_back (MenuElem (_("Automation"), *automation_action_menu));
|
||||||
|
|
||||||
|
items.push_back (SeparatorElem());
|
||||||
|
items.push_back (MenuElem (_("Drop All Slaves"), sigc::mem_fun (*this, &VCATimeAxisView::drop_all_slaves)));
|
||||||
|
items.push_back (SeparatorElem());
|
||||||
|
items.push_back (MenuElem (_("Remove"), sigc::mem_fun(_editor, &PublicEditor::remove_tracks)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
VCATimeAxisView::build_automation_action_menu (bool for_selection)
|
VCATimeAxisView::build_automation_action_menu (bool for_selection)
|
||||||
{
|
{
|
||||||
|
|
@ -518,3 +545,18 @@ VCATimeAxisView::hide_all_automation (bool apply_to_selection)
|
||||||
no_redraw = false;
|
no_redraw = false;
|
||||||
request_redraw ();
|
request_redraw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
VCATimeAxisView::drop_all_slaves ()
|
||||||
|
{
|
||||||
|
_vca->Drop (); /* EMIT SIGNAL */
|
||||||
|
|
||||||
|
if (Mixer_UI::instance()->showing_spill_for (_vca)) {
|
||||||
|
Mixer_UI::instance()->show_spill (boost::shared_ptr<Stripable>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
VCATimeAxisView::choose_color () {
|
||||||
|
_color_picker.popup (_vca);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
|
|
||||||
#include "widgets/ardour_button.h"
|
#include "widgets/ardour_button.h"
|
||||||
|
|
||||||
|
#include "stripable_colorpicker.h"
|
||||||
#include "stripable_time_axis.h"
|
#include "stripable_time_axis.h"
|
||||||
#include "gain_meter.h"
|
#include "gain_meter.h"
|
||||||
|
|
||||||
|
|
@ -75,6 +76,7 @@ protected:
|
||||||
|
|
||||||
void create_automation_child (const Evoral::Parameter& param, bool show);
|
void create_automation_child (const Evoral::Parameter& param, bool show);
|
||||||
virtual void build_automation_action_menu (bool);
|
virtual void build_automation_action_menu (bool);
|
||||||
|
void build_display_menu ();
|
||||||
Gtk::Menu* automation_action_menu;
|
Gtk::Menu* automation_action_menu;
|
||||||
|
|
||||||
bool name_entry_changed (std::string const&);
|
bool name_entry_changed (std::string const&);
|
||||||
|
|
@ -91,6 +93,12 @@ protected:
|
||||||
bool automation_click (GdkEventButton*);
|
bool automation_click (GdkEventButton*);
|
||||||
bool drop_release (GdkEventButton*);
|
bool drop_release (GdkEventButton*);
|
||||||
void self_delete ();
|
void self_delete ();
|
||||||
|
|
||||||
|
void drop_all_slaves ();
|
||||||
|
void choose_color ();
|
||||||
|
|
||||||
|
private:
|
||||||
|
StripableColorDialog _color_picker;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ardour_vca_time_axis_h__ */
|
#endif /* __ardour_vca_time_axis_h__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue