2016-01-24 21:27:25 -05:00
|
|
|
/*
|
|
|
|
Copyright (C) 2016 Paul Davis
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ardour_vca_master_strip__
|
|
|
|
#define __ardour_vca_master_strip__
|
|
|
|
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
|
|
|
|
#include <gtkmm/box.h>
|
2016-03-04 14:53:13 -05:00
|
|
|
#include <gtkmm/menuitem.h>
|
2016-01-24 21:27:25 -05:00
|
|
|
|
|
|
|
#include "ardour_button.h"
|
|
|
|
#include "axis_view.h"
|
|
|
|
#include "gain_meter.h"
|
|
|
|
|
|
|
|
namespace ARDOUR {
|
2016-01-25 12:51:29 -05:00
|
|
|
class GainControl;
|
|
|
|
class VCA;
|
2016-01-24 21:27:25 -05:00
|
|
|
}
|
|
|
|
|
2016-03-08 14:57:26 -05:00
|
|
|
class FloatingTextEntry;
|
|
|
|
|
2016-03-03 11:47:01 -05:00
|
|
|
class VCAMasterStrip : public AxisView, public Gtk::EventBox
|
2016-01-24 21:27:25 -05:00
|
|
|
{
|
2016-01-25 12:51:29 -05:00
|
|
|
public:
|
|
|
|
VCAMasterStrip (ARDOUR::Session*, boost::shared_ptr<ARDOUR::VCA>);
|
2016-04-29 11:07:57 -04:00
|
|
|
~VCAMasterStrip ();
|
2016-01-24 21:27:25 -05:00
|
|
|
|
2016-01-25 12:51:29 -05:00
|
|
|
std::string name() const;
|
2016-01-24 21:27:25 -05:00
|
|
|
std::string state_id() const { return "VCAMasterStrip"; }
|
2016-02-29 14:45:03 -05:00
|
|
|
boost::shared_ptr<ARDOUR::VCA> vca() const { return _vca; }
|
2016-01-25 12:51:29 -05:00
|
|
|
|
2016-04-23 18:25:49 -04:00
|
|
|
static PBD::Signal1<void,VCAMasterStrip*> CatchDeletion;
|
|
|
|
|
|
|
|
private:
|
2016-02-29 14:45:03 -05:00
|
|
|
boost::shared_ptr<ARDOUR::VCA> _vca;
|
2016-01-24 21:27:25 -05:00
|
|
|
GainMeter gain_meter;
|
2016-03-03 11:47:01 -05:00
|
|
|
|
|
|
|
Gtk::Frame global_frame;
|
|
|
|
Gtk::VBox global_vpacker;
|
|
|
|
Gtk::HBox top_padding;
|
|
|
|
Gtk::HBox bottom_padding;
|
2016-03-04 14:15:37 -05:00
|
|
|
Gtk::HBox width_hide_box;
|
|
|
|
Gtk::HBox solo_mute_box;
|
2016-03-03 11:47:01 -05:00
|
|
|
ArdourButton width_button;
|
|
|
|
ArdourButton color_button;
|
|
|
|
ArdourButton hide_button;
|
|
|
|
ArdourButton number_label;
|
2016-03-04 14:15:37 -05:00
|
|
|
ArdourButton solo_button;
|
|
|
|
ArdourButton mute_button;
|
|
|
|
ArdourButton assign_button;
|
2016-05-19 14:53:41 -04:00
|
|
|
ArdourButton drop_button;
|
2016-03-08 22:08:51 -05:00
|
|
|
Gtk::Menu* context_menu;
|
2016-03-04 14:15:37 -05:00
|
|
|
PBD::ScopedConnectionList vca_connections;
|
2016-05-16 07:30:28 -04:00
|
|
|
Gtk::MessageDialog* delete_dialog;
|
2016-05-18 15:06:01 -04:00
|
|
|
ArdourButton vertical_button;
|
2016-03-03 11:47:01 -05:00
|
|
|
|
2016-05-18 15:56:52 -04:00
|
|
|
void spill ();
|
|
|
|
void spill_change (boost::shared_ptr<ARDOUR::VCA>);
|
2016-03-03 11:47:01 -05:00
|
|
|
void hide_clicked();
|
|
|
|
bool width_button_pressed (GdkEventButton *);
|
2016-03-03 13:28:42 -05:00
|
|
|
void set_selected (bool);
|
2016-03-04 14:15:37 -05:00
|
|
|
bool solo_release (GdkEventButton*);
|
|
|
|
bool mute_release (GdkEventButton*);
|
|
|
|
void set_width (bool wide);
|
|
|
|
void set_solo_text ();
|
|
|
|
void solo_changed ();
|
|
|
|
void mute_changed ();
|
2016-03-04 14:53:13 -05:00
|
|
|
void vca_menu_toggle (Gtk::CheckMenuItem* menuitem, uint32_t n);
|
2016-04-24 21:48:05 -04:00
|
|
|
void unassign ();
|
2016-03-04 14:53:13 -05:00
|
|
|
bool vca_button_release (GdkEventButton*);
|
2016-03-04 16:44:46 -05:00
|
|
|
void update_vca_display ();
|
2016-05-18 14:15:39 -04:00
|
|
|
void start_name_edit ();
|
2016-05-21 19:17:11 -04:00
|
|
|
void finish_name_edit (std::string, int);
|
2016-05-21 08:07:29 -04:00
|
|
|
bool vertical_button_press (GdkEventButton*);
|
2016-03-08 14:57:26 -05:00
|
|
|
void vca_property_changed (PBD::PropertyChange const & what_changed);
|
|
|
|
void update_vca_name ();
|
2016-03-08 22:08:51 -05:00
|
|
|
void build_context_menu ();
|
2016-05-16 07:30:28 -04:00
|
|
|
void hide_confirmation (int);
|
2016-04-23 18:25:49 -04:00
|
|
|
void self_delete ();
|
2016-05-18 22:02:14 -04:00
|
|
|
void remove ();
|
2016-05-19 14:53:41 -04:00
|
|
|
void drop_button_press ();
|
|
|
|
void drop_all_slaves ();
|
2016-05-21 16:54:34 -04:00
|
|
|
|
|
|
|
void parameter_changed (std::string const& p);
|
|
|
|
void set_button_names ();
|
2016-01-24 21:27:25 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __ardour_vca_master_strip__ */
|