X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fplugin_ui.h;h=14bfbe3ecadf99bc07e6be96cfb3ae604839a313;hb=5fef65538040fbac1b9edd1847a269aa925a49c9;hp=e5a5b59930bf5e50ed16e4827a0c34b01f5c28bf;hpb=b8cea19b957b3af6ce0dd72f6441cb333e38ab94;p=ardour.git diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h index e5a5b59930..14bfbe3eca 100644 --- a/gtk2_ardour/plugin_ui.h +++ b/gtk2_ardour/plugin_ui.h @@ -47,6 +47,7 @@ #include "ardour/types.h" #include "ardour/plugin.h" +#include "ardour/variant.h" #include "automation_controller.h" #include "ardour_button.h" @@ -134,6 +135,14 @@ class PlugUIBase : public virtual sigc::trackable, public PBD::ScopedConnectionL Gtk::Label latency_label; /** a button which, when clicked, opens the latency GUI */ Gtk::Button latency_button; + /** a button which sets all controls' automation setting to Manual */ + ArdourButton automation_manual_all_button; + /** a button which sets all controls' automation setting to Play */ + ArdourButton automation_play_all_button; + /** a button which sets all controls' automation setting to Write */ + ArdourButton automation_write_all_button; + /** a button which sets all controls' automation setting to Touch */ + ArdourButton automation_touch_all_button; void set_latency_label (); @@ -207,7 +216,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox bool max_unbound; bool packed; - MeterInfo (int /*i*/) { + MeterInfo () { meter = 0; packed = false; min = 1.0e10; @@ -225,15 +234,15 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox /* FIXME: Unify with AutomationController */ struct ControlUI : public Gtk::HBox { - uint32_t port_index; - boost::shared_ptr control; + const Evoral::Parameter parameter() const { return param; } - Evoral::Parameter parameter() { return control->parameter(); } + Evoral::Parameter param; + boost::shared_ptr control; /* input */ Gtk::ComboBoxText* combo; - boost::shared_ptr scale_points; + boost::shared_ptr scale_points; Gtk::ToggleButton* button; boost::shared_ptr controller; Gtkmm2ext::ClickBox* clickbox; @@ -241,6 +250,7 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox bool update_pending; char ignore_change; Gtk::Button automate_button; + Gtk::FileChooserButton* file_button; /* output */ @@ -251,39 +261,45 @@ class GenericPluginUI : public PlugUIBase, public Gtk::VBox Gtk::VBox* vbox; MeterInfo* meterinfo; - ControlUI (); + ControlUI (const Evoral::Parameter& param); ~ControlUI (); }; std::vector input_controls; + std::vector input_controls_with_automation; std::vector output_controls; sigc::connection screen_update_connection; void output_update(); void build (); - ControlUI* build_control_ui (guint32 port_index, boost::shared_ptr); + ControlUI* build_control_ui (const Evoral::Parameter& param, + const ARDOUR::ParameterDescriptor& desc, + boost::shared_ptr mcontrol, + float value, + bool is_input); + void ui_parameter_changed (ControlUI* cui); void toggle_parameter_changed (ControlUI* cui); void update_control_display (ControlUI* cui); void control_port_toggled (ControlUI* cui); void control_combo_changed (ControlUI* cui); - void astate_clicked (ControlUI*, uint32_t parameter); + void astate_clicked (ControlUI*); void automation_state_changed (ControlUI*); void set_automation_state (ARDOUR::AutoState state, ControlUI* cui); - void start_touch (ControlUI*); - void stop_touch (ControlUI*); + void set_all_automation (ARDOUR::AutoState state); /* XXX: remove */ void print_parameter (char *buf, uint32_t len, uint32_t param); bool integer_printer (char* buf, Gtk::Adjustment &, ControlUI *); bool midinote_printer(char* buf, Gtk::Adjustment &, ControlUI *); -#ifdef LV2_SUPPORT - void patch_set_file (uint32_t patch_idx); - void patch_changed (uint32_t patch_idx); - Gtk::FileChooserButton **_fcb; -#endif + void set_property (const ARDOUR::ParameterDescriptor& desc, + Gtk::FileChooserButton* widget); + void property_changed (uint32_t key, const ARDOUR::Variant& value); + + typedef std::map PropertyControls; + PropertyControls _property_controls; }; class PluginUIWindow : public ArdourWindow