2010-03-10 12:31:16 -05:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2010-2018 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2011 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2014-2015 Ben Loftis <ben@harrisonconsoles.com>
|
|
|
|
* Copyright (C) 2014-2019 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2010-03-10 12:31:16 -05:00
|
|
|
|
2018-12-11 10:28:47 -05:00
|
|
|
#ifndef __gtk2_ardour_monitor_section_h__
|
|
|
|
#define __gtk2_ardour_monitor_section_h__
|
|
|
|
|
2010-03-10 12:31:16 -05:00
|
|
|
#include <gtkmm/box.h>
|
2016-03-15 12:41:14 -04:00
|
|
|
#include <gtkmm/eventbox.h>
|
2017-07-16 21:48:18 -04:00
|
|
|
#include <gtkmm/sizegroup.h>
|
|
|
|
#include <gtkmm/table.h>
|
|
|
|
#include <gtkmm/viewport.h>
|
2010-03-10 12:31:16 -05:00
|
|
|
|
2015-08-01 23:40:55 -04:00
|
|
|
#include "gtkmm2ext/bindings.h"
|
2010-03-10 12:31:16 -05:00
|
|
|
|
2017-07-15 11:38:28 -04:00
|
|
|
#include "widgets/ardour_button.h"
|
|
|
|
#include "widgets/ardour_knob.h"
|
|
|
|
#include "widgets/ardour_display.h"
|
|
|
|
|
2023-05-23 22:06:03 -04:00
|
|
|
#include "io_button.h"
|
2010-03-10 12:31:16 -05:00
|
|
|
#include "level_meter.h"
|
|
|
|
#include "route_ui.h"
|
|
|
|
|
2015-12-21 06:43:38 -05:00
|
|
|
#include "processor_box.h"
|
2017-05-05 07:31:49 -04:00
|
|
|
#include "processor_selection.h"
|
2015-12-21 06:43:38 -05:00
|
|
|
|
2017-07-16 22:55:52 -04:00
|
|
|
namespace ArdourWidgets {
|
2014-11-17 19:39:57 -05:00
|
|
|
class TearOff;
|
2010-03-10 12:31:16 -05:00
|
|
|
}
|
|
|
|
|
2019-05-24 18:12:55 -04:00
|
|
|
class PluginSelector;
|
|
|
|
|
2018-12-10 08:33:31 -05:00
|
|
|
class MonitorSection : public RouteUI, public Gtk::EventBox
|
2010-03-10 12:31:16 -05:00
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2018-12-11 10:28:47 -05:00
|
|
|
MonitorSection ();
|
2014-11-17 19:39:57 -05:00
|
|
|
~MonitorSection ();
|
2010-03-10 12:31:16 -05:00
|
|
|
|
2014-11-17 19:39:57 -05:00
|
|
|
void set_session (ARDOUR::Session*);
|
2010-03-10 12:31:16 -05:00
|
|
|
|
2017-07-16 22:55:52 -04:00
|
|
|
ArdourWidgets::TearOff& tearoff() const { return *_tearoff; }
|
2010-03-18 22:49:01 -04:00
|
|
|
|
2011-07-06 20:37:13 -04:00
|
|
|
std::string state_id() const;
|
|
|
|
|
2019-05-24 18:12:55 -04:00
|
|
|
PluginSelector* plugin_selector();
|
2015-12-21 06:43:38 -05:00
|
|
|
|
2018-12-11 10:28:47 -05:00
|
|
|
void use_others_actions ();
|
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2014-11-17 19:39:57 -05:00
|
|
|
Gtk::HBox hpacker;
|
2015-12-23 08:41:54 -05:00
|
|
|
Gtk::VBox vpacker;
|
2017-07-16 22:55:52 -04:00
|
|
|
ArdourWidgets::TearOff* _tearoff;
|
2010-03-10 12:31:16 -05:00
|
|
|
|
2011-11-02 09:55:06 -04:00
|
|
|
Gtk::HBox channel_table_packer;
|
|
|
|
Gtk::HBox table_hpacker;
|
2015-12-23 08:41:54 -05:00
|
|
|
Gtk::HBox master_packer;
|
2014-11-17 19:39:57 -05:00
|
|
|
Gtk::Table channel_table_header;
|
2017-01-19 09:42:27 -05:00
|
|
|
Gtk::Table *channel_table;
|
2011-11-02 09:55:06 -04:00
|
|
|
Gtk::ScrolledWindow channel_table_scroller;
|
2012-04-06 07:18:22 -04:00
|
|
|
Gtk::Viewport channel_table_viewport;
|
2011-11-02 09:55:06 -04:00
|
|
|
Glib::RefPtr<Gtk::SizeGroup> channel_size_group;
|
|
|
|
|
2014-11-17 19:39:57 -05:00
|
|
|
struct ChannelButtonSet {
|
2017-07-15 11:38:28 -04:00
|
|
|
ArdourWidgets::ArdourButton cut;
|
|
|
|
ArdourWidgets::ArdourButton dim;
|
|
|
|
ArdourWidgets::ArdourButton solo;
|
|
|
|
ArdourWidgets::ArdourButton invert;
|
2010-03-11 19:19:46 -05:00
|
|
|
|
2014-11-17 19:39:57 -05:00
|
|
|
ChannelButtonSet ();
|
|
|
|
};
|
2010-03-11 19:19:46 -05:00
|
|
|
|
2014-11-17 19:39:57 -05:00
|
|
|
typedef std::vector<ChannelButtonSet*> ChannelButtons;
|
|
|
|
ChannelButtons _channel_buttons;
|
2010-03-11 19:19:46 -05:00
|
|
|
|
2017-07-15 11:38:28 -04:00
|
|
|
ArdourWidgets::ArdourKnob* gain_control;
|
|
|
|
ArdourWidgets::ArdourKnob* dim_control;
|
|
|
|
ArdourWidgets::ArdourKnob* solo_boost_control;
|
|
|
|
ArdourWidgets::ArdourKnob* solo_cut_control;
|
2010-03-10 12:31:16 -05:00
|
|
|
|
2017-07-15 11:38:28 -04:00
|
|
|
ArdourWidgets::ArdourDisplay* gain_display;
|
|
|
|
ArdourWidgets::ArdourDisplay* dim_display;
|
|
|
|
ArdourWidgets::ArdourDisplay* solo_boost_display;
|
|
|
|
ArdourWidgets::ArdourDisplay* solo_cut_display;
|
2010-03-10 12:31:16 -05:00
|
|
|
|
2023-05-23 22:06:03 -04:00
|
|
|
IOButton _output_button;
|
2015-04-21 09:18:10 -04:00
|
|
|
|
2014-11-17 19:39:57 -05:00
|
|
|
void populate_buttons ();
|
|
|
|
void map_state ();
|
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::MonitorProcessor> _monitor;
|
2010-03-10 12:31:16 -05:00
|
|
|
|
2018-12-10 18:42:35 -05:00
|
|
|
Glib::RefPtr<Gtk::ActionGroup> monitor_actions;
|
|
|
|
Glib::RefPtr<Gtk::ActionGroup> solo_actions;
|
|
|
|
void register_actions ();
|
2016-11-10 21:54:50 -05:00
|
|
|
|
2014-11-17 19:39:57 -05:00
|
|
|
void cut_channel (uint32_t);
|
|
|
|
void dim_channel (uint32_t);
|
|
|
|
void solo_channel (uint32_t);
|
|
|
|
void invert_channel (uint32_t);
|
|
|
|
void dim_all ();
|
|
|
|
void cut_all ();
|
|
|
|
void mono ();
|
|
|
|
void toggle_exclusive_solo ();
|
2011-11-02 12:46:49 -04:00
|
|
|
void set_button_names () {}
|
2014-11-17 19:39:57 -05:00
|
|
|
void toggle_mute_overrides_solo ();
|
|
|
|
void dim_level_changed ();
|
|
|
|
void solo_boost_changed ();
|
|
|
|
void gain_value_changed ();
|
|
|
|
|
2017-07-15 11:38:28 -04:00
|
|
|
ArdourWidgets::ArdourButton solo_in_place_button;
|
|
|
|
ArdourWidgets::ArdourButton afl_button;
|
|
|
|
ArdourWidgets::ArdourButton pfl_button;
|
2015-12-19 18:16:42 -05:00
|
|
|
Gtk::VBox solo_model_box;
|
2014-11-17 19:39:57 -05:00
|
|
|
|
|
|
|
void solo_use_in_place ();
|
|
|
|
void solo_use_afl ();
|
|
|
|
void solo_use_pfl ();
|
|
|
|
|
2017-07-15 11:38:28 -04:00
|
|
|
ArdourWidgets::ArdourButton cut_all_button;
|
|
|
|
ArdourWidgets::ArdourButton dim_all_button;
|
|
|
|
ArdourWidgets::ArdourButton mono_button;
|
|
|
|
ArdourWidgets::ArdourButton rude_solo_button;
|
|
|
|
ArdourWidgets::ArdourButton rude_iso_button;
|
|
|
|
ArdourWidgets::ArdourButton rude_audition_button;
|
|
|
|
ArdourWidgets::ArdourButton exclusive_solo_button;
|
|
|
|
ArdourWidgets::ArdourButton solo_mute_override_button;
|
|
|
|
ArdourWidgets::ArdourButton toggle_processorbox_button;
|
2014-11-17 19:39:57 -05:00
|
|
|
|
|
|
|
void do_blink (bool);
|
|
|
|
void solo_blink (bool);
|
|
|
|
void audition_blink (bool);
|
|
|
|
bool cancel_solo (GdkEventButton*);
|
|
|
|
bool cancel_isolate (GdkEventButton*);
|
|
|
|
bool cancel_audition (GdkEventButton*);
|
|
|
|
void update_solo_model ();
|
|
|
|
void parameter_changed (std::string);
|
|
|
|
void isolated_changed ();
|
|
|
|
|
|
|
|
PBD::ScopedConnection config_connection;
|
2018-12-16 12:50:29 -05:00
|
|
|
PBD::ScopedConnectionList connections;
|
|
|
|
PBD::ScopedConnectionList route_connections;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2011-11-19 12:04:48 -05:00
|
|
|
bool _inhibit_solo_model_update;
|
2014-11-17 19:39:57 -05:00
|
|
|
|
|
|
|
void assign_controllables ();
|
2018-12-16 12:50:29 -05:00
|
|
|
void unassign_controllables ();
|
2015-12-21 06:43:38 -05:00
|
|
|
|
2015-12-27 13:11:07 -05:00
|
|
|
void update_processor_box ();
|
2015-12-23 08:41:54 -05:00
|
|
|
|
2016-06-05 16:15:35 -04:00
|
|
|
void route_property_changed (const PBD::PropertyChange&) {}
|
|
|
|
|
2015-12-21 06:43:38 -05:00
|
|
|
ProcessorBox* insert_box;
|
2017-05-05 07:31:49 -04:00
|
|
|
ProcessorSelection _rr_selection;
|
2023-02-16 18:33:28 -05:00
|
|
|
void help_count_processors (std::weak_ptr<ARDOUR::Processor> p, uint32_t* cnt) const;
|
2015-12-23 08:41:54 -05:00
|
|
|
uint32_t count_processors ();
|
|
|
|
|
|
|
|
void processors_changed (ARDOUR::RouteProcessorChange);
|
2018-12-12 11:12:40 -05:00
|
|
|
Glib::RefPtr<Gtk::ToggleAction> proctoggle;
|
2015-12-23 08:41:54 -05:00
|
|
|
bool _ui_initialized;
|
2015-08-01 23:40:55 -04:00
|
|
|
|
2018-12-10 18:42:35 -05:00
|
|
|
Gtkmm2ext::Bindings* bindings;
|
2015-08-10 14:31:59 -04:00
|
|
|
|
2018-12-10 18:42:35 -05:00
|
|
|
void load_bindings ();
|
2016-03-15 12:41:14 -04:00
|
|
|
bool enter_handler (GdkEventCrossing*);
|
|
|
|
bool leave_handler (GdkEventCrossing*);
|
2018-12-11 10:28:47 -05:00
|
|
|
|
|
|
|
void toggle_use_monitor_section ();
|
2018-12-11 12:25:31 -05:00
|
|
|
void drop_route ();
|
2010-03-10 12:31:16 -05:00
|
|
|
};
|
2018-12-11 10:28:47 -05:00
|
|
|
|
|
|
|
#endif /* __gtk2_ardour_monitor_section_h__ */
|