2019-01-18 13:22:54 -05:00
|
|
|
/*
|
2020-05-07 21:38:42 -04:00
|
|
|
* Copyright (C) 2018-2020 Len Ovens
|
2020-05-07 21:19:17 -04:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2019-01-18 13:22:54 -05:00
|
|
|
|
2021-03-25 21:48:04 -04:00
|
|
|
#ifndef _gtkardour_foldback_strip_
|
|
|
|
#define _gtkardour_foldback_strip_
|
2019-01-18 13:22:54 -05:00
|
|
|
|
|
|
|
#include <cmath>
|
2021-03-25 21:48:04 -04:00
|
|
|
#include <vector>
|
2019-01-18 13:22:54 -05:00
|
|
|
|
|
|
|
#include <gtkmm/adjustment.h>
|
|
|
|
#include <gtkmm/box.h>
|
2021-03-25 21:48:04 -04:00
|
|
|
#include <gtkmm/button.h>
|
2019-01-18 13:22:54 -05:00
|
|
|
#include <gtkmm/eventbox.h>
|
|
|
|
#include <gtkmm/frame.h>
|
|
|
|
#include <gtkmm/label.h>
|
|
|
|
#include <gtkmm/menu.h>
|
2019-09-04 00:16:42 -04:00
|
|
|
#include <gtkmm/scrolledwindow.h>
|
2019-01-18 13:22:54 -05:00
|
|
|
#include <gtkmm/sizegroup.h>
|
|
|
|
#include <gtkmm/textview.h>
|
|
|
|
#include <gtkmm/togglebutton.h>
|
|
|
|
|
|
|
|
#include "pbd/stateful.h"
|
|
|
|
|
|
|
|
#include "ardour/ardour.h"
|
2020-05-07 20:12:36 -04:00
|
|
|
#include "ardour/meter.h"
|
2021-03-25 21:48:04 -04:00
|
|
|
#include "ardour/processor.h"
|
|
|
|
#include "ardour/types.h"
|
2019-01-18 13:22:54 -05:00
|
|
|
|
|
|
|
#include "pbd/fastlog.h"
|
|
|
|
|
|
|
|
#include "widgets/ardour_button.h"
|
|
|
|
#include "widgets/ardour_knob.h"
|
2020-05-07 20:12:36 -04:00
|
|
|
#include "widgets/fastmeter.h"
|
2019-01-18 13:22:54 -05:00
|
|
|
|
|
|
|
#include "enums.h"
|
2021-03-25 21:33:56 -04:00
|
|
|
#include "io_button.h"
|
|
|
|
#include "panner_ui.h"
|
2019-01-25 15:22:49 -05:00
|
|
|
#include "processor_box.h"
|
|
|
|
#include "processor_selection.h"
|
2021-03-25 21:33:56 -04:00
|
|
|
#include "route_ui.h"
|
2019-01-25 15:22:49 -05:00
|
|
|
|
2019-01-18 13:22:54 -05:00
|
|
|
namespace ARDOUR {
|
|
|
|
class Route;
|
|
|
|
class Send;
|
|
|
|
class Processor;
|
|
|
|
class Session;
|
|
|
|
class PortInsert;
|
|
|
|
class Bundle;
|
|
|
|
class Plugin;
|
2020-05-07 20:12:36 -04:00
|
|
|
class PeakMeter;
|
2019-01-18 13:22:54 -05:00
|
|
|
}
|
2021-03-25 21:48:04 -04:00
|
|
|
|
2019-01-18 13:22:54 -05:00
|
|
|
namespace Gtk {
|
|
|
|
class Window;
|
|
|
|
class Style;
|
|
|
|
}
|
|
|
|
|
|
|
|
class Mixer_UI;
|
|
|
|
class MotionController;
|
|
|
|
class RouteGroupMenu;
|
|
|
|
class ArdourWindow;
|
|
|
|
|
2019-08-21 23:55:51 -04:00
|
|
|
class FoldbackSend : public Gtk::VBox
|
|
|
|
{
|
|
|
|
public:
|
2023-02-16 18:33:28 -05:00
|
|
|
FoldbackSend (std::shared_ptr<ARDOUR::Send>, std::shared_ptr<ARDOUR::Route> sr, std::shared_ptr<ARDOUR::Route> fr, uint32_t wd);
|
2019-08-21 23:55:51 -04:00
|
|
|
~FoldbackSend ();
|
|
|
|
|
|
|
|
private:
|
2021-03-25 21:48:04 -04:00
|
|
|
void led_clicked (GdkEventButton*);
|
2021-08-17 12:58:54 -04:00
|
|
|
bool pan_knob_press (GdkEventButton*);
|
2021-03-25 21:17:09 -04:00
|
|
|
bool button_press (GdkEventButton*);
|
|
|
|
bool button_release (GdkEventButton*);
|
2019-09-07 17:51:01 -04:00
|
|
|
void set_gain (float new_gain);
|
2020-08-09 12:10:24 -04:00
|
|
|
void set_send_position (bool post);
|
2019-09-07 17:51:01 -04:00
|
|
|
void remove_me ();
|
2019-09-10 22:26:00 -04:00
|
|
|
void route_property_changed (const PBD::PropertyChange&);
|
|
|
|
void name_changed ();
|
2019-08-21 23:55:51 -04:00
|
|
|
void send_state_changed ();
|
2021-08-17 12:58:54 -04:00
|
|
|
void send_pan_changed ();
|
2019-08-21 23:55:51 -04:00
|
|
|
void level_adjusted ();
|
|
|
|
void level_changed ();
|
|
|
|
void set_tooltip ();
|
|
|
|
|
2021-03-25 21:48:04 -04:00
|
|
|
Gtk::Menu* build_send_menu ();
|
|
|
|
|
|
|
|
ArdourWidgets::ArdourButton _button;
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::Send> _send;
|
|
|
|
std::shared_ptr<ARDOUR::Route> _send_route;
|
|
|
|
std::shared_ptr<ARDOUR::Route> _foldback_route;
|
|
|
|
std::shared_ptr<ARDOUR::Processor> _send_proc;
|
|
|
|
std::shared_ptr<ARDOUR::Delivery> _send_del;
|
2021-03-25 21:48:04 -04:00
|
|
|
uint32_t _width;
|
|
|
|
ArdourWidgets::ArdourKnob _pan_control;
|
|
|
|
Gtk::Adjustment _adjustment;
|
|
|
|
ArdourWidgets::HSliderController _slider;
|
|
|
|
bool _ignore_ui_adjustment;
|
|
|
|
Gtkmm2ext::PersistentTooltip _slider_persistant_tooltip;
|
|
|
|
PBD::ScopedConnectionList _connections;
|
2019-08-21 23:55:51 -04:00
|
|
|
};
|
|
|
|
|
2019-08-27 13:15:39 -04:00
|
|
|
class FoldbackStrip : public RouteUI, public Gtk::EventBox
|
2019-01-18 13:22:54 -05:00
|
|
|
{
|
|
|
|
public:
|
2023-02-16 18:33:28 -05:00
|
|
|
FoldbackStrip (Mixer_UI&, ARDOUR::Session*, std::shared_ptr<ARDOUR::Route>);
|
2019-01-18 13:22:54 -05:00
|
|
|
~FoldbackStrip ();
|
|
|
|
|
2021-03-25 21:48:04 -04:00
|
|
|
std::string name () const;
|
|
|
|
|
|
|
|
PluginSelector* plugin_selector ();
|
2019-01-18 13:22:54 -05:00
|
|
|
|
2020-05-07 20:12:36 -04:00
|
|
|
void fast_update ();
|
2023-02-16 18:33:28 -05:00
|
|
|
void set_route (std::shared_ptr<ARDOUR::Route>);
|
2019-01-18 13:22:54 -05:00
|
|
|
void set_button_names ();
|
|
|
|
|
2021-03-25 21:48:04 -04:00
|
|
|
PannerUI& panner_ui ()
|
|
|
|
{
|
2021-03-27 13:26:09 -04:00
|
|
|
return _panners;
|
2021-03-25 21:48:04 -04:00
|
|
|
}
|
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::Stripable> stripable () const
|
2021-03-25 21:48:04 -04:00
|
|
|
{
|
|
|
|
return RouteUI::stripable ();
|
2021-03-25 16:38:10 -04:00
|
|
|
}
|
|
|
|
|
2019-01-18 13:22:54 -05:00
|
|
|
/** The delivery that we are handling the level for with our fader has changed */
|
2023-02-16 18:33:28 -05:00
|
|
|
PBD::Signal1<void, std::weak_ptr<ARDOUR::Delivery> > DeliveryChanged;
|
2019-01-18 13:22:54 -05:00
|
|
|
|
2021-03-25 21:48:04 -04:00
|
|
|
static PBD::Signal1<void, FoldbackStrip*> CatchDeletion;
|
2019-01-18 13:22:54 -05:00
|
|
|
|
|
|
|
void route_active_changed ();
|
|
|
|
|
2019-01-25 15:22:49 -05:00
|
|
|
void deselect_all_processors ();
|
2019-01-18 13:22:54 -05:00
|
|
|
|
2021-03-27 10:52:14 -04:00
|
|
|
protected:
|
|
|
|
void create_sends (ARDOUR::Placement, bool) {}
|
|
|
|
void create_selected_sends (ARDOUR::Placement, bool);
|
|
|
|
|
2019-01-18 13:22:54 -05:00
|
|
|
private:
|
|
|
|
void init ();
|
|
|
|
void setup_comment_button ();
|
2021-03-27 14:33:46 -04:00
|
|
|
void update_sensitivity ();
|
|
|
|
|
2021-03-25 21:48:04 -04:00
|
|
|
void remove_current_fb ();
|
2021-03-27 14:33:46 -04:00
|
|
|
void duplicate_current_fb ();
|
|
|
|
|
|
|
|
void hide_clicked ();
|
2021-03-25 16:38:10 -04:00
|
|
|
void cycle_foldbacks (bool next);
|
2021-03-25 21:48:04 -04:00
|
|
|
bool name_button_button_press (GdkEventButton*);
|
2021-03-27 18:14:19 -04:00
|
|
|
bool number_button_press (GdkEventButton*);
|
2021-03-27 13:47:01 -04:00
|
|
|
bool send_scroller_press (GdkEventButton*);
|
2021-03-27 14:33:46 -04:00
|
|
|
bool fb_strip_enter_event (GdkEventCrossing*);
|
|
|
|
|
|
|
|
void clear_send_box ();
|
|
|
|
void update_send_box ();
|
2019-01-18 13:22:54 -05:00
|
|
|
void name_changed ();
|
2021-03-27 18:14:19 -04:00
|
|
|
void route_color_changed ();
|
2021-03-27 14:33:46 -04:00
|
|
|
void connect_to_pan ();
|
|
|
|
void io_changed_proxy ();
|
2021-03-26 18:01:38 -04:00
|
|
|
void reset_strip_style ();
|
2021-03-27 14:33:46 -04:00
|
|
|
void update_panner_choices ();
|
|
|
|
void update_output_display ();
|
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
void spill_change (std::shared_ptr<ARDOUR::Stripable>);
|
2021-03-27 14:33:46 -04:00
|
|
|
void route_property_changed (const PBD::PropertyChange&);
|
|
|
|
void presentation_info_changed (PBD::PropertyChange const&);
|
2019-01-18 13:22:54 -05:00
|
|
|
|
2021-03-25 21:48:04 -04:00
|
|
|
Gtk::Menu* build_route_ops_menu ();
|
|
|
|
Gtk::Menu* build_route_select_menu ();
|
2019-01-18 13:22:54 -05:00
|
|
|
|
2021-03-25 21:48:04 -04:00
|
|
|
Mixer_UI& _mixer;
|
2021-03-27 13:26:09 -04:00
|
|
|
bool _showing_sends;
|
|
|
|
uint32_t _width;
|
|
|
|
|
|
|
|
Gtk::EventBox _spacer;
|
|
|
|
Gtk::VBox _send_display;
|
|
|
|
Gtk::ScrolledWindow _send_scroller;
|
|
|
|
Gtk::Frame _global_frame;
|
|
|
|
Gtk::VBox _global_vpacker;
|
|
|
|
Gtk::HBox _prev_next_box;
|
|
|
|
Gtk::HBox _level_box;
|
|
|
|
ProcessorBox* _insert_box;
|
|
|
|
ProcessorSelection _pr_selection;
|
|
|
|
PannerUI _panners;
|
|
|
|
IOButton _output_button;
|
|
|
|
|
2021-03-27 18:14:19 -04:00
|
|
|
ArdourWidgets::ArdourButton _number_label;
|
2021-03-27 13:26:09 -04:00
|
|
|
ArdourWidgets::ArdourButton _name_button;
|
2021-03-25 21:48:04 -04:00
|
|
|
ArdourWidgets::ArdourButton _previous_button;
|
|
|
|
ArdourWidgets::ArdourButton _next_button;
|
|
|
|
ArdourWidgets::ArdourButton _hide_button;
|
|
|
|
ArdourWidgets::ArdourButton _comment_button;
|
2021-03-27 13:26:09 -04:00
|
|
|
ArdourWidgets::ArdourKnob _level_control;
|
2021-03-25 21:48:04 -04:00
|
|
|
ArdourWidgets::FastMeter* _meter;
|
|
|
|
|
2021-03-26 18:01:38 -04:00
|
|
|
PBD::ScopedConnectionList _send_connections;
|
2019-01-18 13:22:54 -05:00
|
|
|
};
|
|
|
|
|
2021-03-25 21:48:04 -04:00
|
|
|
#endif
|