2005-09-25 14:42:24 -04:00
|
|
|
/*
|
2006-08-01 15:17:49 -04:00
|
|
|
Copyright (C) 2000-2006 Paul Davis
|
2005-09-25 14:42:24 -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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ardour_mixer_strip__
|
|
|
|
#define __ardour_mixer_strip__
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <cmath>
|
2005-11-28 23:41:15 -05:00
|
|
|
|
|
|
|
#include <gtkmm/eventbox.h>
|
|
|
|
#include <gtkmm/button.h>
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/frame.h>
|
|
|
|
#include <gtkmm/button.h>
|
|
|
|
#include <gtkmm/label.h>
|
|
|
|
#include <gtkmm/togglebutton.h>
|
|
|
|
#include <gtkmm/menu.h>
|
|
|
|
#include <gtkmm/textview.h>
|
|
|
|
#include <gtkmm/adjustment.h>
|
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
#include <gtkmm2ext/auto_spin.h>
|
|
|
|
#include <gtkmm2ext/click_box.h>
|
2006-07-07 19:51:30 -04:00
|
|
|
#include <gtkmm2ext/slider_controller.h>
|
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "pbd/stateful.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/types.h"
|
|
|
|
#include "ardour/ardour.h"
|
|
|
|
#include "ardour/processor.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "pbd/fastlog.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
#include "route_ui.h"
|
|
|
|
#include "gain_meter.h"
|
|
|
|
#include "panner_ui.h"
|
|
|
|
#include "enums.h"
|
2007-06-27 16:23:48 -04:00
|
|
|
#include "processor_box.h"
|
2005-12-06 11:21:06 -05:00
|
|
|
#include "ardour_dialog.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2005-09-25 16:33:00 -04:00
|
|
|
namespace Gtkmm2ext {
|
2005-09-25 14:42:24 -04:00
|
|
|
class SliderController;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace ARDOUR {
|
|
|
|
class Route;
|
|
|
|
class Send;
|
2007-06-27 16:23:48 -04:00
|
|
|
class Processor;
|
2005-09-25 14:42:24 -04:00
|
|
|
class Session;
|
|
|
|
class PortInsert;
|
2007-05-18 11:58:01 -04:00
|
|
|
class Bundle;
|
2005-09-25 14:42:24 -04:00
|
|
|
class Plugin;
|
|
|
|
}
|
2005-11-28 23:41:15 -05:00
|
|
|
namespace Gtk {
|
|
|
|
class Window;
|
|
|
|
class Style;
|
|
|
|
}
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
class Mixer_UI;
|
2009-01-30 10:08:09 -05:00
|
|
|
class IOSelectorWindow;
|
2009-06-28 20:38:58 -04:00
|
|
|
class MotionController;
|
|
|
|
class RouteGroupMenu;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
class MixerStrip : public RouteUI, public Gtk::EventBox
|
|
|
|
{
|
|
|
|
public:
|
2009-12-17 13:24:23 -05:00
|
|
|
MixerStrip (Mixer_UI&, ARDOUR::Session*, boost::shared_ptr<ARDOUR::Route>, bool in_mixer = true);
|
|
|
|
MixerStrip (Mixer_UI&, ARDOUR::Session*, bool in_mixer = true);
|
2005-09-25 14:42:24 -04:00
|
|
|
~MixerStrip ();
|
|
|
|
|
2009-06-20 13:15:33 -04:00
|
|
|
void set_width_enum (Width, void* owner);
|
|
|
|
Width get_width_enum () const { return _width; }
|
|
|
|
void* width_owner () const { return _width_owner; }
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2009-10-22 13:17:34 -04:00
|
|
|
GainMeter& gain_meter() { return gpm; }
|
|
|
|
PannerUI& panner_ui() { return panners; }
|
2009-10-22 21:00:13 -04:00
|
|
|
PluginSelector* plugin_selector();
|
2009-05-16 22:08:13 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
void fast_update ();
|
|
|
|
void set_embedded (bool);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-06-21 15:59:56 -04:00
|
|
|
ARDOUR::RouteGroup* route_group() const;
|
2008-12-08 11:07:28 -05:00
|
|
|
void set_route (boost::shared_ptr<ARDOUR::Route>);
|
2009-06-23 16:02:15 -04:00
|
|
|
void set_button_names ();
|
2009-11-20 10:26:34 -05:00
|
|
|
void show_send (boost::shared_ptr<ARDOUR::Send>);
|
2006-03-09 18:44:39 -05:00
|
|
|
|
2008-12-12 09:43:24 -05:00
|
|
|
sigc::signal<void> WidthChanged;
|
|
|
|
|
2009-05-16 22:08:13 -04:00
|
|
|
static sigc::signal<void,boost::shared_ptr<ARDOUR::Route> > SwitchIO;
|
2009-12-25 16:06:52 -05:00
|
|
|
static PBD::Signal1<void,MixerStrip*> CatchDeletion;
|
2009-05-16 22:08:13 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
protected:
|
|
|
|
friend class Mixer_UI;
|
|
|
|
void set_packed (bool yn);
|
|
|
|
bool packed () { return _packed; }
|
|
|
|
|
|
|
|
void set_selected(bool yn);
|
|
|
|
void set_stuff_from_route ();
|
|
|
|
|
2009-07-13 19:09:16 -04:00
|
|
|
bool on_leave_notify_event (GdkEventCrossing* ev);
|
|
|
|
bool on_enter_notify_event (GdkEventCrossing* ev);
|
|
|
|
bool on_key_press_event (GdkEventKey* ev);
|
|
|
|
bool on_key_release_event (GdkEventKey* ev);
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
private:
|
|
|
|
Mixer_UI& _mixer;
|
|
|
|
|
2008-12-08 11:07:28 -05:00
|
|
|
void init ();
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
bool _embedded;
|
|
|
|
bool _packed;
|
2008-02-16 17:43:18 -05:00
|
|
|
bool _mixer_owned;
|
2005-09-25 14:42:24 -04:00
|
|
|
Width _width;
|
2007-04-29 18:39:21 -04:00
|
|
|
void* _width_owner;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Gtk::Button hide_button;
|
|
|
|
Gtk::Button width_button;
|
|
|
|
Gtk::HBox width_hide_box;
|
2008-12-14 02:59:33 -05:00
|
|
|
Gtk::VBox whvbox;
|
2006-11-27 14:31:33 -05:00
|
|
|
Gtk::EventBox top_event_box;
|
2008-12-14 02:59:33 -05:00
|
|
|
Gtk::EventBox* spacer;
|
|
|
|
Gtk::Alignment gain_meter_alignment;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void hide_clicked();
|
|
|
|
void width_clicked ();
|
|
|
|
|
|
|
|
Gtk::Frame global_frame;
|
|
|
|
Gtk::VBox global_vpacker;
|
|
|
|
|
2009-07-12 20:26:28 -04:00
|
|
|
ProcessorBox processor_box;
|
2005-09-25 14:42:24 -04:00
|
|
|
GainMeter gpm;
|
2007-06-03 20:05:33 -04:00
|
|
|
PannerUI panners;
|
2009-10-19 10:46:15 -04:00
|
|
|
Gtk::ToggleButton _mono_button;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Table button_table;
|
2006-05-21 06:11:59 -04:00
|
|
|
Gtk::Table middle_button_table;
|
2006-05-19 13:29:05 -04:00
|
|
|
Gtk::Table bottom_button_table;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-05-21 06:11:59 -04:00
|
|
|
Gtk::Button gain_unit_button;
|
|
|
|
Gtk::Label gain_unit_label;
|
|
|
|
Gtk::Button meter_point_button;
|
|
|
|
Gtk::Label meter_point_label;
|
|
|
|
|
2010-04-03 09:40:34 -04:00
|
|
|
void meter_changed ();
|
2006-05-21 06:11:59 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Button diskstream_button;
|
|
|
|
Gtk::Label diskstream_label;
|
|
|
|
|
|
|
|
Gtk::Button input_button;
|
|
|
|
Gtk::Label input_label;
|
|
|
|
Gtk::Button output_button;
|
|
|
|
Gtk::Label output_label;
|
|
|
|
|
2009-12-04 12:45:11 -05:00
|
|
|
std::string longest_label;
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
gint mark_update_safe ();
|
|
|
|
guint32 mode_switch_in_progress;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
Gtk::Button name_button;
|
|
|
|
|
2005-12-06 11:21:06 -05:00
|
|
|
ArdourDialog* comment_window;
|
|
|
|
Gtk::TextView* comment_area;
|
|
|
|
Gtk::Button comment_button;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2006-11-02 20:42:51 -05:00
|
|
|
void comment_editor_done_editing();
|
2005-09-25 14:42:24 -04:00
|
|
|
void setup_comment_editor ();
|
|
|
|
void comment_button_clicked ();
|
2009-10-19 10:46:15 -04:00
|
|
|
void mono_button_clicked ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Gtk::Button group_button;
|
|
|
|
Gtk::Label group_label;
|
2009-06-28 20:38:58 -04:00
|
|
|
RouteGroupMenu *group_menu;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
gint input_press (GdkEventButton *);
|
|
|
|
gint output_press (GdkEventButton *);
|
|
|
|
|
2009-11-09 22:16:57 -05:00
|
|
|
Gtk::Menu input_menu;
|
|
|
|
std::list<boost::shared_ptr<ARDOUR::Bundle> > input_menu_bundles;
|
2009-02-10 21:14:01 -05:00
|
|
|
void maybe_add_bundle_to_input_menu (boost::shared_ptr<ARDOUR::Bundle>, ARDOUR::BundleList const &);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Gtk::Menu output_menu;
|
2009-11-09 22:16:57 -05:00
|
|
|
std::list<boost::shared_ptr<ARDOUR::Bundle> > output_menu_bundles;
|
2009-02-10 21:14:01 -05:00
|
|
|
void maybe_add_bundle_to_output_menu (boost::shared_ptr<ARDOUR::Bundle>, ARDOUR::BundleList const &);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-02-02 17:17:06 -05:00
|
|
|
void bundle_input_toggled (boost::shared_ptr<ARDOUR::Bundle>);
|
|
|
|
void bundle_output_toggled (boost::shared_ptr<ARDOUR::Bundle>);
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
void edit_input_configuration ();
|
|
|
|
void edit_output_configuration ();
|
|
|
|
|
2006-07-31 23:23:35 -04:00
|
|
|
void diskstream_changed ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
Gtk::Menu *send_action_menu;
|
2009-03-05 12:25:52 -05:00
|
|
|
Gtk::MenuItem* rename_menu_item;
|
2005-09-25 14:42:24 -04:00
|
|
|
void build_send_action_menu ();
|
|
|
|
|
|
|
|
void new_send ();
|
|
|
|
void show_send_controls ();
|
|
|
|
|
|
|
|
void input_changed (ARDOUR::IOChange, void *);
|
|
|
|
void output_changed (ARDOUR::IOChange, void *);
|
|
|
|
|
2009-12-21 13:23:07 -05:00
|
|
|
PBD::ScopedConnection panstate_connection;
|
|
|
|
PBD::ScopedConnection panstyle_connection;
|
2005-09-25 14:42:24 -04:00
|
|
|
void connect_to_pan ();
|
|
|
|
|
|
|
|
void update_diskstream_display ();
|
|
|
|
void update_input_display ();
|
|
|
|
void update_output_display ();
|
|
|
|
|
|
|
|
void set_automated_controls_sensitivity (bool yn);
|
|
|
|
|
2006-01-07 21:56:49 -05:00
|
|
|
Gtk::Menu* route_ops_menu;
|
2005-09-25 14:42:24 -04:00
|
|
|
void build_route_ops_menu ();
|
2010-04-16 15:31:57 -04:00
|
|
|
gboolean name_button_button_press (GdkEventButton*);
|
2005-09-25 14:42:24 -04:00
|
|
|
void list_route_operations ();
|
|
|
|
|
|
|
|
gint comment_key_release_handler (GdkEventKey*);
|
|
|
|
void comment_changed (void *src);
|
|
|
|
void comment_edited ();
|
|
|
|
bool ignore_comment_edit;
|
|
|
|
|
2009-06-21 15:59:56 -04:00
|
|
|
void set_route_group (ARDOUR::RouteGroup *);
|
|
|
|
bool select_route_group (GdkEventButton *);
|
2009-12-09 22:25:32 -05:00
|
|
|
void route_group_changed ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
IOSelectorWindow *input_selector;
|
|
|
|
IOSelectorWindow *output_selector;
|
|
|
|
|
|
|
|
Gtk::Style *passthru_style;
|
|
|
|
|
2009-05-12 13:03:42 -04:00
|
|
|
void route_gui_changed (std::string, void*);
|
2005-09-25 14:42:24 -04:00
|
|
|
void show_route_color ();
|
|
|
|
void show_passthru_color ();
|
|
|
|
|
|
|
|
void route_active_changed ();
|
|
|
|
|
2007-06-23 16:13:13 -04:00
|
|
|
void name_changed ();
|
2005-09-25 14:42:24 -04:00
|
|
|
void update_speed_display ();
|
|
|
|
void map_frozen ();
|
2008-12-16 18:21:01 -05:00
|
|
|
void hide_processor_editor (boost::weak_ptr<ARDOUR::Processor> processor);
|
2008-03-17 16:54:03 -04:00
|
|
|
void hide_redirect_editors ();
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
bool ignore_speed_adjustment;
|
|
|
|
|
2006-05-17 08:07:16 -04:00
|
|
|
void engine_running();
|
|
|
|
void engine_stopped();
|
|
|
|
|
2009-05-16 22:08:13 -04:00
|
|
|
void switch_io (boost::shared_ptr<ARDOUR::Route>);
|
2009-06-09 16:21:19 -04:00
|
|
|
boost::shared_ptr<ARDOUR::Delivery> _current_delivery;
|
2009-05-17 10:11:16 -04:00
|
|
|
void revert_to_default_display ();
|
2009-05-16 22:08:13 -04:00
|
|
|
|
2009-11-20 10:26:34 -05:00
|
|
|
void drop_send ();
|
2009-12-21 13:23:07 -05:00
|
|
|
PBD::ScopedConnection send_gone_connection;
|
2009-11-20 10:26:34 -05:00
|
|
|
|
2009-11-20 12:11:00 -05:00
|
|
|
void reset_strip_style ();
|
|
|
|
|
2006-11-16 14:34:57 -05:00
|
|
|
static int scrollbar_height;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-10-01 13:20:12 -04:00
|
|
|
void update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width width, bool input_button);
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __ardour_mixer_strip__ */
|