2021-11-10 19:15:00 -05:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2021 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ardour_trigger_strip__
|
|
|
|
#define __ardour_trigger_strip__
|
|
|
|
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/eventbox.h>
|
|
|
|
#include <gtkmm/frame.h>
|
|
|
|
|
|
|
|
#include "pbd/stateful.h"
|
|
|
|
|
|
|
|
#include "ardour/ardour.h"
|
|
|
|
#include "ardour/types.h"
|
|
|
|
|
|
|
|
#include "widgets/ardour_button.h"
|
|
|
|
|
2021-12-02 20:24:58 -05:00
|
|
|
#include "automation_controller.h"
|
2021-11-10 19:15:00 -05:00
|
|
|
#include "axis_view.h"
|
2021-12-05 11:56:42 -05:00
|
|
|
#include "fitted_canvas_widget.h"
|
2021-12-02 16:21:28 -05:00
|
|
|
#include "level_meter.h"
|
|
|
|
#include "panner_ui.h"
|
2021-11-10 19:15:00 -05:00
|
|
|
#include "processor_box.h"
|
|
|
|
#include "processor_selection.h"
|
|
|
|
#include "route_ui.h"
|
|
|
|
#include "triggerbox_ui.h"
|
|
|
|
|
|
|
|
class PluginSelector;
|
2021-12-07 16:47:42 -05:00
|
|
|
class TriggerMaster;
|
2021-11-10 19:15:00 -05:00
|
|
|
|
|
|
|
class TriggerStrip : public AxisView, public RouteUI, public Gtk::EventBox
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TriggerStrip (ARDOUR::Session*, boost::shared_ptr<ARDOUR::Route>);
|
|
|
|
~TriggerStrip ();
|
|
|
|
|
|
|
|
/* AxisView */
|
|
|
|
std::string name () const;
|
|
|
|
Gdk::Color color () const;
|
|
|
|
|
|
|
|
boost::shared_ptr<ARDOUR::Stripable> stripable () const
|
|
|
|
{
|
|
|
|
return RouteUI::stripable ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void set_session (ARDOUR::Session* s);
|
|
|
|
|
|
|
|
void fast_update ();
|
|
|
|
|
|
|
|
static PBD::Signal1<void, TriggerStrip*> CatchDeletion;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void self_delete ();
|
|
|
|
|
|
|
|
//void on_size_allocate (Gtk::Allocation&);
|
|
|
|
//void on_size_request (Gtk::Requisition*);
|
|
|
|
|
|
|
|
/* AxisView */
|
|
|
|
std::string state_id () const;
|
|
|
|
|
|
|
|
/* route UI */
|
|
|
|
void set_button_names ();
|
|
|
|
#if 0
|
|
|
|
void route_rec_enable_changed ();
|
|
|
|
void blink_rec_display (bool onoff);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
private:
|
|
|
|
void init ();
|
|
|
|
|
|
|
|
/* RouteUI */
|
2021-12-02 16:21:28 -05:00
|
|
|
void set_route (boost::shared_ptr<ARDOUR::Route>);
|
2021-11-10 19:15:00 -05:00
|
|
|
void route_property_changed (const PBD::PropertyChange&);
|
|
|
|
void route_color_changed ();
|
|
|
|
void update_sensitivity ();
|
|
|
|
void parameter_changed (std::string);
|
2021-12-02 16:21:28 -05:00
|
|
|
void route_active_changed ();
|
2021-11-10 19:15:00 -05:00
|
|
|
void map_frozen ();
|
|
|
|
|
|
|
|
/* Callbacks */
|
2021-12-02 16:21:28 -05:00
|
|
|
void io_changed ();
|
2021-11-10 19:15:00 -05:00
|
|
|
void name_changed ();
|
|
|
|
void name_button_resized (Gtk::Allocation&);
|
|
|
|
bool name_button_press (GdkEventButton*);
|
2022-01-01 09:38:59 -05:00
|
|
|
void build_route_ops_menu ();
|
2021-12-02 16:21:28 -05:00
|
|
|
void reset_peak_display ();
|
|
|
|
void reset_route_peak_display (ARDOUR::Route*);
|
|
|
|
void reset_group_peak_display (ARDOUR::RouteGroup*);
|
2021-11-10 19:15:00 -05:00
|
|
|
|
|
|
|
/* Plugin related */
|
|
|
|
PluginSelector* plugin_selector ();
|
|
|
|
void hide_processor_editor (boost::weak_ptr<ARDOUR::Processor>);
|
|
|
|
|
2021-12-02 16:21:28 -05:00
|
|
|
/* Panner */
|
|
|
|
void connect_to_pan ();
|
|
|
|
void update_panner_choices ();
|
|
|
|
|
|
|
|
bool _clear_meters;
|
|
|
|
ProcessorSelection _pb_selection;
|
|
|
|
PBD::ScopedConnection _panstate_connection;
|
2021-11-10 19:15:00 -05:00
|
|
|
|
|
|
|
/* Layout */
|
|
|
|
Gtk::Frame global_frame;
|
|
|
|
Gtk::VBox global_vpacker;
|
2021-12-02 16:21:28 -05:00
|
|
|
Gtk::Table mute_solo_table;
|
|
|
|
Gtk::Table volume_table;
|
2021-11-10 19:15:00 -05:00
|
|
|
|
|
|
|
/* Widgets */
|
2021-12-16 10:13:37 -05:00
|
|
|
FittedCanvasWidget _tmaster_widget;
|
|
|
|
TriggerMaster* _tmaster;
|
2021-12-05 11:56:42 -05:00
|
|
|
|
2021-12-12 07:43:40 -05:00
|
|
|
ArdourWidgets::ArdourButton _name_button;
|
|
|
|
ProcessorBox _processor_box;
|
|
|
|
TriggerBoxWidget _trigger_display;
|
|
|
|
PannerUI _panners;
|
2021-12-02 20:24:58 -05:00
|
|
|
LevelMeterVBox _level_meter;
|
|
|
|
boost::shared_ptr<AutomationController> _gain_control;
|
2022-01-01 09:38:59 -05:00
|
|
|
|
|
|
|
Gtk::Menu* _route_ops_menu;
|
2021-11-10 19:15:00 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __ardour_trigger_strip__ */
|