2010-03-10 12:31:16 -05:00
|
|
|
/*
|
|
|
|
Copyright (C) 2010 Paul Davis
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/table.h>
|
|
|
|
|
|
|
|
#include "gtkmm2ext/bindable_button.h"
|
|
|
|
|
2011-10-29 11:54:30 -04:00
|
|
|
#include "ardour_button.h"
|
2010-03-10 12:31:16 -05:00
|
|
|
#include "axis_view.h"
|
|
|
|
#include "level_meter.h"
|
|
|
|
#include "route_ui.h"
|
|
|
|
|
|
|
|
namespace Gtkmm2ext {
|
|
|
|
class TearOff;
|
2011-02-10 13:33:43 -05:00
|
|
|
class MotionFeedback;
|
2010-03-10 12:31:16 -05:00
|
|
|
}
|
|
|
|
|
2011-02-11 13:04:09 -05:00
|
|
|
class VolumeController;
|
|
|
|
|
2010-03-10 12:31:16 -05:00
|
|
|
class MonitorSection : public RouteUI
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MonitorSection (ARDOUR::Session*);
|
|
|
|
~MonitorSection ();
|
|
|
|
|
2010-03-18 22:49:01 -04:00
|
|
|
void set_session (ARDOUR::Session*);
|
2010-03-10 12:31:16 -05:00
|
|
|
static void setup_knob_images ();
|
|
|
|
|
2010-03-19 16:53:22 -04:00
|
|
|
Gtkmm2ext::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;
|
|
|
|
|
2010-03-10 12:31:16 -05:00
|
|
|
private:
|
|
|
|
Gtk::VBox vpacker;
|
|
|
|
Gtk::HBox hpacker;
|
|
|
|
Gtk::VBox upper_packer;
|
|
|
|
Gtk::VBox lower_packer;
|
|
|
|
Gtkmm2ext::TearOff* _tearoff;
|
|
|
|
|
2011-11-02 09:55:06 -04:00
|
|
|
Gtk::HBox channel_table_packer;
|
|
|
|
Gtk::HBox table_hpacker;
|
|
|
|
Gtk::Table channel_table;
|
|
|
|
Gtk::Table channel_table_header;
|
|
|
|
Gtk::ScrolledWindow channel_table_scroller;
|
|
|
|
Glib::RefPtr<Gtk::SizeGroup> channel_size_group;
|
|
|
|
|
2011-06-01 13:00:29 -04:00
|
|
|
struct ChannelButtonSet {
|
2011-10-29 11:54:30 -04:00
|
|
|
ArdourButton cut;
|
|
|
|
ArdourButton dim;
|
|
|
|
ArdourButton solo;
|
|
|
|
ArdourButton invert;
|
2010-03-11 19:19:46 -05:00
|
|
|
|
|
|
|
ChannelButtonSet ();
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::vector<ChannelButtonSet*> ChannelButtons;
|
|
|
|
ChannelButtons _channel_buttons;
|
|
|
|
|
2011-02-11 13:04:09 -05:00
|
|
|
VolumeController* gain_control;
|
|
|
|
VolumeController* dim_control;
|
|
|
|
VolumeController* solo_boost_control;
|
|
|
|
VolumeController* solo_cut_control;
|
2010-03-10 12:31:16 -05:00
|
|
|
|
|
|
|
void populate_buttons ();
|
|
|
|
void map_state ();
|
|
|
|
|
|
|
|
boost::shared_ptr<ARDOUR::MonitorProcessor> _monitor;
|
|
|
|
boost::shared_ptr<ARDOUR::Route> _route;
|
|
|
|
|
|
|
|
static Glib::RefPtr<Gtk::ActionGroup> monitor_actions;
|
|
|
|
void register_actions ();
|
|
|
|
|
|
|
|
static Glib::RefPtr<Gdk::Pixbuf> big_knob_pixbuf;
|
|
|
|
static Glib::RefPtr<Gdk::Pixbuf> little_knob_pixbuf;
|
|
|
|
|
|
|
|
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 ();
|
2010-05-05 10:09:58 -04:00
|
|
|
void toggle_exclusive_solo ();
|
2011-11-02 12:46:49 -04:00
|
|
|
void set_button_names () {}
|
2010-05-05 10:09:58 -04:00
|
|
|
void toggle_mute_overrides_solo ();
|
2010-03-10 12:31:16 -05:00
|
|
|
void dim_level_changed ();
|
|
|
|
void solo_boost_changed ();
|
|
|
|
void gain_value_changed ();
|
|
|
|
|
2011-11-03 17:35:20 -04:00
|
|
|
ArdourButton solo_in_place_button;
|
|
|
|
ArdourButton afl_button;
|
|
|
|
ArdourButton pfl_button;
|
2010-03-10 12:31:16 -05:00
|
|
|
Gtk::HBox solo_model_box;
|
|
|
|
|
2010-03-11 09:33:21 -05:00
|
|
|
void solo_use_in_place ();
|
|
|
|
void solo_use_afl ();
|
|
|
|
void solo_use_pfl ();
|
|
|
|
|
2011-10-29 11:54:30 -04:00
|
|
|
ArdourButton cut_all_button;
|
|
|
|
ArdourButton dim_all_button;
|
|
|
|
ArdourButton mono_button;
|
|
|
|
ArdourButton rude_solo_button;
|
|
|
|
ArdourButton rude_iso_button;
|
|
|
|
ArdourButton rude_audition_button;
|
|
|
|
ArdourButton exclusive_solo_button;
|
|
|
|
ArdourButton solo_mute_override_button;
|
2010-03-11 09:33:21 -05:00
|
|
|
|
2010-05-04 12:39:03 -04:00
|
|
|
void do_blink (bool);
|
2010-03-11 09:33:21 -05:00
|
|
|
void solo_blink (bool);
|
2010-05-04 12:39:03 -04:00
|
|
|
void audition_blink (bool);
|
2010-03-11 09:33:21 -05:00
|
|
|
bool cancel_solo (GdkEventButton*);
|
2010-05-06 14:40:37 -04:00
|
|
|
bool cancel_isolate (GdkEventButton*);
|
2010-05-04 12:39:03 -04:00
|
|
|
bool cancel_audition (GdkEventButton*);
|
2010-03-25 12:03:31 -04:00
|
|
|
void update_solo_model ();
|
|
|
|
void parameter_changed (std::string);
|
2010-05-06 14:40:37 -04:00
|
|
|
void isolated_changed ();
|
|
|
|
|
2010-03-25 12:03:31 -04:00
|
|
|
PBD::ScopedConnection config_connection;
|
2010-04-06 12:57:35 -04:00
|
|
|
PBD::ScopedConnectionList control_connections;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2011-11-19 12:04:48 -05:00
|
|
|
bool _inhibit_solo_model_update;
|
|
|
|
|
2010-04-06 12:57:35 -04:00
|
|
|
void assign_controllables ();
|
2010-03-10 12:31:16 -05:00
|
|
|
};
|