2 Copyright (C) 2016 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #ifndef __ardour_vca_master_strip__
20 #define __ardour_vca_master_strip__
22 #include <boost/shared_ptr.hpp>
24 #include <gtkmm/box.h>
25 #include <gtkmm/colorselection.h>
26 #include <gtkmm/menuitem.h>
27 #include <gtkmm/messagedialog.h>
29 #include "widgets/ardour_button.h"
31 #include "axis_view.h"
32 #include "control_slave_ui.h"
33 #include "gain_meter.h"
34 #include "stripable_colorpicker.h"
41 class FloatingTextEntry;
43 class VCAMasterStrip : public AxisView, public Gtk::EventBox
46 VCAMasterStrip (ARDOUR::Session*, boost::shared_ptr<ARDOUR::VCA>);
49 boost::shared_ptr<ARDOUR::Stripable> stripable() const;
50 ARDOUR::PresentationInfo const & presentation_info () const;
52 std::string name() const;
53 Gdk::Color color () const;
54 std::string state_id() const;
55 boost::shared_ptr<ARDOUR::VCA> vca() const { return _vca; }
57 static PBD::Signal1<void,VCAMasterStrip*> CatchDeletion;
59 bool marked_for_display () const;
60 bool set_marked_for_display (bool);
63 boost::shared_ptr<ARDOUR::VCA> _vca;
66 Gtk::Frame global_frame;
67 Gtk::VBox global_vpacker;
68 Gtk::HBox bottom_padding;
69 Gtk::HBox solo_mute_box;
70 ArdourWidgets::ArdourButton width_button;
71 ArdourWidgets::ArdourButton color_button;
72 ArdourWidgets::ArdourButton hide_button;
73 ArdourWidgets::ArdourButton number_label;
74 ArdourWidgets::ArdourButton solo_button;
75 ArdourWidgets::ArdourButton mute_button;
76 Gtk::Menu* context_menu;
77 Gtk::MessageDialog* delete_dialog;
78 ArdourWidgets::ArdourButton vertical_button;
79 ControlSlaveUI control_slave_ui;
80 PBD::ScopedConnectionList vca_connections;
83 void spill_change (boost::shared_ptr<ARDOUR::Stripable>);
85 bool width_button_pressed (GdkEventButton *);
86 void set_selected (bool);
87 bool solo_release (GdkEventButton*);
88 bool mute_release (GdkEventButton*);
89 void set_width (bool wide);
90 void set_solo_text ();
94 void start_name_edit ();
95 void finish_name_edit (std::string, int);
96 bool vertical_button_press (GdkEventButton*);
97 bool number_button_press (GdkEventButton*);
98 void vca_property_changed (PBD::PropertyChange const & what_changed);
99 void update_vca_name ();
100 void build_context_menu ();
101 void hide_confirmation (int);
104 void drop_all_slaves ();
105 void assign_all_selected ();
106 void unassign_all_selected ();
108 void parameter_changed (std::string const& p);
109 void set_button_names ();
110 void update_bottom_padding ();
112 void start_color_edit ();
113 StripableColorDialog _color_picker;
117 #endif /* __ardour_vca_master_strip__ */