2016-01-24 21:27:25 -05:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2016-2017 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2016-2017 Robin Gareus <robin@gareus.org>
|
|
|
|
* Copyright (C) 2017-2018 Ben Loftis <ben@harrisonconsoles.com>
|
|
|
|
*
|
|
|
|
* 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.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2016-01-24 21:27:25 -05:00
|
|
|
|
|
|
|
#ifndef __ardour_vca_master_strip__
|
|
|
|
#define __ardour_vca_master_strip__
|
|
|
|
|
2023-02-16 12:59:41 -05:00
|
|
|
#include <memory>
|
2016-01-24 21:27:25 -05:00
|
|
|
|
2017-07-16 21:48:18 -04:00
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/colorselection.h>
|
|
|
|
#include <gtkmm/menuitem.h>
|
|
|
|
#include <gtkmm/messagedialog.h>
|
2017-07-15 11:38:28 -04:00
|
|
|
|
|
|
|
#include "widgets/ardour_button.h"
|
2016-01-24 21:27:25 -05:00
|
|
|
|
|
|
|
#include "axis_view.h"
|
2016-06-09 13:12:04 -04:00
|
|
|
#include "control_slave_ui.h"
|
2016-01-24 21:27:25 -05:00
|
|
|
#include "gain_meter.h"
|
2017-03-10 17:51:39 -05:00
|
|
|
#include "stripable_colorpicker.h"
|
2016-01-24 21:27:25 -05:00
|
|
|
|
|
|
|
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
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2023-02-16 18:33:28 -05:00
|
|
|
VCAMasterStrip (ARDOUR::Session*, std::shared_ptr<ARDOUR::VCA>);
|
2016-04-29 11:07:57 -04:00
|
|
|
~VCAMasterStrip ();
|
2016-01-24 21:27:25 -05:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::Stripable> stripable() const;
|
2016-07-06 13:37:30 -04:00
|
|
|
ARDOUR::PresentationInfo const & presentation_info () const;
|
|
|
|
|
2016-01-25 12:51:29 -05:00
|
|
|
std::string name() const;
|
2016-06-05 15:39:22 -04:00
|
|
|
Gdk::Color color () const;
|
2016-06-08 11:02:41 -04:00
|
|
|
std::string state_id() const;
|
2023-02-16 18:33:28 -05:00
|
|
|
std::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;
|
|
|
|
|
2016-06-09 16:03:07 -04:00
|
|
|
bool marked_for_display () const;
|
|
|
|
bool set_marked_for_display (bool);
|
2016-06-05 15:39:22 -04:00
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::VCA> _vca;
|
2016-01-24 21:27:25 -05:00
|
|
|
GainMeter gain_meter;
|
2016-03-03 11:47:01 -05:00
|
|
|
|
2017-09-18 14:45:56 -04:00
|
|
|
Gtk::Frame global_frame;
|
2017-07-15 11:38:28 -04:00
|
|
|
Gtk::VBox global_vpacker;
|
|
|
|
Gtk::HBox bottom_padding;
|
|
|
|
Gtk::HBox solo_mute_box;
|
|
|
|
ArdourWidgets::ArdourButton width_button;
|
|
|
|
ArdourWidgets::ArdourButton color_button;
|
|
|
|
ArdourWidgets::ArdourButton hide_button;
|
|
|
|
ArdourWidgets::ArdourButton number_label;
|
|
|
|
ArdourWidgets::ArdourButton solo_button;
|
|
|
|
ArdourWidgets::ArdourButton mute_button;
|
|
|
|
Gtk::Menu* context_menu;
|
|
|
|
Gtk::MessageDialog* delete_dialog;
|
|
|
|
ArdourWidgets::ArdourButton vertical_button;
|
|
|
|
ControlSlaveUI control_slave_ui;
|
|
|
|
PBD::ScopedConnectionList vca_connections;
|
2016-03-03 11:47:01 -05:00
|
|
|
|
2016-05-18 15:56:52 -04:00
|
|
|
void spill ();
|
2023-02-16 18:33:28 -05:00
|
|
|
void spill_change (std::shared_ptr<ARDOUR::Stripable>);
|
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-04-24 21:48:05 -04:00
|
|
|
void unassign ();
|
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);
|
2023-03-30 12:16:17 -04:00
|
|
|
bool vertical_button_release (GdkEventButton*);
|
2017-01-05 09:08:42 -05:00
|
|
|
bool number_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_all_slaves ();
|
2017-02-02 12:02:10 -05:00
|
|
|
void assign_all_selected ();
|
|
|
|
void unassign_all_selected ();
|
2016-05-21 16:54:34 -04:00
|
|
|
|
|
|
|
void parameter_changed (std::string const& p);
|
|
|
|
void set_button_names ();
|
2016-12-20 21:52:58 -05:00
|
|
|
void update_bottom_padding ();
|
2016-06-09 15:35:56 -04:00
|
|
|
|
|
|
|
void start_color_edit ();
|
2017-03-10 17:51:39 -05:00
|
|
|
StripableColorDialog _color_picker;
|
2016-01-24 21:27:25 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __ardour_vca_master_strip__ */
|