mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 06:06:25 +01:00
Merge branch 'master' of git.waves.com:waves/tracks
This commit is contained in:
commit
3833e3b627
49 changed files with 1613 additions and 1418 deletions
|
|
@ -386,6 +386,8 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
WM::Manager::instance().register_window (&audio_port_matrix);
|
||||
WM::Manager::instance().register_window (&midi_port_matrix);
|
||||
|
||||
session_lock_dialog->set_deletable (false);
|
||||
|
||||
/* We need to instantiate the theme manager because it loads our
|
||||
theme files. This should really change so that its window
|
||||
and its functionality are separate
|
||||
|
|
@ -507,8 +509,6 @@ ARDOUR_UI::post_engine ()
|
|||
|
||||
_tooltips.enable();
|
||||
|
||||
ActionManager::load_menus (ARDOUR_COMMAND_LINE::menus_file);
|
||||
|
||||
if (setup_windows ()) {
|
||||
throw failed_constructor ();
|
||||
}
|
||||
|
|
@ -2272,10 +2272,29 @@ ARDOUR_UI::stop_blinking ()
|
|||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::lock_session () {
|
||||
session_lock_dialog->run ();
|
||||
ARDOUR_UI::on_lock_button_pressed () {
|
||||
|
||||
lock_button_was_pressed();
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::lock_session () {
|
||||
|
||||
if( screen_lock_is_allowed () )
|
||||
session_lock_dialog->run ();
|
||||
}
|
||||
|
||||
bool
|
||||
ARDOUR_UI::screen_lock_is_allowed() const
|
||||
{
|
||||
if(!_session)
|
||||
return false;
|
||||
|
||||
if( (_session->record_status() == Session::Recording) && (ARDOUR_UI::config()->get_auto_lock_timer () != 0) )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Ask the user for the name of a new snapshot and then take it.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -168,6 +168,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
/// @return true if session was successfully unloaded.
|
||||
int unload_session (bool hide_stuff = false);
|
||||
void close_session();
|
||||
void lock_session ();
|
||||
|
||||
int save_state_canfail (std::string state_name = "", bool switch_to_it = false);
|
||||
void save_state (const std::string & state_name = "", bool switch_to_it = false);
|
||||
|
|
@ -308,6 +309,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
void set_header_format(ARDOUR::HeaderFormat hf) {_header_format = hf;}
|
||||
void set_timecode_format(Timecode::TimecodeFormat tc) {_timecode_format = tc;}
|
||||
|
||||
bool screen_lock_is_allowed() const;
|
||||
void on_lock_button_pressed ();
|
||||
PBD::Signal0<void> lock_button_was_pressed;
|
||||
|
||||
protected:
|
||||
friend class PublicEditor;
|
||||
|
||||
|
|
@ -604,7 +609,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
|
||||
guint32 last_key_press_time;
|
||||
|
||||
void lock_session ();
|
||||
void snapshot_session (bool switch_to_it);
|
||||
void rename_session ();
|
||||
void setup_order_hint ();
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include "ardour/session.h"
|
||||
|
||||
#include "actions.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "public_editor.h"
|
||||
#include "mixer_ui.h"
|
||||
|
|
@ -59,6 +60,11 @@ ARDOUR_UI::we_have_dependents ()
|
|||
editor->setup_tooltips ();
|
||||
editor->UpdateAllTransportClocks.connect (sigc::mem_fun (*this, &ARDOUR_UI::update_transport_clocks));
|
||||
|
||||
/* all actions are defined */
|
||||
|
||||
ActionManager::enable_accelerators ();
|
||||
ActionManager::load_menus (ARDOUR_COMMAND_LINE::menus_file);
|
||||
|
||||
editor->track_mixer_selection ();
|
||||
mixer->track_editor_selection ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ ARDOUR_UI::install_actions ()
|
|||
hide_return (sigc::bind (sigc::mem_fun(*editor, &PublicEditor::export_video), false)));
|
||||
ActionManager::session_sensitive_actions.push_back (act);
|
||||
|
||||
ActionManager::register_action (main_actions, X_("LockSession"), _("Lock this session"), sigc::mem_fun(*this, &ARDOUR_UI::lock_session));
|
||||
ActionManager::register_action (main_actions, X_("LockSession"), _("Lock this session"), sigc::mem_fun(*this, &ARDOUR_UI::on_lock_button_pressed));
|
||||
ActionManager::register_action (main_actions, X_("ToggleMultiOutMode"), "Multi Out", sigc::mem_fun(*this, &ARDOUR_UI::toggle_multi_out_mode));
|
||||
ActionManager::register_action (main_actions, X_("ToggleStereoOutMode"), "Stereo Out", sigc::mem_fun(*this, &ARDOUR_UI::toggle_stereo_out_mode));
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
#include "utils.h"
|
||||
|
||||
#include "i18n.h"
|
||||
#include "dbg_msg.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
|
|
@ -66,8 +67,9 @@ using namespace Editing;
|
|||
|
||||
AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session* sess, ArdourCanvas::Canvas& canvas)
|
||||
: AxisView(sess)
|
||||
, RouteTimeAxisView(ed, sess, canvas)
|
||||
, RouteTimeAxisView(ed, sess, canvas, "audio_time_axis.xml")
|
||||
{
|
||||
std::cout << "AudioTimeAxisView::AudioTimeAxisView ()" << std::endl;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -92,11 +94,11 @@ AudioTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
|
||||
ignore_toggle = false;
|
||||
|
||||
if (is_audio_track()) {
|
||||
controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
|
||||
} else { // bus
|
||||
controls_ebox.set_name ("AudioBusControlsBaseUnselected");
|
||||
}
|
||||
//if (is_audio_track()) {
|
||||
// controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
|
||||
//} else { // bus
|
||||
// controls_ebox.set_name ("AudioBusControlsBaseUnselected");
|
||||
//}
|
||||
|
||||
/* if set_state above didn't create a gain automation child, we need to make one */
|
||||
if (automation_child (GainAutomation) == 0) {
|
||||
|
|
@ -380,11 +382,11 @@ AudioTimeAxisView::update_control_names ()
|
|||
}
|
||||
}
|
||||
|
||||
if (get_selected()) {
|
||||
controls_ebox.set_name (controls_base_selected_name);
|
||||
} else {
|
||||
controls_ebox.set_name (controls_base_unselected_name);
|
||||
}
|
||||
//if (get_selected()) {
|
||||
// controls_ebox.set_name (controls_base_selected_name);
|
||||
//} else {
|
||||
// controls_ebox.set_name (controls_base_unselected_name);
|
||||
//}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ using namespace PBD;
|
|||
using namespace Editing;
|
||||
|
||||
AutomationStreamView::AutomationStreamView (AutomationTimeAxisView& tv)
|
||||
: StreamView (*dynamic_cast<RouteTimeAxisView*>(tv.get_parent()),
|
||||
: StreamView (*dynamic_cast<RouteTimeAxisView*>(tv.TimeAxisView::get_parent()),
|
||||
tv.canvas_display())
|
||||
, _automation_view(tv)
|
||||
, _pending_automation_state (Off)
|
||||
|
|
|
|||
|
|
@ -78,8 +78,10 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||
const string & nom,
|
||||
const string & nomparent
|
||||
)
|
||||
: AxisView (s)
|
||||
, TimeAxisView (s, e, &parent, canvas)
|
||||
: AxisView(s)
|
||||
, Gtk::EventBox ()
|
||||
, WavesUI ("automation_time_axis.xml", *this)
|
||||
, TimeAxisView (s, e, &parent, canvas, *this)
|
||||
, _route (r)
|
||||
, _control (c)
|
||||
, _automatable (a)
|
||||
|
|
@ -87,8 +89,10 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||
, _base_rect (new ArdourCanvas::Rectangle (_canvas_display))
|
||||
, _name (nom)
|
||||
, _view (show_regions ? new AutomationStreamView (*this) : 0)
|
||||
, auto_button (X_("")) /* force addition of a label */
|
||||
, _show_regions (show_regions)
|
||||
, hide_button (get_waves_button ("hide_button"))
|
||||
, auto_button (get_waves_button ("auto_button"))
|
||||
, controller_home (get_event_box ("controller_home"))
|
||||
{
|
||||
|
||||
CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for auto %2/%1", _name, r->name()));
|
||||
|
|
@ -126,18 +130,18 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||
_base_rect->lower_to_bottom();
|
||||
}
|
||||
|
||||
hide_button.add (*(manage (new Gtk::Image (::get_icon("hide")))));
|
||||
//hide_button.add (*(manage (new Gtk::Image (::get_icon("hide")))));
|
||||
|
||||
auto_button.set_name ("TrackVisualButton");
|
||||
hide_button.set_name ("TrackRemoveButton");
|
||||
//auto_button.set_name ("TrackVisualButton");
|
||||
//hide_button.set_name ("TrackRemoveButton");
|
||||
|
||||
auto_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
hide_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
|
||||
controls_table.set_no_show_all();
|
||||
//controls_table.set_no_show_all();
|
||||
|
||||
ARDOUR_UI::instance()->set_tip(auto_button, _("automation state"));
|
||||
ARDOUR_UI::instance()->set_tip(hide_button, _("hide track"));
|
||||
//ARDOUR_UI::instance()->set_tip(auto_button, _("automation state"));
|
||||
//ARDOUR_UI::instance()->set_tip(hide_button, _("hide track"));
|
||||
|
||||
const string str = gui_property ("height");
|
||||
if (!str.empty()) {
|
||||
|
|
@ -162,31 +166,31 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||
tipname += ": ";
|
||||
}
|
||||
tipname += _name;
|
||||
ARDOUR_UI::instance()->set_tip(controls_ebox, tipname);
|
||||
//ARDOUR_UI::instance()->set_tip(controls_ebox, tipname);
|
||||
|
||||
/* add the buttons */
|
||||
controls_table.attach (hide_button, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
controls_table.attach (name_label, 0, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
controls_table.attach (auto_button, 6, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
//controls_table.attach (hide_button, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
//controls_table.attach (name_label, 0, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
//controls_table.attach (auto_button, 6, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
|
||||
name_label.show ();
|
||||
|
||||
if (_controller) {
|
||||
_controller.get()->set_size_request(-1, 24);
|
||||
/* add bar controller */
|
||||
controls_table.attach (*_controller.get(), 1, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
controller_home.add (*_controller.get());
|
||||
/* note that this handler connects *before* the default handler */
|
||||
_controller->event_widget().signal_scroll_event().connect (mem_fun (*this, &AutomationTimeAxisView::controls_ebox_scroll), false);
|
||||
}
|
||||
|
||||
controls_table.show_all ();
|
||||
//controls_table.show_all ();
|
||||
|
||||
hide_button.signal_clicked().connect (sigc::mem_fun(*this, &AutomationTimeAxisView::hide_clicked));
|
||||
auto_button.signal_clicked().connect (sigc::mem_fun(*this, &AutomationTimeAxisView::auto_clicked));
|
||||
hide_button.signal_clicked.connect (sigc::mem_fun(*this, &AutomationTimeAxisView::hide_button_clicked));
|
||||
auto_button.signal_clicked.connect (sigc::mem_fun(*this, &AutomationTimeAxisView::auto_button_clicked));
|
||||
|
||||
controls_base_selected_name = X_("AutomationTrackControlsBaseSelected");
|
||||
controls_base_unselected_name = X_("AutomationTrackControlsBase");
|
||||
controls_ebox.set_name (controls_base_unselected_name);
|
||||
//controls_ebox.set_name (controls_base_unselected_name);
|
||||
|
||||
/* ask for notifications of any new RegionViews */
|
||||
if (show_regions) {
|
||||
|
|
@ -236,7 +240,7 @@ AutomationTimeAxisView::route_going_away ()
|
|||
}
|
||||
|
||||
void
|
||||
AutomationTimeAxisView::auto_clicked ()
|
||||
AutomationTimeAxisView::auto_button_clicked (WavesButton*)
|
||||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
|
|
@ -297,7 +301,7 @@ AutomationTimeAxisView::automation_state_changed ()
|
|||
|
||||
switch (state & (ARDOUR::Off|Play|Touch|Write)) {
|
||||
case ARDOUR::Off:
|
||||
auto_button.set_label (S_("Automation|OFF"));
|
||||
auto_button.set_text (S_("Automation|OFF"));
|
||||
if (auto_off_item) {
|
||||
ignore_state_request = true;
|
||||
auto_off_item->set_active (true);
|
||||
|
|
@ -308,7 +312,7 @@ AutomationTimeAxisView::automation_state_changed ()
|
|||
}
|
||||
break;
|
||||
case Play:
|
||||
auto_button.set_label (_("READ"));
|
||||
auto_button.set_text (_("READ"));
|
||||
if (auto_play_item) {
|
||||
ignore_state_request = true;
|
||||
auto_play_item->set_active (true);
|
||||
|
|
@ -319,7 +323,7 @@ AutomationTimeAxisView::automation_state_changed ()
|
|||
}
|
||||
break;
|
||||
case Write:
|
||||
auto_button.set_label (_("WRITE"));
|
||||
auto_button.set_text (_("WRITE"));
|
||||
if (auto_write_item) {
|
||||
ignore_state_request = true;
|
||||
auto_write_item->set_active (true);
|
||||
|
|
@ -330,7 +334,7 @@ AutomationTimeAxisView::automation_state_changed ()
|
|||
}
|
||||
break;
|
||||
case Touch:
|
||||
auto_button.set_label (_("TOUCH"));
|
||||
auto_button.set_text (_("TOUCH"));
|
||||
if (auto_touch_item) {
|
||||
ignore_state_request = true;
|
||||
auto_touch_item->set_active (true);
|
||||
|
|
@ -341,7 +345,7 @@ AutomationTimeAxisView::automation_state_changed ()
|
|||
}
|
||||
break;
|
||||
default:
|
||||
auto_button.set_label (_("???"));
|
||||
auto_button.set_text (_("???"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -423,7 +427,7 @@ AutomationTimeAxisView::set_height (uint32_t h)
|
|||
hide_button.show_all();
|
||||
|
||||
} else if (h >= preset_height (HeightSmall)) {
|
||||
controls_table.hide_all ();
|
||||
//controls_table.hide_all ();
|
||||
auto_button.hide();
|
||||
}
|
||||
}
|
||||
|
|
@ -450,6 +454,12 @@ AutomationTimeAxisView::set_samples_per_pixel (double fpp)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
AutomationTimeAxisView::hide_button_clicked (WavesButton*)
|
||||
{
|
||||
hide_clicked();
|
||||
}
|
||||
|
||||
void
|
||||
AutomationTimeAxisView::hide_clicked ()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "canvas/rectangle.h"
|
||||
|
||||
#include "waves_ui.h"
|
||||
#include "time_axis_view.h"
|
||||
#include "automation_controller.h"
|
||||
|
||||
|
|
@ -52,7 +53,7 @@ class AutomationStreamView;
|
|||
class AutomationController;
|
||||
|
||||
|
||||
class AutomationTimeAxisView : public TimeAxisView {
|
||||
class AutomationTimeAxisView : public Gtk::EventBox, public WavesUI, public TimeAxisView {
|
||||
public:
|
||||
AutomationTimeAxisView (ARDOUR::Session*,
|
||||
boost::shared_ptr<ARDOUR::Route>,
|
||||
|
|
@ -143,8 +144,9 @@ class AutomationTimeAxisView : public TimeAxisView {
|
|||
bool ignore_toggle;
|
||||
bool first_call_to_set_height;
|
||||
|
||||
Gtk::Button hide_button;
|
||||
Gtk::Button auto_button;
|
||||
WavesButton& hide_button;
|
||||
WavesButton& auto_button;
|
||||
Gtk::EventBox& controller_home;
|
||||
Gtk::Menu* automation_menu;
|
||||
Gtk::Label* plugname;
|
||||
bool plugname_packed;
|
||||
|
|
@ -162,8 +164,9 @@ class AutomationTimeAxisView : public TimeAxisView {
|
|||
void add_line (boost::shared_ptr<AutomationLine>);
|
||||
|
||||
void clear_clicked ();
|
||||
void hide_button_clicked (WavesButton*);
|
||||
void hide_clicked ();
|
||||
void auto_clicked ();
|
||||
void auto_button_clicked (WavesButton*);
|
||||
|
||||
void build_display_menu ();
|
||||
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@ Editor::Editor ()
|
|||
last_update_frame = 0;
|
||||
pre_press_cursor = 0;
|
||||
_drags = new DragManager (this);
|
||||
lock_dialog = 0;
|
||||
|
||||
current_mixer_strip = 0;
|
||||
tempo_lines = 0;
|
||||
|
||||
|
|
@ -759,6 +759,11 @@ Editor::Editor ()
|
|||
|
||||
Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&Editor::parameter_changed, this, _1), gui_context());
|
||||
|
||||
ARDOUR_UI::config()->ParameterChanged.connect (sigc::mem_fun (*this, &Editor::on_ardour_ui_config_changed));
|
||||
|
||||
ARDOUR_UI* ardour_ui = ARDOUR_UI::instance();
|
||||
ardour_ui->lock_button_was_pressed.connect( *this, invalidator (*this), boost::bind (&Editor::lock, this), gui_context() );
|
||||
|
||||
TimeAxisView::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&Editor::timeaxisview_deleted, this, _1), gui_context());
|
||||
|
||||
_ignore_region_action = false;
|
||||
|
|
@ -1131,16 +1136,32 @@ Editor::on_realize ()
|
|||
Window::on_realize ();
|
||||
Realized ();
|
||||
|
||||
start_lock_event_timing ();
|
||||
signal_event().connect (sigc::mem_fun (*this, &Editor::generic_event_handler));
|
||||
}
|
||||
|
||||
// Update lock time
|
||||
void
|
||||
Editor::on_ardour_ui_config_changed(const std::string& param)
|
||||
{
|
||||
if (param=="auto-lock-timer" && ARDOUR_UI::instance()->screen_lock_is_allowed())
|
||||
{
|
||||
start_lock_event_timing();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::start_lock_event_timing ()
|
||||
{
|
||||
/* check if we should lock the GUI every 30 seconds */
|
||||
|
||||
Glib::signal_timeout().connect (sigc::mem_fun (*this, &Editor::lock_timeout_callback), 30 * 1000);
|
||||
ARDOUR_UI* ardour_ui = ARDOUR_UI::instance();
|
||||
|
||||
timeout_connection.disconnect();
|
||||
|
||||
if( !ardour_ui->screen_lock_is_allowed() )
|
||||
return;
|
||||
|
||||
gettimeofday(&last_event_time, 0);
|
||||
timeout_connection = Glib::signal_timeout().connect (sigc::mem_fun (*this, &Editor::lock_timeout_callback), 1 * 1000);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -1163,25 +1184,28 @@ Editor::generic_event_handler (GdkEvent* ev)
|
|||
bool
|
||||
Editor::lock_timeout_callback ()
|
||||
{
|
||||
struct timeval now, delta;
|
||||
const uint32_t lock_timeout_secs = 5; /* 2 minutes */
|
||||
struct timeval now, delta;
|
||||
|
||||
gettimeofday (&now, 0);
|
||||
gettimeofday (&now, 0);
|
||||
|
||||
timersub (&now, &last_event_time, &delta);
|
||||
timersub (&now, &last_event_time, &delta);
|
||||
|
||||
if (delta.tv_sec > lock_timeout_secs) {
|
||||
lock ();
|
||||
if( !ARDOUR_UI::instance()->screen_lock_is_allowed() )
|
||||
return false; // Returning false will effectively disconnect us from the timer callback.
|
||||
|
||||
if (delta.tv_sec > ARDOUR_UI::config()->get_auto_lock_timer ())
|
||||
{
|
||||
lock ();
|
||||
/* don't call again. Returning false will effectively
|
||||
disconnect us from the timer callback.
|
||||
|
||||
unlock() will call start_lock_event_timing() to get things
|
||||
started again.
|
||||
*/
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1338,6 +1362,7 @@ Editor::set_session (Session *t)
|
|||
_session->locations()->changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::refresh_location_display, this), gui_context());
|
||||
_session->locations()->StateChanged.connect (_session_connections, invalidator (*this), boost::bind (&Editor::refresh_location_display, this), gui_context());
|
||||
_session->history().Changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::history_changed, this), gui_context());
|
||||
_session->RecordStateChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&Editor::start_lock_event_timing, this), gui_context());
|
||||
|
||||
playhead_cursor->show ();
|
||||
|
||||
|
|
|
|||
|
|
@ -1359,15 +1359,18 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
DragManager* _drags;
|
||||
|
||||
void escape ();
|
||||
|
||||
void lock ();
|
||||
void unlock ();
|
||||
|
||||
/* This dialog must NOT forward events */
|
||||
Gtk::Dialog *lock_dialog;
|
||||
|
||||
struct timeval last_event_time;
|
||||
bool generic_event_handler (GdkEvent*);
|
||||
sigc::connection timeout_connection;
|
||||
bool lock_timeout_callback ();
|
||||
void start_lock_event_timing ();
|
||||
void on_ardour_ui_config_changed (const std::string&);
|
||||
|
||||
Gtk::Menu fade_context_menu;
|
||||
void popup_fade_context_menu (int, int, ArdourCanvas::Item*, ItemType);
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ Editor::show_editor_mixer (bool yn)
|
|||
|
||||
if (r) {
|
||||
current_mixer_strip->set_route (r);
|
||||
current_mixer_strip->set_width_enum (editor_mixer_strip_width, (void*) this);
|
||||
//current_mixer_strip->set_width_enum (editor_mixer_strip_width, (void*) this);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -175,13 +175,12 @@ void
|
|||
Editor::create_editor_mixer ()
|
||||
{
|
||||
current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(),
|
||||
_session,
|
||||
false);
|
||||
_session, "editor_mixer.xml");
|
||||
current_mixer_strip->Hiding.connect (sigc::mem_fun(*this, &Editor::current_mixer_strip_hidden));
|
||||
current_mixer_strip->WidthChanged.connect (sigc::mem_fun (*this, &Editor::mixer_strip_width_changed));
|
||||
// current_mixer_strip->WidthChanged.connect (sigc::mem_fun (*this, &Editor::mixer_strip_width_changed));
|
||||
|
||||
#ifdef GTKOSX
|
||||
current_mixer_strip->WidthChanged.connect (sigc::mem_fun(*this, &Editor::ensure_all_elements_drawn));
|
||||
// current_mixer_strip->WidthChanged.connect (sigc::mem_fun(*this, &Editor::ensure_all_elements_drawn));
|
||||
#endif
|
||||
current_mixer_strip->set_embedded (true);
|
||||
}
|
||||
|
|
@ -242,7 +241,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
|
|||
|
||||
if (route) {
|
||||
current_mixer_strip->set_route (route);
|
||||
current_mixer_strip->set_width_enum (editor_mixer_strip_width, (void*) this);
|
||||
//current_mixer_strip->set_width_enum (editor_mixer_strip_width, (void*) this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -256,23 +255,23 @@ Editor::current_mixer_strip_hidden ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Editor::maybe_add_mixer_strip_width (XMLNode& node)
|
||||
{
|
||||
if (current_mixer_strip) {
|
||||
node.add_property ("mixer-width", enum_2_string (editor_mixer_strip_width));
|
||||
}
|
||||
}
|
||||
//void
|
||||
//Editor::maybe_add_mixer_strip_width (XMLNode& node)
|
||||
//{
|
||||
// if (current_mixer_strip) {
|
||||
// //node.add_property ("mixer-width", enum_2_string (editor_mixer_strip_width));
|
||||
// }
|
||||
//}
|
||||
|
||||
void
|
||||
Editor::mixer_strip_width_changed ()
|
||||
{
|
||||
#ifdef GTKOSX
|
||||
ensure_all_elements_drawn ();
|
||||
#endif
|
||||
|
||||
editor_mixer_strip_width = current_mixer_strip->get_width_enum ();
|
||||
}
|
||||
//void
|
||||
//Editor::mixer_strip_width_changed ()
|
||||
//{
|
||||
//#ifdef GTKOSX
|
||||
// ensure_all_elements_drawn ();
|
||||
//#endif
|
||||
//
|
||||
//// editor_mixer_strip_width = current_mixer_strip->get_width_enum ();
|
||||
//}
|
||||
|
||||
void
|
||||
Editor::track_mixer_selection ()
|
||||
|
|
|
|||
|
|
@ -7066,44 +7066,22 @@ Editor::toggle_midi_input_active (bool flip_others)
|
|||
void
|
||||
Editor::lock ()
|
||||
{
|
||||
if (!lock_dialog) {
|
||||
/* the lock dialog must be a completely "vanilla" Dialog that does not forward
|
||||
events in anyway. Using a class like ArdourDialog breaks this.
|
||||
*/
|
||||
lock_dialog = new Gtk::Dialog (string_compose (_("%1: Locked"), PROGRAM_NAME), true);
|
||||
|
||||
Gtk::Image* padlock = manage (new Gtk::Image (::get_icon ("padlock_closed")));
|
||||
lock_dialog->get_vbox()->pack_start (*padlock);
|
||||
|
||||
ArdourButton* b = manage (new ArdourButton);
|
||||
b->set_name ("lock button");
|
||||
b->set_markup (string_compose ("<span size=\"large\" weight=\"bold\">%1</span>", _("Click to unlock")));
|
||||
b->signal_clicked.connect (sigc::mem_fun (*this, &Editor::unlock));
|
||||
lock_dialog->get_vbox()->pack_start (*b);
|
||||
|
||||
lock_dialog->get_vbox()->show_all ();
|
||||
lock_dialog->set_size_request (200, 200);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
/* The global menu bar continues to be accessible to applications
|
||||
with modal dialogs, which means that we need to desensitize
|
||||
all items in the menu bar. Since those items are really just
|
||||
proxies for actions, that means disabling all actions.
|
||||
*/
|
||||
with modal dialogs, which means that we need to desensitize
|
||||
all items in the menu bar. Since those items are really just
|
||||
proxies for actions, that means disabling all actions.
|
||||
*/
|
||||
ActionManager::disable_all_actions ();
|
||||
#endif
|
||||
lock_dialog->present ();
|
||||
}
|
||||
|
||||
void
|
||||
Editor::unlock ()
|
||||
{
|
||||
lock_dialog->hide ();
|
||||
timeout_connection.disconnect();
|
||||
|
||||
ARDOUR_UI::instance()->lock_session();
|
||||
|
||||
#ifdef __APPLE__
|
||||
ActionManager::pop_action_state ();
|
||||
#endif
|
||||
|
||||
start_lock_event_timing ();
|
||||
start_lock_event_timing ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,14 +93,16 @@ GainMeter::GainMeter (Session* s, const std::string& layout_script_file)
|
|||
gain_slider.signal_button_release_event().connect (sigc::mem_fun(*this, &GainMeter::gain_slider_button_release), false);
|
||||
|
||||
gain_display_entry.set_name ("MixerStripGainDisplay");
|
||||
set_size_request_to_display_given_text (gain_display_entry, "-80.g", 2, 6); /* note the descender */
|
||||
//set_size_request_to_display_given_text (gain_display_entry, "-80.g", 2, 6); /* note the descender */
|
||||
gain_display_entry.signal_activate().connect (sigc::mem_fun (*this, &GainMeter::gain_activated));
|
||||
gain_display_entry.signal_focus_in_event().connect (sigc::mem_fun (*this, &GainMeter::gain_focused), false);
|
||||
gain_display_entry.signal_focus_out_event().connect (sigc::mem_fun (*this, &GainMeter::gain_focused), false);
|
||||
gain_display_entry.set_alignment(1.0);
|
||||
gain_display_home.pack_start(gain_display_entry, true, true);
|
||||
gain_display_entry.show();
|
||||
|
||||
peak_display_button.set_name ("MixerStripPeakDisplay");
|
||||
set_size_request_to_display_given_text (peak_display_button, "-80.g", 2, 6); /* note the descender */
|
||||
// peak_display_button.set_name ("MixerStripPeakDisplay");
|
||||
// set_size_request_to_display_given_text (peak_display_button, "-80.g", 2, 6); /* note the descender */
|
||||
max_peak = minus_infinity();
|
||||
peak_display_button.set_text (_("-inf"));
|
||||
peak_display_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
|
|
@ -277,19 +279,6 @@ GainMeter::setup_meters (int len)
|
|||
meter_channels = _route->shared_peak_meter()->input_streams().n_total();
|
||||
}
|
||||
|
||||
switch (_width) {
|
||||
case Wide:
|
||||
if (meter_channels == 1) {
|
||||
meter_width = 6;
|
||||
}
|
||||
break;
|
||||
case Narrow:
|
||||
if (meter_channels > 1) {
|
||||
meter_width = 5;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
level_meter.setup_meters (meter_width, meter_width);
|
||||
}
|
||||
|
||||
|
|
@ -335,7 +324,8 @@ GainMeter::reset_peak_display ()
|
|||
level_meter.clear_meters();
|
||||
max_peak = -INFINITY;
|
||||
peak_display_button.set_text (_("-inf"));
|
||||
peak_display_button.set_name ("MixerStripPeakDisplay");
|
||||
peak_display_button.set_active_state(Gtkmm2ext::Off);
|
||||
// peak_display_button.set_name ("MixerStripPeakDisplay");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -746,7 +736,8 @@ GainMeter::update_meters()
|
|||
}
|
||||
}
|
||||
if (mpeak >= Config->get_meter_peak()) {
|
||||
peak_display_button.set_name ("MixerStripPeakDisplayPeak");
|
||||
//peak_display_button.set_name ("MixerStripPeakDisplayPeak");
|
||||
peak_display_button.set_active_state(Gtkmm2ext::ExplicitActive);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -755,18 +746,6 @@ void GainMeter::color_handler(bool /*dpi*/)
|
|||
setup_meters();
|
||||
}
|
||||
|
||||
void
|
||||
GainMeter::set_width (Width w, int len)
|
||||
{
|
||||
_width = w;
|
||||
int meter_width = 5;
|
||||
if (_width == Wide && _route && _route->shared_peak_meter()->input_streams().n_total() == 1) {
|
||||
meter_width = 10;
|
||||
}
|
||||
level_meter.setup_meters(meter_width, meter_width);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
GainMeter::on_theme_changed()
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 3.2 KiB |
|
|
@ -68,6 +68,7 @@ log_meter (float db)
|
|||
def = 115.0f;
|
||||
}
|
||||
|
||||
*/
|
||||
/* 115 is the deflection %age that would be
|
||||
when db=6.0. this is an arbitrary
|
||||
endpoint for our scaling.
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
#include "meter_patterns.h"
|
||||
|
||||
#include "i18n.h"
|
||||
#include "dbg_msg.h"
|
||||
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
|
@ -59,53 +60,58 @@ PBD::Signal0<void> MeterStrip::MetricChanged;
|
|||
PBD::Signal0<void> MeterStrip::ConfigurationChanged;
|
||||
|
||||
MeterStrip::MeterStrip (int metricmode, MeterType mt)
|
||||
: AxisView(0)
|
||||
, RouteUI(0)
|
||||
: AxisView (0)
|
||||
, RouteUI (0, "meter_strip.xml")
|
||||
|
||||
, name_label (get_waves_button ("name_label"))
|
||||
, peak_display (get_waves_button ("peak_display"))
|
||||
, level_meter_home (get_box ("level_meter_home"))
|
||||
{
|
||||
std::cout << "a) MeterStrip::MeterStrip ()" << std::endl;
|
||||
level_meter = 0;
|
||||
_strip_type = 0;
|
||||
_tick_bar = 0;
|
||||
_metricmode = -1;
|
||||
metric_type = MeterPeak;
|
||||
mtr_vbox.set_spacing(2);
|
||||
nfo_vbox.set_spacing(2);
|
||||
peakbx.set_size_request(-1, 14);
|
||||
namebx.set_size_request(18, 52);
|
||||
spacer.set_size_request(-1,0);
|
||||
// mtr_vbox.set_spacing(2);
|
||||
// nfo_vbox.set_spacing(2);
|
||||
// peakbx.set_size_request(-1, 14);
|
||||
// namebx.set_size_request(18, 52);
|
||||
// spacer.set_size_request(-1,0);
|
||||
|
||||
set_metric_mode(metricmode, mt);
|
||||
|
||||
meter_metric_area.set_size_request(25, 10);
|
||||
meter_metric_area.signal_expose_event().connect (
|
||||
sigc::mem_fun(*this, &MeterStrip::meter_metrics_expose));
|
||||
RedrawMetrics.connect (sigc::mem_fun(*this, &MeterStrip::redraw_metrics));
|
||||
// meter_metric_area.set_size_request(25, 10);
|
||||
// meter_metric_area.signal_expose_event().connect (
|
||||
// sigc::mem_fun(*this, &MeterStrip::meter_metrics_expose));
|
||||
// RedrawMetrics.connect (sigc::mem_fun(*this, &MeterStrip::redraw_metrics));
|
||||
|
||||
meterbox.pack_start(meter_metric_area, true, false);
|
||||
// meterbox.pack_start(meter_metric_area, true, false);
|
||||
|
||||
mtr_vbox.pack_start (peakbx, false, false);
|
||||
mtr_vbox.pack_start (meterbox, true, true);
|
||||
mtr_vbox.pack_start (spacer, false, false);
|
||||
mtr_container.add(mtr_vbox);
|
||||
// mtr_vbox.pack_start (peakbx, false, false);
|
||||
// mtr_vbox.pack_start (meterbox, true, true);
|
||||
// mtr_vbox.pack_start (spacer, false, false);
|
||||
// mtr_container.add(mtr_vbox);
|
||||
|
||||
mtr_hsep.set_size_request(-1,1);
|
||||
mtr_hsep.set_name("BlackSeparator");
|
||||
// mtr_hsep.set_size_request(-1,1);
|
||||
// mtr_hsep.set_name("BlackSeparator");
|
||||
|
||||
nfo_vbox.pack_start (mtr_hsep, false, false);
|
||||
nfo_vbox.pack_start (btnbox, false, false);
|
||||
nfo_vbox.pack_start (namebx, false, false);
|
||||
// nfo_vbox.pack_start (mtr_hsep, false, false);
|
||||
// nfo_vbox.pack_start (btnbox, false, false);
|
||||
// nfo_vbox.pack_start (namebx, false, false);
|
||||
|
||||
pack_start (mtr_container, true, true);
|
||||
pack_start (nfo_vbox, false, false);
|
||||
// pack_start (mtr_container, true, true);
|
||||
// pack_start (nfo_vbox, false, false);
|
||||
|
||||
peakbx.show();
|
||||
btnbox.show();
|
||||
meter_metric_area.show();
|
||||
meterbox.show();
|
||||
spacer.show();
|
||||
mtr_vbox.show();
|
||||
mtr_container.show();
|
||||
mtr_hsep.show();
|
||||
nfo_vbox.show();
|
||||
// peakbx.show();
|
||||
// btnbox.show();
|
||||
// meter_metric_area.show();
|
||||
// meterbox.show();
|
||||
// spacer.show();
|
||||
// mtr_vbox.show();
|
||||
// mtr_container.show();
|
||||
// mtr_hsep.show();
|
||||
// nfo_vbox.show();
|
||||
|
||||
UI::instance()->theme_changed.connect (sigc::mem_fun(*this, &MeterStrip::on_theme_changed));
|
||||
ColorsChanged.connect (sigc::mem_fun (*this, &MeterStrip::on_theme_changed));
|
||||
|
|
@ -114,12 +120,16 @@ MeterStrip::MeterStrip (int metricmode, MeterType mt)
|
|||
|
||||
MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt)
|
||||
: AxisView(sess)
|
||||
, RouteUI(sess)
|
||||
, RouteUI(sess, "meter_strip.xml")
|
||||
, _route(rt)
|
||||
, peak_display()
|
||||
|
||||
, name_label (get_waves_button ("name_label"))
|
||||
, peak_display (get_waves_button ("peak_display"))
|
||||
, level_meter_home (get_box ("level_meter_home"))
|
||||
{
|
||||
mtr_vbox.set_spacing(2);
|
||||
nfo_vbox.set_spacing(2);
|
||||
std::cout << "b) MeterStrip::MeterStrip ()" << std::endl;
|
||||
// mtr_vbox.set_spacing(2);
|
||||
// nfo_vbox.set_spacing(2);
|
||||
RouteUI::set_route (rt);
|
||||
SessionHandlePtr::set_session (sess);
|
||||
|
||||
|
|
@ -141,112 +151,110 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt)
|
|||
level_meter->setup_meters (meter_width, 6);
|
||||
level_meter->ButtonRelease.connect_same_thread (level_meter_connection, boost::bind (&MeterStrip::level_meter_button_release, this, _1));
|
||||
level_meter->MeterTypeChanged.connect_same_thread (level_meter_connection, boost::bind (&MeterStrip::meter_type_changed, this, _1));
|
||||
level_meter_home.add (*level_meter);
|
||||
|
||||
meter_align.set(0.5, 0.5, 0.0, 1.0);
|
||||
meter_align.add(*level_meter);
|
||||
// meter_align.set(0.5, 0.5, 0.0, 1.0);
|
||||
// meter_align.add(*level_meter);
|
||||
|
||||
meterbox.pack_start(meter_ticks1_area, true, false);
|
||||
meterbox.pack_start(meter_align, true, true);
|
||||
meterbox.pack_start(meter_ticks2_area, true, false);
|
||||
// meterbox.pack_start(meter_ticks1_area, true, false);
|
||||
// meterbox.pack_start(meter_align, true, true);
|
||||
// meterbox.pack_start(meter_ticks2_area, true, false);
|
||||
|
||||
// peak display
|
||||
peak_display.set_name ("meterbridge peakindicator");
|
||||
peak_display.set_elements((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body));
|
||||
// peak_display.set_name ("meterbridge peakindicator");
|
||||
// peak_display.set_elements((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body));
|
||||
max_peak = minus_infinity();
|
||||
peak_display.unset_flags (Gtk::CAN_FOCUS);
|
||||
peak_display.set_size_request(12, 8);
|
||||
peak_display.set_corner_radius(2);
|
||||
// peak_display.set_size_request(12, 8);
|
||||
// peak_display.set_corner_radius(2);
|
||||
|
||||
peak_align.set(0.5, 1.0, 1.0, 0.8);
|
||||
peak_align.add(peak_display);
|
||||
peakbx.pack_start(peak_align, true, true, 3);
|
||||
peakbx.set_size_request(-1, 14);
|
||||
// peak_align.set(0.5, 1.0, 1.0, 0.8);
|
||||
// peak_align.add(peak_display);
|
||||
// peakbx.pack_start(peak_align, true, true, 3);
|
||||
// peakbx.set_size_request(-1, 14);
|
||||
|
||||
// add track-name label
|
||||
name_label.set_text(_route->name());
|
||||
name_label.set_corner_radius(2);
|
||||
name_label.set_name("meterbridge label");
|
||||
name_label.set_angle(-90.0);
|
||||
name_label.layout()->set_ellipsize (Pango::ELLIPSIZE_END);
|
||||
name_label.layout()->set_width(48 * PANGO_SCALE);
|
||||
name_label.set_size_request(18, 50);
|
||||
name_label.set_alignment(-1.0, .5);
|
||||
ARDOUR_UI::instance()->set_tip (name_label, _route->name());
|
||||
ARDOUR_UI::instance()->set_tip (*level_meter, _route->name());
|
||||
|
||||
namebx.set_size_request(18, 52);
|
||||
namebx.pack_start(name_label, true, false, 3);
|
||||
// namebx.set_size_request(18, 52);
|
||||
// namebx.pack_start(name_label, true, false, 3);
|
||||
|
||||
mon_in_box.pack_start(*monitor_input_button, true, false);
|
||||
btnbox.pack_start(mon_in_box, false, false, 1);
|
||||
mon_disk_box.pack_start(*monitor_disk_button, true, false);
|
||||
btnbox.pack_start(mon_disk_box, false, false, 1);
|
||||
// mon_in_box.pack_start(*monitor_input_button, true, false);
|
||||
// btnbox.pack_start(mon_in_box, false, false, 1);
|
||||
// mon_disk_box.pack_start(*monitor_disk_button, true, false);
|
||||
// btnbox.pack_start(mon_disk_box, false, false, 1);
|
||||
|
||||
recbox.pack_start(*rec_enable_button, true, false);
|
||||
btnbox.pack_start(recbox, false, false, 1);
|
||||
mutebox.pack_start(*mute_button, true, false);
|
||||
btnbox.pack_start(mutebox, false, false, 1);
|
||||
solobox.pack_start(*solo_button, true, false);
|
||||
btnbox.pack_start(solobox, false, false, 1);
|
||||
// recbox.pack_start(*rec_enable_button, true, false);
|
||||
// btnbox.pack_start(recbox, false, false, 1);
|
||||
// mutebox.pack_start(*mute_button, true, false);
|
||||
// btnbox.pack_start(mutebox, false, false, 1);
|
||||
// solobox.pack_start(*solo_button, true, false);
|
||||
// btnbox.pack_start(solobox, false, false, 1);
|
||||
|
||||
rec_enable_button->set_corner_radius(2);
|
||||
rec_enable_button->set_size_request(16, 16);
|
||||
rec_enable_button.set_corner_radius(2);
|
||||
rec_enable_button.set_size_request(16, 16);
|
||||
|
||||
mute_button->set_corner_radius(2);
|
||||
mute_button->set_size_request(16, 16);
|
||||
mute_button.set_corner_radius(2);
|
||||
mute_button.set_size_request(16, 16);
|
||||
|
||||
solo_button->set_corner_radius(2);
|
||||
solo_button->set_size_request(16, 16);
|
||||
solo_button.set_corner_radius(2);
|
||||
solo_button.set_size_request(16, 16);
|
||||
|
||||
monitor_input_button->set_corner_radius(2);
|
||||
monitor_input_button->set_size_request(16, 16);
|
||||
monitor_input_button.set_corner_radius(2);
|
||||
monitor_input_button.set_size_request(16, 16);
|
||||
|
||||
monitor_disk_button->set_corner_radius(2);
|
||||
monitor_disk_button->set_size_request(16, 16);
|
||||
monitor_disk_button.set_corner_radius(2);
|
||||
monitor_disk_button.set_size_request(16, 16);
|
||||
|
||||
mutebox.set_size_request(16, 16);
|
||||
solobox.set_size_request(16, 16);
|
||||
recbox.set_size_request(16, 16);
|
||||
mon_in_box.set_size_request(16, 16);
|
||||
mon_disk_box.set_size_request(16, 16);
|
||||
spacer.set_size_request(-1,0);
|
||||
// mutebox.set_size_request(16, 16);
|
||||
// solobox.set_size_request(16, 16);
|
||||
// recbox.set_size_request(16, 16);
|
||||
// mon_in_box.set_size_request(16, 16);
|
||||
// mon_disk_box.set_size_request(16, 16);
|
||||
// spacer.set_size_request(-1,0);
|
||||
|
||||
update_button_box();
|
||||
update_name_box();
|
||||
update_background (_route->meter_type());
|
||||
|
||||
mtr_vbox.pack_start (peakbx, false, false);
|
||||
mtr_vbox.pack_start (meterbox, true, true);
|
||||
mtr_vbox.pack_start (spacer, false, false);
|
||||
mtr_container.add(mtr_vbox);
|
||||
// mtr_vbox.pack_start (peakbx, false, false);
|
||||
// mtr_vbox.pack_start (meterbox, true, true);
|
||||
// mtr_vbox.pack_start (spacer, false, false);
|
||||
// mtr_container.add(mtr_vbox);
|
||||
|
||||
mtr_hsep.set_size_request(-1,1);
|
||||
mtr_hsep.set_name("BlackSeparator");
|
||||
// mtr_hsep.set_size_request(-1,1);
|
||||
// mtr_hsep.set_name("BlackSeparator");
|
||||
|
||||
nfo_vbox.pack_start (mtr_hsep, false, false);
|
||||
nfo_vbox.pack_start (btnbox, false, false);
|
||||
nfo_vbox.pack_start (namebx, false, false);
|
||||
// nfo_vbox.pack_start (mtr_hsep, false, false);
|
||||
// nfo_vbox.pack_start (btnbox, false, false);
|
||||
// nfo_vbox.pack_start (namebx, false, false);
|
||||
|
||||
pack_start (mtr_container, true, true);
|
||||
pack_start (nfo_vbox, false, false);
|
||||
// pack_start (mtr_container, true, true);
|
||||
// pack_start (nfo_vbox, false, false);
|
||||
|
||||
name_label.show();
|
||||
peak_display.show();
|
||||
peakbx.show();
|
||||
meter_ticks1_area.show();
|
||||
meter_ticks2_area.show();
|
||||
meterbox.show();
|
||||
spacer.show();
|
||||
level_meter->show();
|
||||
meter_align.show();
|
||||
peak_align.show();
|
||||
btnbox.show();
|
||||
mtr_vbox.show();
|
||||
mtr_container.show();
|
||||
mtr_hsep.show();
|
||||
nfo_vbox.show();
|
||||
monitor_input_button->show();
|
||||
monitor_disk_button->show();
|
||||
// name_label.show();
|
||||
// peak_display.show();
|
||||
// peakbx.show();
|
||||
// meter_ticks1_area.show();
|
||||
// meter_ticks2_area.show();
|
||||
// meterbox.show();
|
||||
// spacer.show();
|
||||
// level_meter->show();
|
||||
// meter_align.show();
|
||||
// peak_align.show();
|
||||
// btnbox.show();
|
||||
// mtr_vbox.show();
|
||||
// mtr_container.show();
|
||||
// mtr_hsep.show();
|
||||
// nfo_vbox.show();
|
||||
monitor_input_button.show();
|
||||
monitor_disk_button.show();
|
||||
|
||||
_route->shared_peak_meter()->ConfigurationChanged.connect (
|
||||
route_connections, invalidator (*this), boost::bind (&MeterStrip::meter_configuration_changed, this, _1), gui_context()
|
||||
|
|
@ -255,15 +263,15 @@ MeterStrip::MeterStrip (Session* sess, boost::shared_ptr<ARDOUR::Route> rt)
|
|||
ResetAllPeakDisplays.connect (sigc::mem_fun(*this, &MeterStrip::reset_peak_display));
|
||||
ResetRoutePeakDisplays.connect (sigc::mem_fun(*this, &MeterStrip::reset_route_peak_display));
|
||||
ResetGroupPeakDisplays.connect (sigc::mem_fun(*this, &MeterStrip::reset_group_peak_display));
|
||||
RedrawMetrics.connect (sigc::mem_fun(*this, &MeterStrip::redraw_metrics));
|
||||
// RedrawMetrics.connect (sigc::mem_fun(*this, &MeterStrip::redraw_metrics));
|
||||
SetMeterTypeMulti.connect (sigc::mem_fun(*this, &MeterStrip::set_meter_type_multi));
|
||||
|
||||
meter_configuration_changed (_route->shared_peak_meter()->input_streams ());
|
||||
|
||||
meter_ticks1_area.set_size_request(3,-1);
|
||||
meter_ticks2_area.set_size_request(3,-1);
|
||||
meter_ticks1_area.signal_expose_event().connect (sigc::mem_fun(*this, &MeterStrip::meter_ticks1_expose));
|
||||
meter_ticks2_area.signal_expose_event().connect (sigc::mem_fun(*this, &MeterStrip::meter_ticks2_expose));
|
||||
// meter_ticks1_area.set_size_request(3,-1);
|
||||
// meter_ticks2_area.set_size_request(3,-1);
|
||||
// meter_ticks1_area.signal_expose_event().connect (sigc::mem_fun(*this, &MeterStrip::meter_ticks1_expose));
|
||||
// meter_ticks2_area.signal_expose_event().connect (sigc::mem_fun(*this, &MeterStrip::meter_ticks2_expose));
|
||||
|
||||
_route->DropReferences.connect (route_connections, invalidator (*this), boost::bind (&MeterStrip::self_delete, this), gui_context());
|
||||
_route->PropertyChanged.connect (route_connections, invalidator (*this), boost::bind (&MeterStrip::strip_property_changed, this, _1), gui_context());
|
||||
|
|
@ -332,30 +340,32 @@ MeterStrip::state_id() const
|
|||
void
|
||||
MeterStrip::set_button_names()
|
||||
{
|
||||
mute_button->set_text (_("M"));
|
||||
rec_enable_button->set_text ("");
|
||||
rec_enable_button->set_image (::get_icon (X_("record_normal_red")));
|
||||
/*
|
||||
mute_button.set_text (_("M"));
|
||||
rec_enable_button.set_text ("");
|
||||
rec_enable_button.set_image (::get_icon (X_("record_normal_red")));
|
||||
|
||||
if (_route && _route->solo_safe()) {
|
||||
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() | Gtkmm2ext::Insensitive));
|
||||
solo_button.set_visual_state (Gtkmm2ext::VisualState (solo_button.visual_state() | Gtkmm2ext::Insensitive));
|
||||
} else {
|
||||
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() & ~Gtkmm2ext::Insensitive));
|
||||
solo_button.set_visual_state (Gtkmm2ext::VisualState (solo_button.visual_state() & ~Gtkmm2ext::Insensitive));
|
||||
}
|
||||
if (!Config->get_solo_control_is_listen_control()) {
|
||||
solo_button->set_text (_("S"));
|
||||
solo_button.set_text (_("S"));
|
||||
} else {
|
||||
switch (Config->get_listen_position()) {
|
||||
case AfterFaderListen:
|
||||
solo_button->set_text (_("A"));
|
||||
solo_button.set_text (_("A"));
|
||||
break;
|
||||
case PreFaderListen:
|
||||
solo_button->set_text (_("P"));
|
||||
solo_button.set_text (_("P"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
monitor_input_button->set_text (_("I"));
|
||||
monitor_disk_button->set_text (_("D"));
|
||||
*/
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -380,7 +390,7 @@ MeterStrip::fast_update ()
|
|||
max_peak = mpeak;
|
||||
if (mpeak >= Config->get_meter_peak()) {
|
||||
peak_display.set_name ("meterbridge peakindicator on");
|
||||
peak_display.set_elements((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body));
|
||||
// peak_display.set_elements((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -414,31 +424,32 @@ MeterStrip::meter_configuration_changed (ChanCount c)
|
|||
if (boost::dynamic_pointer_cast<AudioTrack>(_route) == 0
|
||||
&& boost::dynamic_pointer_cast<MidiTrack>(_route) == 0
|
||||
) {
|
||||
meter_ticks1_area.set_name ("MyAudioBusMetricsLeft");
|
||||
meter_ticks2_area.set_name ("MyAudioBusMetricsRight");
|
||||
// meter_ticks1_area.set_name ("MyAudioBusMetricsLeft");
|
||||
// meter_ticks2_area.set_name ("MyAudioBusMetricsRight");
|
||||
_has_midi = false;
|
||||
}
|
||||
else if (type == (1 << DataType::AUDIO)) {
|
||||
meter_ticks1_area.set_name ("MyAudioTrackMetricsLeft");
|
||||
meter_ticks2_area.set_name ("MyAudioTrackMetricsRight");
|
||||
// meter_ticks1_area.set_name ("MyAudioTrackMetricsLeft");
|
||||
// meter_ticks2_area.set_name ("MyAudioTrackMetricsRight");
|
||||
_has_midi = false;
|
||||
}
|
||||
else if (type == (1 << DataType::MIDI)) {
|
||||
meter_ticks1_area.set_name ("MidiTrackMetricsLeft");
|
||||
meter_ticks2_area.set_name ("MidiTrackMetricsRight");
|
||||
// meter_ticks1_area.set_name ("MidiTrackMetricsLeft");
|
||||
// meter_ticks2_area.set_name ("MidiTrackMetricsRight");
|
||||
_has_midi = true;
|
||||
} else {
|
||||
meter_ticks1_area.set_name ("AudioMidiTrackMetricsLeft");
|
||||
meter_ticks2_area.set_name ("AudioMidiTrackMetricsRight");
|
||||
// meter_ticks1_area.set_name ("AudioMidiTrackMetricsLeft");
|
||||
// meter_ticks2_area.set_name ("AudioMidiTrackMetricsRight");
|
||||
_has_midi = true;
|
||||
}
|
||||
set_tick_bar(_tick_bar);
|
||||
// set_tick_bar(_tick_bar);
|
||||
|
||||
on_theme_changed();
|
||||
if (old_has_midi != _has_midi) MetricChanged();
|
||||
else ConfigurationChanged();
|
||||
}
|
||||
|
||||
/*
|
||||
void
|
||||
MeterStrip::set_tick_bar (int m)
|
||||
{
|
||||
|
|
@ -467,11 +478,12 @@ MeterStrip::set_tick_bar (int m)
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void
|
||||
MeterStrip::on_size_request (Gtk::Requisition* r)
|
||||
{
|
||||
VBox::on_size_request(r);
|
||||
RouteUI::on_size_request(r);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -503,14 +515,15 @@ MeterStrip::on_size_allocate (Gtk::Allocation& a)
|
|||
nh = 148;
|
||||
break;
|
||||
}
|
||||
namebx.set_size_request(18, nh);
|
||||
// namebx.set_size_request(18, nh);
|
||||
if (_route) {
|
||||
name_label.set_size_request(18, nh-2);
|
||||
name_label.layout()->set_width((nh-4) * PANGO_SCALE);
|
||||
}
|
||||
VBox::on_size_allocate(a);
|
||||
RouteUI::on_size_allocate(a);
|
||||
}
|
||||
|
||||
/*
|
||||
gint
|
||||
MeterStrip::meter_metrics_expose (GdkEventExpose *ev)
|
||||
{
|
||||
|
|
@ -520,6 +533,7 @@ MeterStrip::meter_metrics_expose (GdkEventExpose *ev)
|
|||
return meter_expose_metrics(ev, metric_type, _types, &meter_metric_area);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void
|
||||
MeterStrip::set_metric_mode (int metricmode, ARDOUR::MeterType mt)
|
||||
|
|
@ -533,25 +547,25 @@ MeterStrip::set_metric_mode (int metricmode, ARDOUR::MeterType mt)
|
|||
_types.clear ();
|
||||
switch(metricmode) {
|
||||
case 0:
|
||||
meter_metric_area.set_name ("MidiTrackMetricsLeft");
|
||||
// meter_metric_area.set_name ("MidiTrackMetricsLeft");
|
||||
_types.push_back (DataType::MIDI);
|
||||
break;
|
||||
case 1:
|
||||
meter_metric_area.set_name ("AudioTrackMetricsLeft");
|
||||
// meter_metric_area.set_name ("AudioTrackMetricsLeft");
|
||||
_types.push_back (DataType::AUDIO);
|
||||
break;
|
||||
case 2:
|
||||
meter_metric_area.set_name ("MidiTrackMetricsRight");
|
||||
// meter_metric_area.set_name ("MidiTrackMetricsRight");
|
||||
_types.push_back (DataType::MIDI);
|
||||
break;
|
||||
case 3:
|
||||
default:
|
||||
meter_metric_area.set_name ("AudioTrackMetricsRight");
|
||||
// meter_metric_area.set_name ("AudioTrackMetricsRight");
|
||||
_types.push_back (DataType::AUDIO);
|
||||
break;
|
||||
}
|
||||
update_background (mt);
|
||||
meter_metric_area.queue_draw ();
|
||||
// meter_metric_area.queue_draw ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -565,13 +579,13 @@ MeterStrip::update_background(MeterType type)
|
|||
case MeterK12:
|
||||
case MeterK14:
|
||||
case MeterK20:
|
||||
mtr_container.set_name ("meterstripPPM");
|
||||
// mtr_container.set_name ("meterstripPPM");
|
||||
break;
|
||||
case MeterVU:
|
||||
mtr_container.set_name ("meterstripVU");
|
||||
// mtr_container.set_name ("meterstripVU");
|
||||
break;
|
||||
default:
|
||||
mtr_container.set_name ("meterstripDPM");
|
||||
;// mtr_container.set_name ("meterstripDPM");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -583,6 +597,7 @@ MeterStrip::meter_type()
|
|||
return _route->meter_type();
|
||||
}
|
||||
|
||||
/*
|
||||
gint
|
||||
MeterStrip::meter_ticks1_expose (GdkEventExpose *ev)
|
||||
{
|
||||
|
|
@ -596,6 +611,7 @@ MeterStrip::meter_ticks2_expose (GdkEventExpose *ev)
|
|||
assert(_route);
|
||||
return meter_expose_ticks(ev, _route->meter_type(), _types, &meter_ticks2_area);
|
||||
}
|
||||
*/
|
||||
|
||||
void
|
||||
MeterStrip::reset_route_peak_display (Route* route)
|
||||
|
|
@ -605,6 +621,7 @@ MeterStrip::reset_route_peak_display (Route* route)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MeterStrip::reset_group_peak_display (RouteGroup* group)
|
||||
{
|
||||
|
|
@ -619,8 +636,8 @@ MeterStrip::reset_peak_display ()
|
|||
_route->shared_peak_meter()->reset_max();
|
||||
level_meter->clear_meters();
|
||||
max_peak = -INFINITY;
|
||||
peak_display.set_name ("meterbridge peakindicator");
|
||||
peak_display.set_elements((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body));
|
||||
// peak_display.set_name ("meterbridge peakindicator");
|
||||
// peak_display.set_elements((ArdourButton::Element) (ArdourButton::Edge|ArdourButton::Body));
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -638,6 +655,7 @@ MeterStrip::peak_button_release (GdkEventButton* ev)
|
|||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
void
|
||||
MeterStrip::redraw_metrics ()
|
||||
{
|
||||
|
|
@ -645,6 +663,7 @@ MeterStrip::redraw_metrics ()
|
|||
meter_ticks1_area.queue_draw();
|
||||
meter_ticks2_area.queue_draw();
|
||||
}
|
||||
*/
|
||||
|
||||
void
|
||||
MeterStrip::update_button_box ()
|
||||
|
|
@ -653,31 +672,31 @@ MeterStrip::update_button_box ()
|
|||
int height = 0;
|
||||
if (_session->config.get_show_mute_on_meterbridge()) {
|
||||
height += 18;
|
||||
mutebox.show();
|
||||
mute_button.show();
|
||||
} else {
|
||||
mutebox.hide();
|
||||
mute_button.hide();
|
||||
}
|
||||
if (_session->config.get_show_solo_on_meterbridge()) {
|
||||
height += 18;
|
||||
solobox.show();
|
||||
solo_button.show();
|
||||
} else {
|
||||
solobox.hide();
|
||||
solo_button.hide();
|
||||
}
|
||||
if (_session->config.get_show_rec_on_meterbridge()) {
|
||||
height += 18;
|
||||
recbox.show();
|
||||
rec_enable_button.show();
|
||||
} else {
|
||||
recbox.hide();
|
||||
rec_enable_button.hide();
|
||||
}
|
||||
if (_session->config.get_show_monitor_on_meterbridge()) {
|
||||
height += 18 + 18;
|
||||
mon_in_box.show();
|
||||
mon_disk_box.show();
|
||||
monitor_input_button.show();
|
||||
monitor_disk_button.show();
|
||||
} else {
|
||||
mon_in_box.hide();
|
||||
mon_disk_box.hide();
|
||||
monitor_input_button.hide();
|
||||
monitor_disk_button.hide();
|
||||
}
|
||||
btnbox.set_size_request(16, height);
|
||||
// btnbox.set_size_request(16, height);
|
||||
check_resize();
|
||||
}
|
||||
|
||||
|
|
@ -686,9 +705,9 @@ MeterStrip::update_name_box ()
|
|||
{
|
||||
if (!_session) return;
|
||||
if (_session->config.get_show_name_on_meterbridge()) {
|
||||
namebx.show();
|
||||
name_label.show();
|
||||
} else {
|
||||
namebx.hide();
|
||||
name_label.hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace Gtk {
|
|||
class Style;
|
||||
}
|
||||
|
||||
class MeterStrip : public Gtk::VBox, public RouteUI
|
||||
class MeterStrip :public RouteUI
|
||||
{
|
||||
public:
|
||||
MeterStrip (ARDOUR::Session*, boost::shared_ptr<ARDOUR::Route>);
|
||||
|
|
@ -66,7 +66,7 @@ class MeterStrip : public Gtk::VBox, public RouteUI
|
|||
|
||||
void set_metric_mode (int, ARDOUR::MeterType);
|
||||
int get_metric_mode() { return _metricmode; }
|
||||
void set_tick_bar (int);
|
||||
// void set_tick_bar (int);
|
||||
int get_tick_bar() { return _tick_bar; }
|
||||
bool has_midi() { return _has_midi; }
|
||||
bool is_metric_display() { return _strip_type == 0; }
|
||||
|
|
@ -78,9 +78,9 @@ class MeterStrip : public Gtk::VBox, public RouteUI
|
|||
PBD::ScopedConnectionList level_meter_connection;
|
||||
void self_delete ();
|
||||
|
||||
gint meter_metrics_expose (GdkEventExpose *);
|
||||
gint meter_ticks1_expose (GdkEventExpose *);
|
||||
gint meter_ticks2_expose (GdkEventExpose *);
|
||||
//gint meter_metrics_expose (GdkEventExpose *);
|
||||
//gint meter_ticks1_expose (GdkEventExpose *);
|
||||
//gint meter_ticks2_expose (GdkEventExpose *);
|
||||
|
||||
void on_theme_changed ();
|
||||
|
||||
|
|
@ -93,29 +93,29 @@ class MeterStrip : public Gtk::VBox, public RouteUI
|
|||
void set_button_names ();
|
||||
|
||||
private:
|
||||
Gtk::VBox mtr_vbox;
|
||||
Gtk::VBox nfo_vbox;
|
||||
Gtk::EventBox mtr_container;
|
||||
Gtk::HSeparator mtr_hsep;
|
||||
Gtk::HBox meterbox;
|
||||
Gtk::HBox spacer;
|
||||
Gtk::HBox namebx;
|
||||
ArdourButton name_label;
|
||||
Gtk::DrawingArea meter_metric_area;
|
||||
Gtk::DrawingArea meter_ticks1_area;
|
||||
Gtk::DrawingArea meter_ticks2_area;
|
||||
// Gtk::VBox mtr_vbox;
|
||||
// Gtk::VBox nfo_vbox;
|
||||
// Gtk::EventBox mtr_container;
|
||||
// Gtk::HSeparator mtr_hsep;
|
||||
// Gtk::HBox meterbox;
|
||||
// Gtk::HBox spacer;
|
||||
// Gtk::HBox namebx;
|
||||
WavesButton& name_label;
|
||||
// Gtk::DrawingArea meter_metric_area;
|
||||
// Gtk::DrawingArea meter_ticks1_area;
|
||||
// Gtk::DrawingArea meter_ticks2_area;
|
||||
|
||||
Gtk::HBox mutebox;
|
||||
Gtk::HBox solobox;
|
||||
Gtk::HBox recbox;
|
||||
Gtk::HBox mon_in_box;
|
||||
Gtk::HBox mon_disk_box;
|
||||
// Gtk::HBox mutebox;
|
||||
// Gtk::HBox solobox;
|
||||
// Gtk::HBox recbox;
|
||||
// Gtk::HBox mon_in_box;
|
||||
// Gtk::HBox mon_disk_box;
|
||||
|
||||
Gtk::Alignment meter_align;
|
||||
Gtk::Alignment peak_align;
|
||||
Gtk::HBox peakbx;
|
||||
Gtk::VBox btnbox;
|
||||
ArdourButton peak_display;
|
||||
// Gtk::Alignment meter_align;
|
||||
// Gtk::Alignment peak_align;
|
||||
// Gtk::HBox peakbx;
|
||||
// Gtk::VBox btnbox;
|
||||
WavesButton& peak_display;
|
||||
|
||||
std::vector<ARDOUR::DataType> _types;
|
||||
ARDOUR::MeterType metric_type;
|
||||
|
|
@ -126,7 +126,8 @@ class MeterStrip : public Gtk::VBox, public RouteUI
|
|||
int _strip_type;
|
||||
int _metricmode;
|
||||
|
||||
LevelMeterHBox *level_meter;
|
||||
Gtk::Box& level_meter_home;
|
||||
LevelMeterHBox* level_meter;
|
||||
|
||||
PBD::ScopedConnection _config_connection;
|
||||
void strip_property_changed (const PBD::PropertyChange&);
|
||||
|
|
@ -137,7 +138,7 @@ class MeterStrip : public Gtk::VBox, public RouteUI
|
|||
bool peak_button_release (GdkEventButton*);
|
||||
|
||||
void parameter_changed (std::string const & p);
|
||||
void redraw_metrics ();
|
||||
// void redraw_metrics ();
|
||||
void update_button_box ();
|
||||
void update_name_box ();
|
||||
|
||||
|
|
|
|||
|
|
@ -698,23 +698,23 @@ Meterbridge::sync_order_keys ()
|
|||
vis++;
|
||||
}
|
||||
|
||||
(*i).s->set_tick_bar(0);
|
||||
//(*i).s->set_tick_bar(0);
|
||||
|
||||
MeterType nmt = (*i).s->meter_type();
|
||||
if (nmt == MeterKrms) nmt = MeterPeak; // identical metrics
|
||||
if (vis == 1) {
|
||||
(*i).s->set_tick_bar(1);
|
||||
}
|
||||
//if (vis == 1) {
|
||||
// (*i).s->set_tick_bar(1);
|
||||
//}
|
||||
|
||||
if ((*i).visible && nmt != lmt && vis == 1) {
|
||||
lmt = nmt;
|
||||
metrics_left.set_metric_mode(1, lmt);
|
||||
} else if ((*i).visible && nmt != lmt) {
|
||||
|
||||
if (last) {
|
||||
last->set_tick_bar(last->get_tick_bar() | 2);
|
||||
}
|
||||
(*i).s->set_tick_bar((*i).s->get_tick_bar() | 1);
|
||||
//if (last) {
|
||||
// last->set_tick_bar(last->get_tick_bar() | 2);
|
||||
//}
|
||||
//(*i).s->set_tick_bar((*i).s->get_tick_bar() | 1);
|
||||
|
||||
if (_metrics.size() <= metrics) {
|
||||
_metrics.push_back(new MeterStrip(have_midi ? 2 : 3, lmt));
|
||||
|
|
@ -752,9 +752,9 @@ Meterbridge::sync_order_keys ()
|
|||
}
|
||||
}
|
||||
|
||||
if (last) {
|
||||
last->set_tick_bar(last->get_tick_bar() | 2);
|
||||
}
|
||||
//if (last) {
|
||||
// last->set_tick_bar(last->get_tick_bar() | 2);
|
||||
//}
|
||||
|
||||
metrics_right.set_metric_mode(have_midi ? 2 : 3, lmt);
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ static const uint32_t KEYBOARD_MIN_HEIGHT = 130;
|
|||
|
||||
MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess, ArdourCanvas::Canvas& canvas)
|
||||
: AxisView(sess) // virtually inherited
|
||||
, RouteTimeAxisView(ed, sess, canvas)
|
||||
, RouteTimeAxisView(ed, sess, canvas, "midi_time_axis.xml")
|
||||
, _ignore_signals(false)
|
||||
, _range_scroomer(0)
|
||||
, _piano_roll_header(0)
|
||||
|
|
@ -117,6 +117,14 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session* sess, ArdourCanva
|
|||
, _step_edit_item (0)
|
||||
, controller_menu (0)
|
||||
, _step_editor (0)
|
||||
|
||||
, _range_scroomer_home (get_box ("range_scroomer_home"))
|
||||
, _piano_home (get_box ("piano_home"))
|
||||
, _playback_channel_status (get_label ("playback_channel_status"))
|
||||
, _capture_channel_status (get_label ("capture_channel_status"))
|
||||
, _channel_selector_button (get_waves_button ("channel_selector_button"))
|
||||
, _midnam_model_selector (get_combo_box_text ("midnam_model_selector"))
|
||||
, _midnam_custom_device_mode_selector (get_combo_box_text ("midnam_custom_device_mode_selector"))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -159,10 +167,10 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
ignore_toggle = false;
|
||||
|
||||
if (is_midi_track()) {
|
||||
controls_ebox.set_name ("MidiTimeAxisViewControlsBaseUnselected");
|
||||
//controls_ebox.set_name ("MidiTimeAxisViewControlsBaseUnselected");
|
||||
_note_mode = midi_track()->note_mode();
|
||||
} else { // MIDI bus (which doesn't exist yet..)
|
||||
controls_ebox.set_name ("MidiBusControlsBaseUnselected");
|
||||
//controls_ebox.set_name ("MidiBusControlsBaseUnselected");
|
||||
}
|
||||
|
||||
/* if set_state above didn't create a gain automation child, we need to make one */
|
||||
|
|
@ -203,17 +211,19 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
label so that they can be reduced in height for stacked-view
|
||||
tracks.
|
||||
*/
|
||||
VBox* v = manage (new VBox);
|
||||
HBox* h = manage (new HBox);
|
||||
h->pack_start (*_range_scroomer);
|
||||
h->pack_start (*_piano_roll_header);
|
||||
v->pack_start (*h, false, false);
|
||||
v->pack_start (*manage (new Label ("")), true, true);
|
||||
v->show ();
|
||||
h->show ();
|
||||
controls_hbox.pack_start(*v, false, false);
|
||||
//VBox* v = manage (new VBox);
|
||||
//HBox* h = manage (new HBox);
|
||||
//h->pack_start (*_range_scroomer);
|
||||
//h->pack_start (*_piano_roll_header);
|
||||
//v->pack_start (*h, false, false);
|
||||
//v->pack_start (*manage (new Label ("")), true, true);
|
||||
//v->show ();
|
||||
//h->show ();
|
||||
//controls_hbox.pack_start(*v, false, false);
|
||||
_range_scroomer_home.pack_start (*_range_scroomer);
|
||||
_piano_home.pack_start (*_piano_roll_header);
|
||||
|
||||
controls_ebox.set_name ("MidiTrackControlsBaseUnselected");
|
||||
// controls_ebox.set_name ("MidiTrackControlsBaseUnselected");
|
||||
controls_base_selected_name = "MidiTrackControlsBaseSelected";
|
||||
controls_base_unselected_name = "MidiTrackControlsBaseUnselected";
|
||||
|
||||
|
|
@ -272,13 +282,13 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
ARDOUR_UI::instance()->set_tip (_midnam_model_selector, _("External MIDI Device"));
|
||||
ARDOUR_UI::instance()->set_tip (_midnam_custom_device_mode_selector, _("External Device Mode"));
|
||||
|
||||
_midi_controls_box.set_homogeneous(false);
|
||||
_midi_controls_box.set_border_width (10);
|
||||
// _midi_controls_box.set_homogeneous(false);
|
||||
// _midi_controls_box.set_border_width (10);
|
||||
|
||||
_channel_status_box.set_homogeneous (false);
|
||||
_channel_status_box.set_spacing (6);
|
||||
// _channel_status_box.set_homogeneous (false);
|
||||
// _channel_status_box.set_spacing (6);
|
||||
|
||||
_channel_selector_button.set_label (_("Chns"));
|
||||
_channel_selector_button.set_text (_("Chns"));
|
||||
ARDOUR_UI::instance()->set_tip (_channel_selector_button, _("Click to edit channel settings"));
|
||||
|
||||
/* fixed sized labels to prevent silly nonsense (though obviously,
|
||||
|
|
@ -288,27 +298,27 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
_playback_channel_status.set_size_request (65, -1);
|
||||
_capture_channel_status.set_size_request (60, -1);
|
||||
|
||||
_channel_status_box.pack_start (_playback_channel_status, false, false);
|
||||
_channel_status_box.pack_start (_capture_channel_status, false, false);
|
||||
_channel_status_box.pack_start (_channel_selector_button, false, false);
|
||||
_channel_status_box.show_all ();
|
||||
// _channel_status_box.pack_start (_playback_channel_status, false, false);
|
||||
// _channel_status_box.pack_start (_capture_channel_status, false, false);
|
||||
// _channel_status_box.pack_start (_channel_selector_button, false, false);
|
||||
// _channel_status_box.show_all ();
|
||||
|
||||
_channel_selector_button.signal_clicked().connect (sigc::mem_fun (*this, &MidiTimeAxisView::toggle_channel_selector));
|
||||
_channel_selector_button.signal_clicked.connect (sigc::mem_fun (*this, &MidiTimeAxisView::channel_selector_click));
|
||||
|
||||
_midi_controls_box.pack_start (_channel_status_box, false, false, 10);
|
||||
// _midi_controls_box.pack_start (_channel_status_box, false, false, 10);
|
||||
|
||||
if (!patch_manager.all_models().empty()) {
|
||||
|
||||
_midnam_model_selector.set_size_request(22, 30);
|
||||
_midnam_model_selector.set_border_width(2);
|
||||
_midnam_model_selector.show ();
|
||||
_midi_controls_box.pack_start (_midnam_model_selector);
|
||||
// _midi_controls_box.pack_start (_midnam_model_selector);
|
||||
|
||||
_midnam_custom_device_mode_selector.set_size_request(10, 30);
|
||||
_midnam_custom_device_mode_selector.set_border_width(2);
|
||||
_midnam_custom_device_mode_selector.show ();
|
||||
|
||||
_midi_controls_box.pack_start (_midnam_custom_device_mode_selector);
|
||||
// _midi_controls_box.pack_start (_midnam_custom_device_mode_selector);
|
||||
}
|
||||
|
||||
model_changed();
|
||||
|
|
@ -319,7 +329,7 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
_midnam_custom_device_mode_selector.signal_changed().connect(
|
||||
sigc::mem_fun(*this, &MidiTimeAxisView::custom_device_mode_changed));
|
||||
|
||||
controls_vbox.pack_start(_midi_controls_box, false, false);
|
||||
// controls_vbox.pack_start(_midi_controls_box, false, false);
|
||||
|
||||
const string color_mode = gui_property ("color-mode");
|
||||
if (!color_mode.empty()) {
|
||||
|
|
@ -451,9 +461,9 @@ void
|
|||
MidiTimeAxisView::set_height (uint32_t h)
|
||||
{
|
||||
if (h >= MIDI_CONTROLS_BOX_MIN_HEIGHT) {
|
||||
_midi_controls_box.show ();
|
||||
// _midi_controls_box.show ();
|
||||
} else {
|
||||
_midi_controls_box.hide();
|
||||
// _midi_controls_box.hide();
|
||||
}
|
||||
|
||||
if (h >= KEYBOARD_MIN_HEIGHT) {
|
||||
|
|
@ -515,6 +525,12 @@ MidiTimeAxisView::append_extra_display_menu_items ()
|
|||
items.push_back (SeparatorElem ());
|
||||
}
|
||||
|
||||
void
|
||||
MidiTimeAxisView::channel_selector_click (WavesButton*)
|
||||
{
|
||||
toggle_channel_selector ();
|
||||
}
|
||||
|
||||
void
|
||||
MidiTimeAxisView::toggle_channel_selector ()
|
||||
{
|
||||
|
|
@ -1318,21 +1334,21 @@ MidiTimeAxisView::route_active_changed ()
|
|||
|
||||
if (is_track()) {
|
||||
if (_route->active()) {
|
||||
controls_ebox.set_name ("MidiTrackControlsBaseUnselected");
|
||||
// controls_ebox.set_name ("MidiTrackControlsBaseUnselected");
|
||||
controls_base_selected_name = "MidiTrackControlsBaseSelected";
|
||||
controls_base_unselected_name = "MidiTrackControlsBaseUnselected";
|
||||
} else {
|
||||
controls_ebox.set_name ("MidiTrackControlsBaseInactiveUnselected");
|
||||
// controls_ebox.set_name ("MidiTrackControlsBaseInactiveUnselected");
|
||||
controls_base_selected_name = "MidiTrackControlsBaseInactiveSelected";
|
||||
controls_base_unselected_name = "MidiTrackControlsBaseInactiveUnselected";
|
||||
}
|
||||
} else {
|
||||
if (_route->active()) {
|
||||
controls_ebox.set_name ("BusControlsBaseUnselected");
|
||||
// controls_ebox.set_name ("BusControlsBaseUnselected");
|
||||
controls_base_selected_name = "BusControlsBaseSelected";
|
||||
controls_base_unselected_name = "BusControlsBaseUnselected";
|
||||
} else {
|
||||
controls_ebox.set_name ("BusControlsBaseInactiveUnselected");
|
||||
// controls_ebox.set_name ("BusControlsBaseInactiveUnselected");
|
||||
controls_base_selected_name = "BusControlsBaseInactiveSelected";
|
||||
controls_base_unselected_name = "BusControlsBaseInactiveUnselected";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,14 +133,16 @@ class MidiTimeAxisView : public RouteTimeAxisView
|
|||
Gtk::RadioMenuItem* _meter_color_mode_item;
|
||||
Gtk::RadioMenuItem* _channel_color_mode_item;
|
||||
Gtk::RadioMenuItem* _track_color_mode_item;
|
||||
Gtk::Label _playback_channel_status;
|
||||
Gtk::Label _capture_channel_status;
|
||||
Gtk::HBox _channel_status_box;
|
||||
Gtk::Button _channel_selector_button;
|
||||
Gtk::VBox _midi_controls_box;
|
||||
Gtk::Box& _range_scroomer_home;
|
||||
Gtk::Box& _piano_home;
|
||||
Gtk::Label& _playback_channel_status;
|
||||
Gtk::Label& _capture_channel_status;
|
||||
// Gtk::HBox _channel_status_box;
|
||||
WavesButton& _channel_selector_button;
|
||||
// Gtk::VBox _midi_controls_box;
|
||||
MidiChannelSelectorWindow* _channel_selector;
|
||||
Gtk::ComboBoxText _midnam_model_selector;
|
||||
Gtk::ComboBoxText _midnam_custom_device_mode_selector;
|
||||
Gtk::ComboBoxText& _midnam_model_selector;
|
||||
Gtk::ComboBoxText& _midnam_custom_device_mode_selector;
|
||||
|
||||
Gtk::CheckMenuItem* _step_edit_item;
|
||||
Gtk::Menu* default_channel_menu;
|
||||
|
|
@ -154,8 +156,9 @@ class MidiTimeAxisView : public RouteTimeAxisView
|
|||
void add_single_channel_controller_item (Gtk::Menu_Helpers::MenuList& ctl_items, int ctl, const std::string& name);
|
||||
void add_multi_channel_controller_item (Gtk::Menu_Helpers::MenuList& ctl_items, int ctl, const std::string& name);
|
||||
void build_controller_menu ();
|
||||
void toggle_channel_selector ();
|
||||
void channel_selector_hidden ();
|
||||
void channel_selector_click (WavesButton*);
|
||||
void toggle_channel_selector ();
|
||||
void channel_selector_hidden ();
|
||||
void set_channel_mode (ARDOUR::ChannelMode, uint16_t);
|
||||
|
||||
void set_note_selection (uint8_t note);
|
||||
|
|
@ -176,8 +179,8 @@ class MidiTimeAxisView : public RouteTimeAxisView
|
|||
|
||||
StepEditor* _step_editor;
|
||||
|
||||
void capture_channel_mode_changed();
|
||||
void playback_channel_mode_changed();
|
||||
void capture_channel_mode_changed();
|
||||
void playback_channel_mode_changed();
|
||||
|
||||
void ensure_pan_views (bool show = true);
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -20,6 +20,7 @@
|
|||
#define __ardour_mixer_strip__
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
|
@ -74,16 +75,16 @@ class MotionController;
|
|||
class RouteGroupMenu;
|
||||
class ArdourWindow;
|
||||
|
||||
class MixerStrip : public RouteUI, public Gtk::EventBox
|
||||
class MixerStrip : public RouteUI
|
||||
{
|
||||
public:
|
||||
MixerStrip (Mixer_UI&, ARDOUR::Session*, boost::shared_ptr<ARDOUR::Route>, bool in_mixer = true);
|
||||
MixerStrip (Mixer_UI&, ARDOUR::Session*, bool in_mixer = true);
|
||||
MixerStrip (Mixer_UI&, ARDOUR::Session*, boost::shared_ptr<ARDOUR::Route>, const std::string& layout_script_file);
|
||||
MixerStrip (Mixer_UI&, ARDOUR::Session*, const std::string& layout_script_file);
|
||||
~MixerStrip ();
|
||||
|
||||
void set_width_enum (Width, void* owner);
|
||||
Width get_width_enum () const { return _width; }
|
||||
void* width_owner () const { return _width_owner; }
|
||||
//void set_width_enum (Width, void* owner);
|
||||
// Width get_width_enum () const { return _width; }
|
||||
// void* width_owner () const { return _width_owner; }
|
||||
|
||||
GainMeter& gain_meter() { return gpm; }
|
||||
PannerUI& panner_ui() { return panners; }
|
||||
|
|
@ -110,7 +111,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
|
||||
void hide_things ();
|
||||
|
||||
sigc::signal<void> WidthChanged;
|
||||
//sigc::signal<void> WidthChanged;
|
||||
|
||||
/** The delivery that we are handling the level for with our fader has changed */
|
||||
PBD::Signal1<void, boost::weak_ptr<ARDOUR::Delivery> > DeliveryChanged;
|
||||
|
|
@ -146,39 +147,37 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
bool _embedded;
|
||||
bool _packed;
|
||||
bool _mixer_owned;
|
||||
Width _width;
|
||||
void* _width_owner;
|
||||
// Width _width;
|
||||
// void* _width_owner;
|
||||
|
||||
ArdourButton hide_button;
|
||||
ArdourButton width_button;
|
||||
Gtk::HBox width_hide_box;
|
||||
Gtk::VBox whvbox;
|
||||
Gtk::EventBox top_event_box;
|
||||
Gtk::EventBox* spacer;
|
||||
// Gtk::HBox width_hide_box;
|
||||
// Gtk::VBox whvbox;
|
||||
// Gtk::EventBox top_event_box;
|
||||
// Gtk::EventBox* spacer;
|
||||
|
||||
void hide_clicked();
|
||||
bool width_button_pressed (GdkEventButton *);
|
||||
// bool width_button_pressed (GdkEventButton *);
|
||||
|
||||
Gtk::Frame global_frame;
|
||||
Gtk::VBox global_vpacker;
|
||||
// Gtk::Frame global_frame;
|
||||
// Gtk::VBox global_vpacker;
|
||||
|
||||
Gtk::EventBox& panners_home;
|
||||
ProcessorBox processor_box;
|
||||
GainMeter gpm;
|
||||
PannerUI panners;
|
||||
|
||||
Glib::RefPtr<Gtk::SizeGroup> button_size_group;
|
||||
// Glib::RefPtr<Gtk::SizeGroup> button_size_group;
|
||||
|
||||
Gtk::Table button_table;
|
||||
Gtk::Table rec_solo_table;
|
||||
Gtk::Table top_button_table;
|
||||
Gtk::Table middle_button_table;
|
||||
Gtk::Table bottom_button_table;
|
||||
Gtk::Table auto_n_io_table;
|
||||
//Gtk::Table top_button_table;
|
||||
//Gtk::Table middle_button_table;
|
||||
//Gtk::Table bottom_button_table;
|
||||
//Gtk::Table auto_n_io_table;
|
||||
|
||||
void meter_changed ();
|
||||
|
||||
ArdourButton* midi_input_enable_button;
|
||||
Gtk::HBox input_button_box;
|
||||
Gtk::Box& gain_meter_home;
|
||||
WavesButton &midi_input_enable_button;
|
||||
//Gtk::HBox input_button_box;
|
||||
|
||||
std::string longest_label;
|
||||
|
||||
|
|
@ -189,19 +188,19 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
gint mark_update_safe ();
|
||||
guint32 mode_switch_in_progress;
|
||||
|
||||
ArdourButton name_button;
|
||||
WavesButton& name_button;
|
||||
|
||||
ArdourWindow* comment_window;
|
||||
Gtk::TextView* comment_area;
|
||||
ArdourButton _comment_button;
|
||||
WavesButton& _comment_button;
|
||||
|
||||
void comment_editor_done_editing ();
|
||||
void setup_comment_editor ();
|
||||
void open_comment_editor ();
|
||||
void toggle_comment_editor ();
|
||||
void toggle_comment_editor (WavesButton*);
|
||||
void setup_comment_button ();
|
||||
|
||||
ArdourButton group_button;
|
||||
WavesButton& group_button;
|
||||
RouteGroupMenu *group_menu;
|
||||
|
||||
gint input_press (GdkEventButton *);
|
||||
|
|
@ -264,7 +263,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
void show_passthru_color ();
|
||||
|
||||
void property_changed (const PBD::PropertyChange&);
|
||||
void name_button_resized (Gtk::Allocation&);
|
||||
// void name_button_resized (Gtk::Allocation&);
|
||||
void name_changed ();
|
||||
void update_speed_display ();
|
||||
void map_frozen ();
|
||||
|
|
@ -288,7 +287,8 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
|
||||
static int scrollbar_height;
|
||||
|
||||
void update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width width, bool input_button);
|
||||
// void update_io_button (boost::shared_ptr<ARDOUR::Route> route, Width width, bool input_button);
|
||||
void update_io_button (boost::shared_ptr<ARDOUR::Route> route, bool input_button);
|
||||
void port_connected_or_disconnected (boost::weak_ptr<ARDOUR::Port>, boost::weak_ptr<ARDOUR::Port>);
|
||||
|
||||
/** A VisibilityGroup to manage the visibility of some of our controls.
|
||||
|
|
@ -319,3 +319,5 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
|
|||
};
|
||||
|
||||
#endif /* __ardour_mixer_strip__ */
|
||||
|
||||
// How to see comment_area on the screen?
|
||||
|
|
@ -290,7 +290,7 @@ Mixer_UI::show_window ()
|
|||
|
||||
for (ri = rows.begin(); ri != rows.end(); ++ri) {
|
||||
ms = (*ri)[track_columns.strip];
|
||||
ms->set_width_enum (ms->get_width_enum (), ms->width_owner());
|
||||
//ms->set_width_enum (ms->get_width_enum (), ms->width_owner());
|
||||
/* Fix visibility of mixer strip stuff */
|
||||
ms->parameter_changed (X_("mixer-strip-visibility"));
|
||||
}
|
||||
|
|
@ -366,14 +366,14 @@ Mixer_UI::add_strips (RouteList& routes)
|
|||
continue;
|
||||
}
|
||||
|
||||
strip = new MixerStrip (*this, _session, route);
|
||||
strip = new MixerStrip (*this, _session, route, "mixer_strip.xml");
|
||||
strips.push_back (strip);
|
||||
|
||||
Config->get_default_narrow_ms() ? _strip_width = Narrow : _strip_width = Wide;
|
||||
|
||||
if (strip->width_owner() != strip) {
|
||||
strip->set_width_enum (_strip_width, this);
|
||||
}
|
||||
//if (strip->width_owner() != strip) {
|
||||
// strip->set_width_enum (_strip_width, this);
|
||||
//}
|
||||
|
||||
show_strip (strip);
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ Mixer_UI::add_strips (RouteList& routes)
|
|||
|
||||
route->PropertyChanged.connect (*this, invalidator (*this), boost::bind (&Mixer_UI::strip_property_changed, this, _1, strip), gui_context());
|
||||
|
||||
strip->WidthChanged.connect (sigc::mem_fun(*this, &Mixer_UI::strip_width_changed));
|
||||
//strip->WidthChanged.connect (sigc::mem_fun(*this, &Mixer_UI::strip_width_changed));
|
||||
strip->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::strip_button_release_event), strip));
|
||||
}
|
||||
|
||||
|
|
@ -1066,32 +1066,32 @@ Mixer_UI::redisplay_track_list ()
|
|||
_group_tabs->set_dirty ();
|
||||
}
|
||||
|
||||
void
|
||||
Mixer_UI::strip_width_changed ()
|
||||
{
|
||||
_group_tabs->set_dirty ();
|
||||
|
||||
#ifdef GTKOSX
|
||||
TreeModel::Children rows = track_model->children();
|
||||
TreeModel::Children::iterator i;
|
||||
long order;
|
||||
|
||||
for (order = 0, i = rows.begin(); i != rows.end(); ++i, ++order) {
|
||||
MixerStrip* strip = (*i)[track_columns.strip];
|
||||
|
||||
if (strip == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
bool visible = (*i)[track_columns.visible];
|
||||
|
||||
if (visible) {
|
||||
strip->queue_draw();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
//void
|
||||
//Mixer_UI::strip_width_changed ()
|
||||
//{
|
||||
// _group_tabs->set_dirty ();
|
||||
//
|
||||
//#ifdef GTKOSX
|
||||
// TreeModel::Children rows = track_model->children();
|
||||
// TreeModel::Children::iterator i;
|
||||
// long order;
|
||||
//
|
||||
// for (order = 0, i = rows.begin(); i != rows.end(); ++i, ++order) {
|
||||
// MixerStrip* strip = (*i)[track_columns.strip];
|
||||
//
|
||||
// if (strip == 0) {
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// bool visible = (*i)[track_columns.visible];
|
||||
//
|
||||
// if (visible) {
|
||||
// strip->queue_draw();
|
||||
// }
|
||||
// }
|
||||
//#endif
|
||||
//
|
||||
//}
|
||||
|
||||
struct SignalOrderRouteSorter {
|
||||
bool operator() (boost::shared_ptr<Route> a, boost::shared_ptr<Route> b) {
|
||||
|
|
@ -1485,9 +1485,9 @@ Mixer_UI::set_strip_width (Width w, bool save)
|
|||
{
|
||||
_strip_width = w;
|
||||
|
||||
for (list<MixerStrip*>::iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||
(*i)->set_width_enum (w, save ? (*i)->width_owner() : this);
|
||||
}
|
||||
//for (list<MixerStrip*>::iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||
// (*i)->set_width_enum (w, save ? (*i)->width_owner() : this);
|
||||
//}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1779,10 +1779,10 @@ Mixer_UI::parameter_changed (string const & p)
|
|||
_group_tabs->hide ();
|
||||
}
|
||||
} else if (p == "default-narrow_ms") {
|
||||
bool const s = Config->get_default_narrow_ms ();
|
||||
for (list<MixerStrip*>::iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||
(*i)->set_width_enum (s ? Narrow : Wide, this);
|
||||
}
|
||||
//bool const s = Config->get_default_narrow_ms ();
|
||||
//for (list<MixerStrip*>::iterator i = strips.begin(); i != strips.end(); ++i) {
|
||||
// (*i)->set_width_enum (s ? Narrow : Wide, this);
|
||||
//}
|
||||
} else if (p == "remote-model") {
|
||||
reset_remote_control_ids ();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR
|
|||
void redisplay_track_list ();
|
||||
bool no_track_list_redisplay;
|
||||
bool track_display_button_press (GdkEventButton*);
|
||||
void strip_width_changed ();
|
||||
//void strip_width_changed ();
|
||||
|
||||
void track_list_delete (const Gtk::TreeModel::Path&);
|
||||
void track_list_reorder (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* new_order);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ Glib::RefPtr<Gdk::Pixbuf> MonitorSection::little_knob_pixbuf;
|
|||
|
||||
MonitorSection::MonitorSection (Session* s)
|
||||
: AxisView (s)
|
||||
, RouteUI (s)
|
||||
, RouteUI (s, "monitor_section.xml")
|
||||
, _tearoff (0)
|
||||
, channel_table_viewport (*channel_table_scroller.get_hadjustment(),
|
||||
*channel_table_scroller.get_vadjustment ())
|
||||
|
|
|
|||
|
|
@ -87,25 +87,33 @@ using namespace Editing;
|
|||
using namespace std;
|
||||
using std::list;
|
||||
|
||||
RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session* sess, ArdourCanvas::Canvas& canvas)
|
||||
: AxisView(sess)
|
||||
, RouteUI(sess)
|
||||
, TimeAxisView(sess,ed,(TimeAxisView*) 0, canvas)
|
||||
RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed,
|
||||
Session* sess,
|
||||
ArdourCanvas::Canvas& canvas,
|
||||
const std::string& layout_script_file)
|
||||
: AxisView (sess)
|
||||
, RouteUI (sess, layout_script_file)
|
||||
, TimeAxisView (sess, ed, (TimeAxisView*)0, canvas, *this)
|
||||
, _view (0)
|
||||
, parent_canvas (canvas)
|
||||
, no_redraw (false)
|
||||
, button_table (3, 3)
|
||||
, route_group_button (_("g"))
|
||||
, playlist_button (_("p"))
|
||||
, automation_button (_("a"))
|
||||
//, button_table (3, 3)
|
||||
//, route_group_button (_("g"))
|
||||
//, playlist_button (_("p"))
|
||||
//, automation_button (_("a"))
|
||||
, route_group_button (get_waves_button ("route_group_button"))
|
||||
, playlist_button (get_waves_button ("playlist_button"))
|
||||
, automation_button (get_waves_button ("automation_button"))
|
||||
, automation_action_menu (0)
|
||||
, plugins_submenu_item (0)
|
||||
, route_group_menu (0)
|
||||
, playlist_action_menu (0)
|
||||
, mode_menu (0)
|
||||
, color_mode_menu (0)
|
||||
, gm (sess, "inspector_gain_meter.xml")
|
||||
, gm (sess, "track_header_gain_meter.xml")
|
||||
, _ignore_set_layer_display (false)
|
||||
|
||||
, gain_meter_home (get_box ("gain_meter_home"))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -122,8 +130,9 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
if (_route && _route->shared_peak_meter()->input_streams().n_total() == 1) {
|
||||
meter_width = 6;
|
||||
}
|
||||
|
||||
gm.set_controls (_route, _route->shared_peak_meter(), _route->amp());
|
||||
gm.get_level_meter().set_no_show_all();
|
||||
// gm.get_level_meter().set_no_show_all();
|
||||
gm.get_level_meter().setup_meters(meter_width);
|
||||
gm.update_gain_sensitive ();
|
||||
|
||||
|
|
@ -143,16 +152,16 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
}
|
||||
|
||||
mute_changed (0);
|
||||
update_solo_display ();
|
||||
update_solo_display ();
|
||||
|
||||
timestretch_rect = 0;
|
||||
no_redraw = false;
|
||||
|
||||
ignore_toggle = false;
|
||||
|
||||
route_group_button.set_name ("route button");
|
||||
playlist_button.set_name ("route button");
|
||||
automation_button.set_name ("route button");
|
||||
//route_group_button.set_name ("route button");
|
||||
//playlist_button.set_name ("route button");
|
||||
//automation_button.set_name ("route button");
|
||||
|
||||
route_group_button.signal_button_release_event().connect (sigc::mem_fun(*this, &RouteTimeAxisView::route_group_click), false);
|
||||
playlist_button.signal_clicked.connect (sigc::mem_fun(*this, &RouteTimeAxisView::playlist_click));
|
||||
|
|
@ -161,7 +170,7 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
if (is_track()) {
|
||||
|
||||
/* use icon */
|
||||
|
||||
/*
|
||||
switch (track()->mode()) {
|
||||
case ARDOUR::Normal:
|
||||
case ARDOUR::NonLayered:
|
||||
|
|
@ -171,52 +180,54 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
rec_enable_button->set_image (::get_icon (X_("record_tape_red")));
|
||||
break;
|
||||
}
|
||||
*/
|
||||
// controls_table.attach (*rec_enable_button, 5, 6, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
|
||||
controls_table.attach (*rec_enable_button, 5, 6, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
//if (is_midi_track()) {
|
||||
// ARDOUR_UI::instance()->set_tip(*rec_enable_button, _("Record (Right-click for Step Edit)"));
|
||||
// gm.set_fader_name ("MidiTrackFader");
|
||||
//} else {
|
||||
// ARDOUR_UI::instance()->set_tip(*rec_enable_button, _("Record"));
|
||||
// gm.set_fader_name ("AudioTrackFader");
|
||||
//}
|
||||
|
||||
if (is_midi_track()) {
|
||||
ARDOUR_UI::instance()->set_tip(*rec_enable_button, _("Record (Right-click for Step Edit)"));
|
||||
gm.set_fader_name ("MidiTrackFader");
|
||||
} else {
|
||||
ARDOUR_UI::instance()->set_tip(*rec_enable_button, _("Record"));
|
||||
gm.set_fader_name ("AudioTrackFader");
|
||||
}
|
||||
|
||||
rec_enable_button->set_sensitive (_session->writable());
|
||||
rec_enable_button.set_sensitive (_session->writable());
|
||||
|
||||
/* set playlist button tip to the current playlist, and make it update when it changes */
|
||||
update_playlist_tip ();
|
||||
track()->PlaylistChanged.connect (*this, invalidator (*this), ui_bind(&RouteTimeAxisView::update_playlist_tip, this), gui_context());
|
||||
|
||||
} else {
|
||||
gm.set_fader_name ("AudioBusFader");
|
||||
// gm.set_fader_name ("AudioBusFader");
|
||||
}
|
||||
playlist_button.set_visible(is_track() && track()->mode() == ARDOUR::Normal);
|
||||
|
||||
Gtk::VBox *mtrbox = manage(new Gtk::VBox());
|
||||
if (gm.get_level_meter().get_parent()) {
|
||||
gm.get_level_meter().get_parent()->remove (gm.get_level_meter());
|
||||
//Gtk::VBox *mtrbox = manage(new Gtk::VBox());
|
||||
//if (gm.get_level_meter().get_parent()) {
|
||||
// gm.get_level_meter().get_parent()->remove (gm.get_level_meter());
|
||||
//}
|
||||
//mtrbox->pack_start(gm.get_level_meter(), true, true, 2);
|
||||
//controls_hbox.pack_start(*mtrbox, false, false, 4);
|
||||
//mtrbox->show();
|
||||
LevelMeterHBox& level_meter = gm.get_level_meter();
|
||||
|
||||
if (level_meter.get_parent ()) {
|
||||
level_meter.get_parent ()->remove (level_meter);
|
||||
}
|
||||
mtrbox->pack_start(gm.get_level_meter(), true, true, 2);
|
||||
controls_hbox.pack_start(*mtrbox, false, false, 4);
|
||||
mtrbox->show();
|
||||
gain_meter_home.pack_start(level_meter, true, true);
|
||||
|
||||
_route->meter_change.connect (*this, invalidator (*this), bind (&RouteTimeAxisView::meter_changed, this), gui_context());
|
||||
_route->input()->changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context());
|
||||
_route->output()->changed.connect (*this, invalidator (*this), boost::bind (&RouteTimeAxisView::io_changed, this, _1, _2), gui_context());
|
||||
|
||||
controls_table.attach (*mute_button, 6, 7, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
// controls_table.attach (*mute_button, 6, 7, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
|
||||
if (!_route->is_master()) {
|
||||
controls_table.attach (*solo_button, 7, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
}
|
||||
if (!ARDOUR::Profile->get_trx()) {
|
||||
controls_table.attach (route_group_button, 7, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
//if (!_route->is_master()) {
|
||||
// controls_table.attach (*solo_button, 7, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
//}
|
||||
//if (!ARDOUR::Profile->get_trx()) {
|
||||
// controls_table.attach (route_group_button, 7, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 0, 0);
|
||||
// controls_table.attach (gm.get_gain_slider(), 0, 5, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::AttachOptions (0), 3, 0);
|
||||
}
|
||||
|
||||
ARDOUR_UI::instance()->set_tip(*solo_button,_("Solo"));
|
||||
ARDOUR_UI::instance()->set_tip(*mute_button,_("Mute"));
|
||||
ARDOUR_UI::instance()->set_tip(route_group_button, _("Route Group"));
|
||||
//}
|
||||
|
||||
if (is_midi_track()) {
|
||||
ARDOUR_UI::instance()->set_tip(automation_button, _("MIDI Controllers and Automation"));
|
||||
|
|
@ -226,13 +237,9 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
|
||||
label_view ();
|
||||
|
||||
if (!ARDOUR::Profile->get_trx()) {
|
||||
controls_table.attach (automation_button, 6, 7, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
}
|
||||
|
||||
if (!ARDOUR::Profile->get_trx() && is_track() && track()->mode() == ARDOUR::Normal) {
|
||||
controls_table.attach (playlist_button, 5, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
}
|
||||
//if (!ARDOUR::Profile->get_trx() && is_track() && track()->mode() == ARDOUR::Normal) {
|
||||
// controls_table.attach (playlist_button, 5, 6, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
|
||||
//}
|
||||
|
||||
_y_position = -1;
|
||||
|
||||
|
|
@ -263,9 +270,6 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||
plist->add (ARDOUR::Properties::solo, true);
|
||||
|
||||
route_group_menu = new RouteGroupMenu (_session, plist);
|
||||
|
||||
// gm.get_gain_slider().signal_scroll_event().connect(sigc::mem_fun(*this, &RouteTimeAxisView::controls_ebox_scroll), false);
|
||||
|
||||
gm.get_level_meter().signal_scroll_event().connect (sigc::mem_fun (*this, &RouteTimeAxisView::controls_ebox_scroll), false);
|
||||
}
|
||||
|
||||
|
|
@ -363,7 +367,7 @@ RouteTimeAxisView::take_name_changed (void *src)
|
|||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::playlist_click ()
|
||||
RouteTimeAxisView::playlist_click (WavesButton*)
|
||||
{
|
||||
build_playlist_menu ();
|
||||
conditionally_add_to_selection ();
|
||||
|
|
@ -371,7 +375,7 @@ RouteTimeAxisView::playlist_click ()
|
|||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::automation_click ()
|
||||
RouteTimeAxisView::automation_click (WavesButton*)
|
||||
{
|
||||
conditionally_add_to_selection ();
|
||||
build_automation_action_menu (false);
|
||||
|
|
@ -746,21 +750,21 @@ RouteTimeAxisView::set_track_mode (TrackMode mode, bool apply_to_selection)
|
|||
|
||||
track()->set_mode (mode);
|
||||
|
||||
rec_enable_button->remove ();
|
||||
rec_enable_button.remove ();
|
||||
|
||||
switch (mode) {
|
||||
case ARDOUR::NonLayered:
|
||||
case ARDOUR::Normal:
|
||||
rec_enable_button->set_image (::get_icon (X_("record_normal_red")));
|
||||
rec_enable_button->set_text (string());
|
||||
break;
|
||||
case ARDOUR::Destructive:
|
||||
rec_enable_button->set_image (::get_icon (X_("record_tape_red")));
|
||||
rec_enable_button->set_text (string());
|
||||
break;
|
||||
}
|
||||
//switch (mode) {
|
||||
//case ARDOUR::NonLayered:
|
||||
//case ARDOUR::Normal:
|
||||
// rec_enable_button.set_image (::get_icon (X_("record_normal_red")));
|
||||
// rec_enable_button.set_text (string());
|
||||
// break;
|
||||
//case ARDOUR::Destructive:
|
||||
// rec_enable_button.set_image (::get_icon (X_("record_tape_red")));
|
||||
// rec_enable_button.set_text (string());
|
||||
// break;
|
||||
//}
|
||||
|
||||
rec_enable_button->show_all ();
|
||||
rec_enable_button.show_all ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -862,43 +866,39 @@ RouteTimeAxisView::set_height (uint32_t h)
|
|||
reset_meter();
|
||||
|
||||
// gm.get_gain_slider().hide();
|
||||
mute_button->show();
|
||||
mute_button.show();
|
||||
if (!_route || _route->is_monitor()) {
|
||||
solo_button->hide();
|
||||
solo_button.hide();
|
||||
} else {
|
||||
solo_button->show();
|
||||
solo_button.show();
|
||||
}
|
||||
if (rec_enable_button)
|
||||
rec_enable_button->show();
|
||||
|
||||
rec_enable_button.show();
|
||||
|
||||
route_group_button.show();
|
||||
automation_button.show();
|
||||
|
||||
if (is_track() && track()->mode() == ARDOUR::Normal) {
|
||||
playlist_button.show();
|
||||
}
|
||||
|
||||
//if (is_track() && track()->mode() == ARDOUR::Normal) {
|
||||
// playlist_button.show();
|
||||
//}
|
||||
} else {
|
||||
|
||||
reset_meter();
|
||||
|
||||
// gm.get_gain_slider().hide();
|
||||
mute_button->show();
|
||||
mute_button.show();
|
||||
if (!_route || _route->is_monitor()) {
|
||||
solo_button->hide();
|
||||
solo_button.hide();
|
||||
} else {
|
||||
solo_button->show();
|
||||
solo_button.show();
|
||||
}
|
||||
if (rec_enable_button)
|
||||
rec_enable_button->show();
|
||||
rec_enable_button.show();
|
||||
|
||||
route_group_button.hide ();
|
||||
automation_button.hide ();
|
||||
|
||||
if (is_track() && track()->mode() == ARDOUR::Normal) {
|
||||
playlist_button.hide ();
|
||||
}
|
||||
|
||||
//if (is_track() && track()->mode() == ARDOUR::Normal) {
|
||||
// playlist_button.hide ();
|
||||
//}
|
||||
}
|
||||
|
||||
if (height_changed && !no_redraw) {
|
||||
|
|
@ -1288,7 +1288,7 @@ RouteTimeAxisView::name_entry_changed ()
|
|||
{
|
||||
TimeAxisView::name_entry_changed ();
|
||||
|
||||
string x = name_entry->get_text ();
|
||||
string x = name_entry.get_text ();
|
||||
|
||||
if (x == _route->name()) {
|
||||
return;
|
||||
|
|
@ -1297,18 +1297,18 @@ RouteTimeAxisView::name_entry_changed ()
|
|||
strip_whitespace_edges (x);
|
||||
|
||||
if (x.length() == 0) {
|
||||
name_entry->set_text (_route->name());
|
||||
name_entry.set_text (_route->name());
|
||||
return;
|
||||
}
|
||||
|
||||
if (_session->route_name_internal (x)) {
|
||||
ARDOUR_UI::instance()->popup_error (string_compose (_("You cannot create a track with that name as it is reserved for %1"),
|
||||
PROGRAM_NAME));
|
||||
name_entry->grab_focus ();
|
||||
name_entry.grab_focus ();
|
||||
} else if (RouteUI::verify_new_route_name (x)) {
|
||||
_route->set_name (x);
|
||||
} else {
|
||||
name_entry->grab_focus ();
|
||||
name_entry.grab_focus ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1616,11 +1616,11 @@ RouteTimeAxisView::map_frozen ()
|
|||
switch (track()->freeze_state()) {
|
||||
case Track::Frozen:
|
||||
playlist_button.set_sensitive (false);
|
||||
rec_enable_button->set_sensitive (false);
|
||||
rec_enable_button.set_sensitive (false);
|
||||
break;
|
||||
default:
|
||||
playlist_button.set_sensitive (true);
|
||||
rec_enable_button->set_sensitive (true);
|
||||
rec_enable_button.set_sensitive (true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -2337,8 +2337,8 @@ RouteTimeAxisView::add_underlay (StreamView* v, bool /*update_xml*/)
|
|||
|
||||
RouteTimeAxisView& other = v->trackview();
|
||||
|
||||
if (find(_underlay_streams.begin(), _underlay_streams.end(), v) == _underlay_streams.end()) {
|
||||
if (find(other._underlay_mirrors.begin(), other._underlay_mirrors.end(), this) != other._underlay_mirrors.end()) {
|
||||
if (std::find(_underlay_streams.begin(), _underlay_streams.end(), v) == _underlay_streams.end()) {
|
||||
if (std::find(other._underlay_mirrors.begin(), other._underlay_mirrors.end(), this) != other._underlay_mirrors.end()) {
|
||||
fatal << _("programming error: underlay reference pointer pairs are inconsistent!") << endmsg;
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -2369,11 +2369,11 @@ RouteTimeAxisView::remove_underlay (StreamView* v)
|
|||
return;
|
||||
}
|
||||
|
||||
UnderlayList::iterator it = find(_underlay_streams.begin(), _underlay_streams.end(), v);
|
||||
UnderlayList::iterator it = std::find(_underlay_streams.begin(), _underlay_streams.end(), v);
|
||||
RouteTimeAxisView& other = v->trackview();
|
||||
|
||||
if (it != _underlay_streams.end()) {
|
||||
UnderlayMirrorList::iterator gm = find(other._underlay_mirrors.begin(), other._underlay_mirrors.end(), this);
|
||||
UnderlayMirrorList::iterator gm = std::find(other._underlay_mirrors.begin(), other._underlay_mirrors.end(), this);
|
||||
|
||||
if (gm == other._underlay_mirrors.end()) {
|
||||
fatal << _("programming error: underlay reference pointer pairs are inconsistent!") << endmsg;
|
||||
|
|
@ -2394,27 +2394,27 @@ RouteTimeAxisView::remove_underlay (StreamView* v)
|
|||
void
|
||||
RouteTimeAxisView::set_button_names ()
|
||||
{
|
||||
if (_route && _route->solo_safe()) {
|
||||
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() | Gtkmm2ext::Insensitive));
|
||||
} else {
|
||||
solo_button->set_visual_state (Gtkmm2ext::VisualState (solo_button->visual_state() & ~Gtkmm2ext::Insensitive));
|
||||
}
|
||||
if (Config->get_solo_control_is_listen_control()) {
|
||||
switch (Config->get_listen_position()) {
|
||||
case AfterFaderListen:
|
||||
solo_button->set_text (_("A"));
|
||||
ARDOUR_UI::instance()->set_tip (*solo_button, _("After-fade listen (AFL)"));
|
||||
break;
|
||||
case PreFaderListen:
|
||||
solo_button->set_text (_("P"));
|
||||
ARDOUR_UI::instance()->set_tip (*solo_button, _("Pre-fade listen (PFL)"));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
solo_button->set_text (_("s"));
|
||||
ARDOUR_UI::instance()->set_tip (*solo_button, _("Solo"));
|
||||
}
|
||||
mute_button->set_text (_("m"));
|
||||
//if (_route && _route->solo_safe()) {
|
||||
// solo_button.set_visual_state (Gtkmm2ext::VisualState (solo_button.visual_state() | Gtkmm2ext::Insensitive));
|
||||
//} else {
|
||||
// solo_button.set_visual_state (Gtkmm2ext::VisualState (solo_button.visual_state() & ~Gtkmm2ext::Insensitive));
|
||||
//}
|
||||
//if (Config->get_solo_control_is_listen_control()) {
|
||||
// switch (Config->get_listen_position()) {
|
||||
// case AfterFaderListen:
|
||||
// solo_button.set_text (_("A"));
|
||||
// ARDOUR_UI::instance()->set_tip (*solo_button, _("After-fade listen (AFL)"));
|
||||
// break;
|
||||
// case PreFaderListen:
|
||||
// solo_button.set_text (_("P"));
|
||||
// ARDOUR_UI::instance()->set_tip (*solo_button, _("Pre-fade listen (PFL)"));
|
||||
// break;
|
||||
// }
|
||||
//} else {
|
||||
// solo_button.set_text (_("s"));
|
||||
// ARDOUR_UI::instance()->set_tip (*solo_button, _("Solo"));
|
||||
//}
|
||||
//mute_button->set_text (_("m"));
|
||||
}
|
||||
|
||||
Gtk::CheckMenuItem*
|
||||
|
|
|
|||
|
|
@ -74,7 +74,10 @@ class RouteGroupMenu;
|
|||
class RouteTimeAxisView : public RouteUI, public TimeAxisView
|
||||
{
|
||||
public:
|
||||
RouteTimeAxisView (PublicEditor&, ARDOUR::Session*, ArdourCanvas::Canvas& canvas);
|
||||
RouteTimeAxisView (PublicEditor&,
|
||||
ARDOUR::Session*,
|
||||
ArdourCanvas::Canvas& canvas,
|
||||
const std::string& layout_script_file);
|
||||
virtual ~RouteTimeAxisView ();
|
||||
|
||||
void set_route (boost::shared_ptr<ARDOUR::Route>);
|
||||
|
|
@ -219,13 +222,13 @@ protected:
|
|||
|
||||
void set_align_choice (Gtk::RadioMenuItem*, ARDOUR::AlignChoice, bool apply_to_selection = false);
|
||||
|
||||
void playlist_click ();
|
||||
void playlist_click (WavesButton*);
|
||||
void show_playlist_selector ();
|
||||
void playlist_changed ();
|
||||
|
||||
void rename_current_playlist ();
|
||||
|
||||
void automation_click ();
|
||||
void automation_click (WavesButton*);
|
||||
|
||||
virtual void show_all_automation (bool apply_to_selection = false);
|
||||
virtual void show_existing_automation (bool apply_to_selection = false);
|
||||
|
|
@ -247,11 +250,11 @@ protected:
|
|||
ArdourCanvas::Canvas& parent_canvas;
|
||||
bool no_redraw;
|
||||
|
||||
Gtk::HBox other_button_hbox;
|
||||
Gtk::Table button_table;
|
||||
ArdourButton route_group_button;
|
||||
ArdourButton playlist_button;
|
||||
ArdourButton automation_button;
|
||||
// Gtk::HBox other_button_hbox;
|
||||
// Gtk::Table button_table;
|
||||
WavesButton& route_group_button;
|
||||
WavesButton& playlist_button;
|
||||
WavesButton& automation_button;
|
||||
|
||||
Gtk::Menu subplugin_menu;
|
||||
Gtk::Menu* automation_action_menu;
|
||||
|
|
@ -287,6 +290,7 @@ protected:
|
|||
|
||||
void post_construct ();
|
||||
|
||||
Gtk::Box& gain_meter_home;
|
||||
GainMeter gm;
|
||||
|
||||
XMLNode* underlay_xml_node;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,9 @@
|
|||
#include "ardour/template_utils.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
#include "dbg_msg.h"
|
||||
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace ARDOUR;
|
||||
|
|
@ -64,14 +67,23 @@ uint32_t RouteUI::_max_invert_buttons = 3;
|
|||
PBD::Signal1<void, boost::shared_ptr<Route> > RouteUI::BusSendDisplayChanged;
|
||||
boost::weak_ptr<Route> RouteUI::_showing_sends_to;
|
||||
|
||||
RouteUI::RouteUI (ARDOUR::Session* sess)
|
||||
: AxisView(sess)
|
||||
, mute_menu(0)
|
||||
, solo_menu(0)
|
||||
, sends_menu(0)
|
||||
, record_menu(0)
|
||||
, _invert_menu(0)
|
||||
RouteUI::RouteUI (ARDOUR::Session* sess, const std::string& layout_script_file)
|
||||
: AxisView (sess)
|
||||
, Gtk::EventBox ()
|
||||
, WavesUI (layout_script_file, *this)
|
||||
, mute_menu (0)
|
||||
, solo_menu (0)
|
||||
, sends_menu (0)
|
||||
, record_menu (0)
|
||||
, _invert_menu (0)
|
||||
, mute_button (get_waves_button ("mute_button"))
|
||||
, solo_button (get_waves_button ("solo_button"))
|
||||
, rec_enable_button (get_waves_button ("rec_enable_button"))
|
||||
, show_sends_button (get_waves_button ("show_sends_button"))
|
||||
, monitor_input_button (get_waves_button ("monitor_input_button"))
|
||||
, monitor_disk_button (get_waves_button ("monitor_disk_button"))
|
||||
{
|
||||
std::cout << "RouteUI::RouteUI (" << layout_script_file << ")" << std::endl;
|
||||
if (sess) init ();
|
||||
}
|
||||
|
||||
|
|
@ -94,56 +106,24 @@ RouteUI::init ()
|
|||
mute_menu = 0;
|
||||
solo_menu = 0;
|
||||
sends_menu = 0;
|
||||
record_menu = 0;
|
||||
record_menu = 0;
|
||||
_invert_menu = 0;
|
||||
pre_fader_mute_check = 0;
|
||||
post_fader_mute_check = 0;
|
||||
listen_mute_check = 0;
|
||||
main_mute_check = 0;
|
||||
solo_safe_check = 0;
|
||||
solo_isolated_check = 0;
|
||||
solo_isolated_led = 0;
|
||||
solo_safe_led = 0;
|
||||
solo_safe_check = 0;
|
||||
solo_isolated_check = 0;
|
||||
_solo_release = 0;
|
||||
_mute_release = 0;
|
||||
denormal_menu_item = 0;
|
||||
step_edit_item = 0;
|
||||
step_edit_item = 0;
|
||||
multiple_mute_change = false;
|
||||
multiple_solo_change = false;
|
||||
_i_am_the_modifier = 0;
|
||||
|
||||
setup_invert_buttons ();
|
||||
|
||||
mute_button = manage (new ArdourButton);
|
||||
mute_button->set_name ("mute button");
|
||||
UI::instance()->set_tip (mute_button, _("Mute this track"), "");
|
||||
|
||||
solo_button = manage (new ArdourButton);
|
||||
solo_button->set_name ("solo button");
|
||||
UI::instance()->set_tip (solo_button, _("Mute other (non-soloed) tracks"), "");
|
||||
solo_button->set_no_show_all (true);
|
||||
|
||||
rec_enable_button = manage (new ArdourButton);
|
||||
rec_enable_button->set_name ("record enable button");
|
||||
rec_enable_button->set_tweaks (ArdourButton::ImplicitUsesSolidColor);
|
||||
UI::instance()->set_tip (rec_enable_button, _("Enable recording on this track"), "");
|
||||
|
||||
show_sends_button = manage (new ArdourButton);
|
||||
show_sends_button->set_name ("send alert button");
|
||||
UI::instance()->set_tip (show_sends_button, _("make mixer strips show sends to this bus"), "");
|
||||
|
||||
monitor_input_button = manage (new ArdourButton (ArdourButton::default_elements));
|
||||
monitor_input_button->set_name ("monitor button");
|
||||
monitor_input_button->set_text (_("In"));
|
||||
UI::instance()->set_tip (monitor_input_button, _("Monitor input"), "");
|
||||
monitor_input_button->set_no_show_all (true);
|
||||
|
||||
monitor_disk_button = manage (new ArdourButton (ArdourButton::default_elements));
|
||||
monitor_disk_button->set_name ("monitor button");
|
||||
monitor_disk_button->set_text (_("Disk"));
|
||||
UI::instance()->set_tip (monitor_disk_button, _("Monitor playback"), "");
|
||||
monitor_disk_button->set_no_show_all (true);
|
||||
|
||||
_session->SoloChanged.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::solo_changed_so_update_mute, this), gui_context());
|
||||
_session->TransportStateChange.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::check_rec_enable_sensitivity, this), gui_context());
|
||||
_session->RecordStateChanged.connect (_session_connections, invalidator (*this), boost::bind (&RouteUI::session_rec_enable_changed, this), gui_context());
|
||||
|
|
@ -151,25 +131,25 @@ RouteUI::init ()
|
|||
_session->config.ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteUI::parameter_changed, this, _1), gui_context());
|
||||
Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&RouteUI::parameter_changed, this, _1), gui_context());
|
||||
|
||||
rec_enable_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::rec_enable_press), false);
|
||||
rec_enable_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::rec_enable_release), false);
|
||||
rec_enable_button.signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::rec_enable_press), false);
|
||||
rec_enable_button.signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::rec_enable_release), false);
|
||||
|
||||
show_sends_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::show_sends_press), false);
|
||||
show_sends_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::show_sends_release));
|
||||
show_sends_button.signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::show_sends_press), false);
|
||||
show_sends_button.signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::show_sends_release));
|
||||
|
||||
solo_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::solo_press), false);
|
||||
solo_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::solo_release), false);
|
||||
mute_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::mute_press), false);
|
||||
mute_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::mute_release), false);
|
||||
solo_button.signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::solo_press), false);
|
||||
solo_button.signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::solo_release), false);
|
||||
mute_button.signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::mute_press), false);
|
||||
mute_button.signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::mute_release), false);
|
||||
|
||||
monitor_input_button->set_distinct_led_click (false);
|
||||
monitor_disk_button->set_distinct_led_click (false);
|
||||
// monitor_input_button.set_distinct_led_click (false);
|
||||
// monitor_disk_button.set_distinct_led_click (false);
|
||||
|
||||
monitor_input_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_input_press));
|
||||
monitor_input_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_input_release));
|
||||
monitor_input_button.signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_input_press));
|
||||
monitor_input_button.signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_input_release));
|
||||
|
||||
monitor_disk_button->signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_disk_press));
|
||||
monitor_disk_button->signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_disk_release));
|
||||
monitor_disk_button.signal_button_press_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_disk_press));
|
||||
monitor_disk_button.signal_button_release_event().connect (sigc::mem_fun(*this, &RouteUI::monitor_disk_release));
|
||||
|
||||
BusSendDisplayChanged.connect_same_thread (*this, boost::bind(&RouteUI::bus_send_display_changed, this, _1));
|
||||
}
|
||||
|
|
@ -209,8 +189,8 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
|||
rp->DropReferences.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::self_delete, this), gui_context());
|
||||
}
|
||||
|
||||
mute_button->set_controllable (_route->mute_control());
|
||||
solo_button->set_controllable (_route->solo_control());
|
||||
mute_button.set_controllable (_route->mute_control());
|
||||
solo_button.set_controllable (_route->solo_control());
|
||||
|
||||
_route->active_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_active_changed, this), gui_context());
|
||||
_route->mute_changed.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::mute_changed, this, _1), gui_context());
|
||||
|
|
@ -231,8 +211,8 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
|||
|
||||
t->RecordEnableChanged.connect (route_connections, invalidator (*this), boost::bind (&RouteUI::route_rec_enable_changed, this), gui_context());
|
||||
|
||||
rec_enable_button->show();
|
||||
rec_enable_button->set_controllable (t->rec_enable_control());
|
||||
rec_enable_button.show();
|
||||
rec_enable_button.set_controllable (t->rec_enable_control());
|
||||
|
||||
if (is_midi_track()) {
|
||||
midi_track()->StepEditStatusChange.connect (route_connections, invalidator (*this),
|
||||
|
|
@ -254,15 +234,15 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
|
|||
update_monitoring_display ();
|
||||
}
|
||||
|
||||
mute_button->unset_flags (Gtk::CAN_FOCUS);
|
||||
solo_button->unset_flags (Gtk::CAN_FOCUS);
|
||||
mute_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
solo_button.unset_flags (Gtk::CAN_FOCUS);
|
||||
|
||||
mute_button->show();
|
||||
mute_button.show();
|
||||
|
||||
if (_route->is_monitor() || _route->is_master()) {
|
||||
solo_button->hide ();
|
||||
solo_button.hide ();
|
||||
} else {
|
||||
solo_button->show();
|
||||
solo_button.show();
|
||||
}
|
||||
|
||||
map_frozen ();
|
||||
|
|
@ -297,31 +277,22 @@ RouteUI::mute_press (GdkEventButton* ev)
|
|||
multiple_mute_change = false;
|
||||
|
||||
if (!_i_am_the_modifier) {
|
||||
|
||||
if (Keyboard::is_context_menu_event (ev)) {
|
||||
|
||||
if (mute_menu == 0){
|
||||
build_mute_menu();
|
||||
}
|
||||
|
||||
mute_menu->popup(0,ev->time);
|
||||
|
||||
} else {
|
||||
|
||||
if (Keyboard::is_button2_event (ev)) {
|
||||
// Primary-button2 click is the midi binding click
|
||||
// button2-click is "momentary"
|
||||
|
||||
|
||||
if (mute_button->on_button_press_event (ev)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mute_button.on_button_press_event (ev)) {
|
||||
return true;
|
||||
}
|
||||
_mute_release = new SoloMuteRelease (_route->muted ());
|
||||
}
|
||||
|
||||
if (ev->button == 1 || Keyboard::is_button2_event (ev)) {
|
||||
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||
|
||||
/* toggle mute on everything (but
|
||||
|
|
@ -423,30 +394,23 @@ RouteUI::solo_press(GdkEventButton* ev)
|
|||
multiple_solo_change = false;
|
||||
|
||||
if (!_i_am_the_modifier) {
|
||||
|
||||
if (Keyboard::is_context_menu_event (ev)) {
|
||||
|
||||
if (! (solo_isolated_led && solo_isolated_led->is_visible()) ||
|
||||
/*
|
||||
if (! (solo_isolated_led && solo_isolated_led->is_visible()) ||
|
||||
! (solo_safe_led && solo_safe_led->is_visible())) {
|
||||
|
||||
if (solo_menu == 0) {
|
||||
build_solo_menu ();
|
||||
}
|
||||
|
||||
solo_menu->popup (1, ev->time);
|
||||
}
|
||||
|
||||
if (solo_menu == 0) {
|
||||
build_solo_menu ();
|
||||
}
|
||||
solo_menu->popup (1, ev->time);
|
||||
}
|
||||
*/
|
||||
} else {
|
||||
|
||||
if (Keyboard::is_button2_event (ev)) {
|
||||
|
||||
// Primary-button2 click is the midi binding click
|
||||
// button2-click is "momentary"
|
||||
|
||||
if (solo_button->on_button_press_event (ev)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (solo_button.on_button_press_event (ev)) {
|
||||
return true;
|
||||
}
|
||||
_solo_release = new SoloMuteRelease (_route->self_soloed());
|
||||
}
|
||||
|
||||
|
|
@ -603,16 +567,17 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
|
|||
}
|
||||
}
|
||||
|
||||
if (!_i_am_the_modifier && is_track() && rec_enable_button) {
|
||||
// if (!_i_am_the_modifier && is_track() && rec_enable_button) {
|
||||
if (!_i_am_the_modifier && is_track()) {
|
||||
|
||||
if (Keyboard::is_button2_event (ev)) {
|
||||
|
||||
// do nothing on midi sigc::bind event
|
||||
return rec_enable_button->on_button_press_event (ev);
|
||||
return rec_enable_button.on_button_press_event (ev);
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||
|
||||
_session->set_record_enabled (_session->get_routes(), !rec_enable_button->active_state());
|
||||
_session->set_record_enabled (_session->get_routes(), !rec_enable_button.active_state());
|
||||
|
||||
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
|
||||
|
|
@ -633,7 +598,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
|
|||
rl->push_back (_route);
|
||||
}
|
||||
|
||||
_session->set_record_enabled (rl, !rec_enable_button->active_state(), Session::rt_cleanup, true);
|
||||
_session->set_record_enabled (rl, !rec_enable_button.active_state(), Session::rt_cleanup, true);
|
||||
}
|
||||
|
||||
} else if (Keyboard::is_context_menu_event (ev)) {
|
||||
|
|
@ -644,7 +609,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev)
|
|||
|
||||
boost::shared_ptr<RouteList> rl (new RouteList);
|
||||
rl->push_back (route());
|
||||
_session->set_record_enabled (rl, !rec_enable_button->active_state());
|
||||
_session->set_record_enabled (rl, !rec_enable_button.active_state());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -673,22 +638,22 @@ RouteUI::update_monitoring_display ()
|
|||
MonitorState ms = t->monitoring_state();
|
||||
|
||||
if (t->monitoring_choice() & MonitorInput) {
|
||||
monitor_input_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
monitor_input_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
if (ms & MonitoringInput) {
|
||||
monitor_input_button->set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
monitor_input_button.set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
} else {
|
||||
monitor_input_button->unset_active_state ();
|
||||
monitor_input_button.unset_active_state ();
|
||||
}
|
||||
}
|
||||
|
||||
if (t->monitoring_choice() & MonitorDisk) {
|
||||
monitor_disk_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
monitor_disk_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
if (ms & MonitoringDisk) {
|
||||
monitor_disk_button->set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
monitor_disk_button.set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
} else {
|
||||
monitor_disk_button->unset_active_state ();
|
||||
monitor_disk_button.unset_active_state ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -807,29 +772,19 @@ RouteUI::toggle_step_edit ()
|
|||
void
|
||||
RouteUI::step_edit_changed (bool yn)
|
||||
{
|
||||
if (yn) {
|
||||
if (rec_enable_button) {
|
||||
rec_enable_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
}
|
||||
|
||||
start_step_editing ();
|
||||
|
||||
if (step_edit_item) {
|
||||
step_edit_item->set_active (true);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (rec_enable_button) {
|
||||
rec_enable_button->unset_active_state ();
|
||||
}
|
||||
|
||||
stop_step_editing ();
|
||||
|
||||
if (step_edit_item) {
|
||||
step_edit_item->set_active (false);
|
||||
}
|
||||
if (yn) {
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
start_step_editing ();
|
||||
if (step_edit_item) {
|
||||
step_edit_item->set_active (true);
|
||||
}
|
||||
} else {
|
||||
rec_enable_button.unset_active_state ();
|
||||
stop_step_editing ();
|
||||
if (step_edit_item) {
|
||||
step_edit_item->set_active (false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -944,7 +899,7 @@ RouteUI::show_sends_press(GdkEventButton* ev)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (!_i_am_the_modifier && !is_track() && show_sends_button) {
|
||||
if (!_i_am_the_modifier && !is_track()) {
|
||||
|
||||
if (Keyboard::is_button2_event (ev) && Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
|
||||
|
|
@ -983,14 +938,10 @@ RouteUI::show_sends_release (GdkEventButton*)
|
|||
void
|
||||
RouteUI::send_blink (bool onoff)
|
||||
{
|
||||
if (!show_sends_button) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (onoff) {
|
||||
show_sends_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
show_sends_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
show_sends_button->unset_active_state ();
|
||||
show_sends_button.unset_active_state ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1065,30 +1016,29 @@ RouteUI::update_solo_display ()
|
|||
solo_isolated_check->set_active (yn);
|
||||
}
|
||||
|
||||
set_button_names ();
|
||||
set_button_names ();
|
||||
|
||||
if (solo_isolated_led) {
|
||||
/* if (solo_isolated_led) {
|
||||
if (_route->solo_isolated()) {
|
||||
solo_isolated_led->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
solo_isolated_led->unset_active_state ();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if (solo_safe_led) {
|
||||
/* if (solo_safe_led) {
|
||||
if (_route->solo_safe()) {
|
||||
solo_safe_led->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
solo_safe_led.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
} else {
|
||||
solo_safe_led->unset_active_state ();
|
||||
solo_safe_led.unset_active_state ();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
solo_button->set_active_state (solo_active_state (_route));
|
||||
solo_button.set_active_state (solo_active_state (_route));
|
||||
|
||||
/* some changes to solo status can affect mute display, so catch up
|
||||
*/
|
||||
|
||||
update_mute_display ();
|
||||
/* some changes to solo status can affect mute display, so catch up
|
||||
*/
|
||||
update_mute_display ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1145,7 +1095,7 @@ RouteUI::update_mute_display ()
|
|||
return;
|
||||
}
|
||||
|
||||
mute_button->set_active_state (mute_active_state (_session, _route));
|
||||
mute_button.set_active_state (mute_active_state (_session, _route));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1165,29 +1115,29 @@ RouteUI::session_rec_enable_changed ()
|
|||
void
|
||||
RouteUI::update_rec_display ()
|
||||
{
|
||||
if (!rec_enable_button || !_route) {
|
||||
// if (!rec_enable_button || !_route) {
|
||||
if (!_route) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_route->record_enabled()) {
|
||||
switch (_session->record_status ()) {
|
||||
case Session::Recording:
|
||||
rec_enable_button->set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
break;
|
||||
switch (_session->record_status ()) {
|
||||
case Session::Recording:
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::ExplicitActive);
|
||||
break;
|
||||
|
||||
case Session::Disabled:
|
||||
case Session::Enabled:
|
||||
rec_enable_button->set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
break;
|
||||
case Session::Disabled:
|
||||
case Session::Enabled:
|
||||
rec_enable_button.set_active_state (Gtkmm2ext::ImplicitActive);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (step_edit_item) {
|
||||
step_edit_item->set_sensitive (false);
|
||||
}
|
||||
}
|
||||
|
||||
if (step_edit_item) {
|
||||
step_edit_item->set_sensitive (false);
|
||||
}
|
||||
} else {
|
||||
rec_enable_button->unset_active_state ();
|
||||
rec_enable_button.unset_active_state ();
|
||||
|
||||
if (step_edit_item) {
|
||||
step_edit_item->set_sensitive (true);
|
||||
|
|
@ -1316,6 +1266,8 @@ RouteUI::muting_change ()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
bool
|
||||
RouteUI::solo_isolate_button_release (GdkEventButton* ev)
|
||||
{
|
||||
|
|
@ -1323,23 +1275,23 @@ RouteUI::solo_isolate_button_release (GdkEventButton* ev)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool view = solo_isolated_led->active_state();
|
||||
bool view = solo_isolated_led.active_state();
|
||||
bool model = _route->solo_isolated();
|
||||
|
||||
/* called BEFORE the view has changed */
|
||||
*//* called BEFORE the view has changed *//*
|
||||
|
||||
if (ev->button == 1) {
|
||||
if (Keyboard::modifier_state_equals (ev->state, Keyboard::ModifierMask (Keyboard::PrimaryModifier|Keyboard::TertiaryModifier))) {
|
||||
|
||||
if (model) {
|
||||
/* disable isolate for all routes */
|
||||
*//* disable isolate for all routes *//*
|
||||
_session->set_solo_isolated (_session->get_routes(), false, Session::rt_cleanup, true);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (model == view) {
|
||||
|
||||
/* flip just this route */
|
||||
*//* flip just this route *//*
|
||||
|
||||
boost::shared_ptr<RouteList> rl (new RouteList);
|
||||
rl->push_back (_route);
|
||||
|
|
@ -1350,16 +1302,19 @@ RouteUI::solo_isolate_button_release (GdkEventButton* ev)
|
|||
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
bool
|
||||
RouteUI::solo_safe_button_release (GdkEventButton* ev)
|
||||
{
|
||||
if (ev->button == 1) {
|
||||
_route->set_solo_safe (!solo_safe_led->active_state(), this);
|
||||
_route->set_solo_safe (!solo_safe_led.active_state(), this);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
void
|
||||
RouteUI::toggle_solo_isolated (Gtk::CheckMenuItem* check)
|
||||
|
|
@ -1680,10 +1635,10 @@ RouteUI::map_frozen ()
|
|||
if (at) {
|
||||
switch (at->freeze_state()) {
|
||||
case AudioTrack::Frozen:
|
||||
rec_enable_button->set_sensitive (false);
|
||||
rec_enable_button.set_sensitive (false);
|
||||
break;
|
||||
default:
|
||||
rec_enable_button->set_sensitive (true);
|
||||
rec_enable_button.set_sensitive (true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1735,10 +1690,10 @@ RouteUI::save_as_template ()
|
|||
void
|
||||
RouteUI::check_rec_enable_sensitivity ()
|
||||
{
|
||||
if (_session->transport_rolling() && rec_enable_button->active_state() && Config->get_disable_disarm_during_roll()) {
|
||||
rec_enable_button->set_sensitive (false);
|
||||
if (_session->transport_rolling() && rec_enable_button.active_state() && Config->get_disable_disarm_during_roll()) {
|
||||
rec_enable_button.set_sensitive (false);
|
||||
} else {
|
||||
rec_enable_button->set_sensitive (true);
|
||||
rec_enable_button.set_sensitive (true);
|
||||
}
|
||||
|
||||
update_monitoring_display ();
|
||||
|
|
@ -1842,7 +1797,7 @@ RouteUI::setup_invert_buttons ()
|
|||
{
|
||||
/* remove old invert buttons */
|
||||
for (vector<ArdourButton*>::iterator i = _invert_buttons.begin(); i != _invert_buttons.end(); ++i) {
|
||||
_invert_button_box.remove (**i);
|
||||
//_invert_button_box.remove (**i);
|
||||
}
|
||||
|
||||
_invert_buttons.clear ();
|
||||
|
|
@ -1879,11 +1834,11 @@ RouteUI::setup_invert_buttons ()
|
|||
}
|
||||
|
||||
_invert_buttons.push_back (b);
|
||||
_invert_button_box.pack_start (*b);
|
||||
//_invert_button_box.pack_start (*b);
|
||||
}
|
||||
|
||||
_invert_button_box.set_spacing (1);
|
||||
_invert_button_box.show_all ();
|
||||
//_invert_button_box.set_spacing (1);
|
||||
// _invert_button_box.show_all ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -2032,10 +1987,10 @@ void
|
|||
RouteUI::bus_send_display_changed (boost::shared_ptr<Route> send_to)
|
||||
{
|
||||
if (_route == send_to) {
|
||||
show_sends_button->set_active (true);
|
||||
show_sends_button.set_active (true);
|
||||
send_blink_connection = ARDOUR_UI::instance()->Blink.connect (sigc::mem_fun (*this, &RouteUI::send_blink));
|
||||
} else {
|
||||
show_sends_button->set_active (false);
|
||||
show_sends_button.set_active (false);
|
||||
send_blink_connection.disconnect ();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "ardour/route_group.h"
|
||||
#include "ardour/track.h"
|
||||
|
||||
#include "waves_ui.h"
|
||||
#include "axis_view.h"
|
||||
#include "selectable.h"
|
||||
|
||||
|
|
@ -52,10 +53,10 @@ namespace Gtk {
|
|||
class BindableToggleButton;
|
||||
class ArdourButton;
|
||||
|
||||
class RouteUI : public virtual AxisView
|
||||
class RouteUI : public Gtk::EventBox, public WavesUI, public virtual AxisView
|
||||
{
|
||||
public:
|
||||
RouteUI(ARDOUR::Session*);
|
||||
RouteUI(ARDOUR::Session*, const std::string& layout_script_file);
|
||||
|
||||
virtual ~RouteUI();
|
||||
|
||||
|
|
@ -92,18 +93,17 @@ class RouteUI : public virtual AxisView
|
|||
bool multiple_mute_change;
|
||||
bool multiple_solo_change;
|
||||
|
||||
Gtk::HBox _invert_button_box;
|
||||
ArdourButton* mute_button;
|
||||
ArdourButton* solo_button;
|
||||
ArdourButton* rec_enable_button; /* audio tracks */
|
||||
ArdourButton* show_sends_button; /* busses */
|
||||
ArdourButton* monitor_input_button;
|
||||
ArdourButton* monitor_disk_button;
|
||||
WavesButton& mute_button;
|
||||
WavesButton& solo_button;
|
||||
WavesButton& rec_enable_button; /* audio tracks */
|
||||
WavesButton& show_sends_button; /* busses */
|
||||
WavesButton& monitor_input_button;
|
||||
WavesButton& monitor_disk_button;
|
||||
|
||||
Glib::RefPtr<Gdk::Pixbuf> solo_safe_pixbuf;
|
||||
|
||||
ArdourButton* solo_safe_led;
|
||||
ArdourButton* solo_isolated_led;
|
||||
// WavesButton& solo_safe_led;
|
||||
// WavesButton& solo_isolated_led;
|
||||
|
||||
Gtk::Label monitor_input_button_label;
|
||||
Gtk::Label monitor_disk_button_label;
|
||||
|
|
@ -157,8 +157,8 @@ class RouteUI : public virtual AxisView
|
|||
void solo_isolated_toggle (void*, Gtk::CheckMenuItem*);
|
||||
void toggle_solo_isolated (Gtk::CheckMenuItem*);
|
||||
|
||||
bool solo_isolate_button_release (GdkEventButton*);
|
||||
bool solo_safe_button_release (GdkEventButton*);
|
||||
// bool solo_isolate_button_release (GdkEventButton*);
|
||||
// bool solo_safe_button_release (GdkEventButton*);
|
||||
|
||||
void solo_safe_toggle (void*, Gtk::CheckMenuItem*);
|
||||
void toggle_solo_safe (Gtk::CheckMenuItem*);
|
||||
|
|
@ -188,8 +188,8 @@ class RouteUI : public virtual AxisView
|
|||
virtual void route_active_changed () {}
|
||||
void set_route_active (bool, bool);
|
||||
|
||||
Gtk::Menu* record_menu;
|
||||
void build_record_menu ();
|
||||
Gtk::Menu* record_menu;
|
||||
void build_record_menu ();
|
||||
|
||||
Gtk::CheckMenuItem *step_edit_item;
|
||||
void toggle_step_edit ();
|
||||
|
|
@ -226,7 +226,7 @@ class RouteUI : public virtual AxisView
|
|||
*/
|
||||
static PBD::Signal1<void, boost::shared_ptr<ARDOUR::Route> > BusSendDisplayChanged;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
PBD::ScopedConnectionList route_connections;
|
||||
bool self_destruct;
|
||||
|
||||
|
|
@ -234,10 +234,10 @@ class RouteUI : public virtual AxisView
|
|||
void reset ();
|
||||
|
||||
void self_delete ();
|
||||
virtual void start_step_editing () {}
|
||||
virtual void stop_step_editing() {}
|
||||
virtual void start_step_editing () {}
|
||||
virtual void stop_step_editing() {}
|
||||
|
||||
void set_invert_sensitive (bool);
|
||||
void set_invert_sensitive (bool);
|
||||
bool verify_new_route_name (const std::string& name);
|
||||
|
||||
void route_gui_changed (std::string);
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ void SessionDialog::init()
|
|||
EngineStateController::instance ()->InputConfigChanged.connect (_system_config_update, invalidator (*this), boost::bind (&SessionDialog::on_system_configuration_change, this), gui_context());
|
||||
EngineStateController::instance ()->OutputConfigChanged.connect (_system_config_update, invalidator (*this), boost::bind (&SessionDialog::on_system_configuration_change, this), gui_context());
|
||||
EngineStateController::instance ()->EngineRunning.connect (_system_config_update, invalidator (*this), boost::bind (&SessionDialog::on_system_configuration_change, this), gui_context());
|
||||
EngineStateController::instance ()->PortRegistrationChanged.connect(_system_config_update, invalidator (*this), boost::bind (&SessionDialog::on_system_configuration_change, this), gui_context());
|
||||
|
||||
for (size_t i = 0; i < MAX_RECENT_SESSION_COUNTS; i++) {
|
||||
_recent_session_button[i]->signal_clicked.connect (sigc::mem_fun (*this, &SessionDialog::on_recent_session ));
|
||||
|
|
|
|||
|
|
@ -44,10 +44,10 @@ class ThemeManager : public ArdourWindow
|
|||
void on_dark_theme_button_toggled ();
|
||||
void on_light_theme_button_toggled ();
|
||||
void on_flat_buttons_toggled ();
|
||||
void on_region_color_toggled ();
|
||||
void on_show_clip_toggled ();
|
||||
void on_waveform_gradient_depth_change ();
|
||||
void on_timeline_item_gradient_depth_change ();
|
||||
void on_region_color_toggled ();
|
||||
void on_show_clip_toggled ();
|
||||
void on_waveform_gradient_depth_change ();
|
||||
void on_timeline_item_gradient_depth_change ();
|
||||
void on_all_dialogs_toggled ();
|
||||
|
||||
private:
|
||||
|
|
@ -77,10 +77,10 @@ class ThemeManager : public ArdourWindow
|
|||
Gtk::CheckButton flat_buttons;
|
||||
Gtk::CheckButton region_color_button;
|
||||
Gtk::CheckButton show_clipping_button;
|
||||
Gtk::HScale waveform_gradient_depth;
|
||||
Gtk::Label waveform_gradient_depth_label;
|
||||
Gtk::HScale timeline_item_gradient_depth;
|
||||
Gtk::Label timeline_item_gradient_depth_label;
|
||||
Gtk::HScale waveform_gradient_depth;
|
||||
Gtk::Label waveform_gradient_depth_label;
|
||||
Gtk::HScale timeline_item_gradient_depth;
|
||||
Gtk::Label timeline_item_gradient_depth_label;
|
||||
Gtk::CheckButton all_dialogs;
|
||||
Gtk::CheckButton gradient_waveforms;
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@
|
|||
#include "streamview.h"
|
||||
#include "editor_drag.h"
|
||||
#include "editor.h"
|
||||
#include "waves_ui.h"
|
||||
#include "dbg_msg.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
|
@ -69,9 +71,13 @@ uint32_t TimeAxisView::extra_height = 0;
|
|||
int const TimeAxisView::_max_order = 512;
|
||||
PBD::Signal1<void,TimeAxisView*> TimeAxisView::CatchDeletion;
|
||||
|
||||
TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* rent, Canvas& /*canvas*/)
|
||||
TimeAxisView::TimeAxisView (ARDOUR::Session* sess,
|
||||
PublicEditor& ed,
|
||||
TimeAxisView* rent,
|
||||
Canvas& /*canvas*/,
|
||||
WavesUI& ui)
|
||||
: AxisView (sess)
|
||||
, controls_table (2, 8)
|
||||
// , controls_table (2, 8)
|
||||
, _name_editing (false)
|
||||
, height (0)
|
||||
, display_menu (0)
|
||||
|
|
@ -84,7 +90,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
|||
, _canvas_display (0)
|
||||
, _y_position (0)
|
||||
, _editor (ed)
|
||||
, name_entry (0)
|
||||
, control_parent (0)
|
||||
, _order (0)
|
||||
, _effective_height (0)
|
||||
|
|
@ -92,7 +97,12 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
|||
, _preresize_cursor (0)
|
||||
, _have_preresize_cursor (false)
|
||||
, _ebox_release_can_act (true)
|
||||
, controls_event_box (ui.get_container ("controls_event_box"))
|
||||
, time_axis_box (ui.root())
|
||||
, name_entry (ui.get_entry ("name_entry"))
|
||||
, name_label (ui.get_label ("name_label"))
|
||||
{
|
||||
std::cout << "TimeAxisView::TimeAxisView ()" << std::endl;
|
||||
if (extra_height == 0) {
|
||||
compute_heights ();
|
||||
}
|
||||
|
|
@ -111,62 +121,62 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
|
|||
_ghost_group->lower_to_bottom();
|
||||
_ghost_group->show();
|
||||
|
||||
name_label.set_name ("TrackLabel");
|
||||
name_label.set_alignment (0.0, 0.5);
|
||||
ARDOUR_UI::instance()->set_tip (name_label, _("Track/Bus name (double click to edit)"));
|
||||
//name_label.set_name ("TrackLabel");
|
||||
//name_label.set_alignment (0.0, 0.5);
|
||||
//ARDOUR_UI::instance()->set_tip (name_label, _("Track/Bus name (double click to edit)"));
|
||||
|
||||
Gtk::Entry* an_entry = new Gtk::Entry;
|
||||
Gtk::Requisition req;
|
||||
an_entry->size_request (req);
|
||||
name_label.set_size_request (-1, req.height);
|
||||
delete an_entry;
|
||||
// name_entry.set_name ("EditorTrackNameDisplay");
|
||||
name_entry.signal_key_press_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_key_press), false);
|
||||
name_entry.signal_key_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_key_release), false);
|
||||
name_entry.signal_focus_out_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_focus_out));
|
||||
name_entry.set_text (name_label.get_text());
|
||||
name_entry.signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &TimeAxisView::end_name_edit), RESPONSE_OK));
|
||||
|
||||
name_hbox.pack_start (name_label, true, true);
|
||||
name_hbox.show ();
|
||||
name_label.show ();
|
||||
// name_hbox.pack_start (name_label, true, true);
|
||||
// name_hbox.show ();
|
||||
// name_label.show ();
|
||||
|
||||
controls_table.set_size_request (200);
|
||||
controls_table.set_row_spacings (2);
|
||||
controls_table.set_col_spacings (2);
|
||||
controls_table.set_border_width (2);
|
||||
controls_table.set_homogeneous (true);
|
||||
//controls_table.set_size_request (200);
|
||||
//controls_table.set_row_spacings (2);
|
||||
//controls_table.set_col_spacings (2);
|
||||
//controls_table.set_border_width (2);
|
||||
//controls_table.set_homogeneous (true);
|
||||
|
||||
controls_table.attach (name_hbox, 0, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 3, 0);
|
||||
controls_table.show_all ();
|
||||
controls_table.set_no_show_all ();
|
||||
//controls_table.attach (name_hbox, 0, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 3, 0);
|
||||
//controls_table.show_all ();
|
||||
//controls_table.set_no_show_all ();
|
||||
|
||||
HSeparator* separator = manage (new HSeparator());
|
||||
separator->set_name("TrackSeparator");
|
||||
separator->set_size_request(-1, 1);
|
||||
separator->show();
|
||||
//HSeparator* separator = manage (new HSeparator());
|
||||
//separator->set_name("TrackSeparator");
|
||||
//separator->set_size_request(-1, 1);
|
||||
//separator->show();
|
||||
|
||||
controls_vbox.pack_start (controls_table, false, false);
|
||||
controls_vbox.show ();
|
||||
//controls_vbox.pack_start (controls_table, false, false);
|
||||
//controls_vbox.show ();
|
||||
|
||||
controls_hbox.pack_start (controls_vbox, true, true);
|
||||
controls_hbox.show ();
|
||||
//controls_hbox.pack_start (controls_vbox, true, true);
|
||||
//controls_hbox.show ();
|
||||
|
||||
//controls_ebox.set_name ("TimeAxisViewControlsBaseUnselected");
|
||||
controls_ebox.add (controls_hbox);
|
||||
controls_ebox.add_events (Gdk::BUTTON_PRESS_MASK|
|
||||
Gdk::BUTTON_RELEASE_MASK|
|
||||
Gdk::POINTER_MOTION_MASK|
|
||||
Gdk::ENTER_NOTIFY_MASK|
|
||||
Gdk::LEAVE_NOTIFY_MASK|
|
||||
Gdk::SCROLL_MASK);
|
||||
controls_ebox.set_flags (CAN_FOCUS);
|
||||
//controls_event_box.add (controls_hbox);
|
||||
controls_event_box.add_events (Gdk::BUTTON_PRESS_MASK|
|
||||
Gdk::BUTTON_RELEASE_MASK|
|
||||
Gdk::POINTER_MOTION_MASK|
|
||||
Gdk::ENTER_NOTIFY_MASK|
|
||||
Gdk::LEAVE_NOTIFY_MASK|
|
||||
Gdk::SCROLL_MASK);
|
||||
controls_event_box.set_flags (CAN_FOCUS);
|
||||
|
||||
/* note that this handler connects *before* the default handler */
|
||||
controls_ebox.signal_scroll_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_scroll), true);
|
||||
controls_ebox.signal_button_press_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_press));
|
||||
controls_ebox.signal_button_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_release));
|
||||
controls_ebox.signal_motion_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_motion));
|
||||
controls_ebox.signal_leave_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_leave));
|
||||
controls_ebox.show ();
|
||||
controls_event_box.signal_scroll_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_scroll), true);
|
||||
controls_event_box.signal_button_press_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_press));
|
||||
controls_event_box.signal_button_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_button_release));
|
||||
controls_event_box.signal_motion_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_motion));
|
||||
controls_event_box.signal_leave_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::controls_ebox_leave));
|
||||
|
||||
time_axis_vbox.pack_start (controls_ebox, true, true, 0);
|
||||
time_axis_vbox.pack_end (*separator, false, false);
|
||||
time_axis_vbox.show();
|
||||
//time_axis_vbox.pack_start (controls_event_box, true, true, 0);
|
||||
//time_axis_vbox.pack_end (*separator, false, false);
|
||||
//time_axis_vbox.show();
|
||||
|
||||
ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler));
|
||||
|
||||
|
|
@ -216,7 +226,7 @@ TimeAxisView::hide ()
|
|||
_canvas_display->hide ();
|
||||
|
||||
if (control_parent) {
|
||||
control_parent->remove (time_axis_vbox);
|
||||
control_parent->remove (time_axis_box);
|
||||
control_parent = 0;
|
||||
}
|
||||
|
||||
|
|
@ -248,11 +258,11 @@ guint32
|
|||
TimeAxisView::show_at (double y, int& nth, VBox *parent)
|
||||
{
|
||||
if (control_parent) {
|
||||
control_parent->reorder_child (time_axis_vbox, nth);
|
||||
control_parent->reorder_child (time_axis_box, nth);
|
||||
} else {
|
||||
control_parent = parent;
|
||||
parent->pack_start (time_axis_vbox, false, false);
|
||||
parent->reorder_child (time_axis_vbox, nth);
|
||||
parent->pack_start (time_axis_box, false, false);
|
||||
parent->reorder_child (time_axis_box, nth);
|
||||
}
|
||||
|
||||
_order = nth;
|
||||
|
|
@ -331,10 +341,10 @@ TimeAxisView::controls_ebox_button_press (GdkEventButton* event)
|
|||
{
|
||||
if ((event->button == 1 && event->type == GDK_2BUTTON_PRESS) || Keyboard::is_edit_event (event)) {
|
||||
/* see if it is inside the name label */
|
||||
if (name_label.is_ancestor (controls_ebox)) {
|
||||
if (name_label.is_ancestor (controls_event_box)) {
|
||||
int nlx;
|
||||
int nly;
|
||||
controls_ebox.translate_coordinates (name_label, event->x, event->y, nlx, nly);
|
||||
controls_event_box.translate_coordinates (name_label, event->x, event->y, nlx, nly);
|
||||
Gtk::Allocation a = name_label.get_allocation ();
|
||||
if (nlx > 0 && nlx < a.get_width() && nly > 0 && nly < a.get_height()) {
|
||||
begin_name_edit ();
|
||||
|
|
@ -391,7 +401,7 @@ bool
|
|||
TimeAxisView::controls_ebox_leave (GdkEventCrossing*)
|
||||
{
|
||||
if (_have_preresize_cursor) {
|
||||
gdk_window_set_cursor (controls_ebox.get_window()->gobj(), _preresize_cursor);
|
||||
gdk_window_set_cursor (controls_event_box.get_window()->gobj(), _preresize_cursor);
|
||||
_have_preresize_cursor = false;
|
||||
}
|
||||
return true;
|
||||
|
|
@ -401,9 +411,9 @@ bool
|
|||
TimeAxisView::maybe_set_cursor (int y)
|
||||
{
|
||||
/* XXX no Gtkmm Gdk::Window::get_cursor() */
|
||||
Glib::RefPtr<Gdk::Window> win = controls_ebox.get_window();
|
||||
Glib::RefPtr<Gdk::Window> win = controls_event_box.get_window();
|
||||
|
||||
if (y > (gint) floor (controls_ebox.get_height() * 0.75)) {
|
||||
if (y > (gint) floor (controls_event_box.get_height() * 0.75)) {
|
||||
|
||||
/* y-coordinate in lower 25% */
|
||||
|
||||
|
|
@ -430,7 +440,7 @@ TimeAxisView::controls_ebox_button_release (GdkEventButton* ev)
|
|||
{
|
||||
if (_resize_drag_start >= 0) {
|
||||
if (_have_preresize_cursor) {
|
||||
gdk_window_set_cursor (controls_ebox.get_window()->gobj(), _preresize_cursor);
|
||||
gdk_window_set_cursor (controls_event_box.get_window()->gobj(), _preresize_cursor);
|
||||
_preresize_cursor = 0;
|
||||
_have_preresize_cursor = false;
|
||||
}
|
||||
|
|
@ -509,7 +519,7 @@ TimeAxisView::set_height (uint32_t h)
|
|||
h = preset_height (HeightSmall);
|
||||
}
|
||||
|
||||
time_axis_vbox.property_height_request () = h;
|
||||
time_axis_box.property_height_request () = h;
|
||||
height = h;
|
||||
|
||||
char buf[32];
|
||||
|
|
@ -580,42 +590,20 @@ TimeAxisView::name_entry_focus_out (GdkEventFocus*)
|
|||
void
|
||||
TimeAxisView::begin_name_edit ()
|
||||
{
|
||||
if (name_entry) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (can_edit_name()) {
|
||||
name_label.hide();
|
||||
name_entry.show ();
|
||||
|
||||
name_entry = manage (new Gtkmm2ext::FocusEntry);
|
||||
|
||||
name_entry->set_name ("EditorTrackNameDisplay");
|
||||
name_entry->signal_key_press_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_key_press), false);
|
||||
name_entry->signal_key_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_key_release), false);
|
||||
name_entry->signal_focus_out_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_focus_out));
|
||||
name_entry->set_text (name_label.get_text());
|
||||
name_entry->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &TimeAxisView::end_name_edit), RESPONSE_OK));
|
||||
|
||||
if (name_label.is_ancestor (name_hbox)) {
|
||||
name_hbox.remove (name_label);
|
||||
}
|
||||
|
||||
name_hbox.pack_start (*name_entry);
|
||||
name_entry->show ();
|
||||
|
||||
name_entry->select_region (0, -1);
|
||||
name_entry->set_state (STATE_SELECTED);
|
||||
name_entry->grab_focus ();
|
||||
name_entry->start_editing (0);
|
||||
name_entry.select_region (0, -1);
|
||||
name_entry.set_state (STATE_SELECTED);
|
||||
name_entry.grab_focus ();
|
||||
name_entry.start_editing (0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
TimeAxisView::end_name_edit (int response)
|
||||
{
|
||||
if (!name_entry) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool edit_next = false;
|
||||
bool edit_prev = false;
|
||||
|
||||
|
|
@ -633,38 +621,22 @@ TimeAxisView::end_name_edit (int response)
|
|||
edit_prev = true;
|
||||
}
|
||||
|
||||
/* this will delete the name_entry. but it will also drop focus, which
|
||||
* will cause another callback to this function, so set name_entry = 0
|
||||
* first to ensure we don't double-remove etc. etc.
|
||||
*/
|
||||
|
||||
Gtk::Entry* tmp = name_entry;
|
||||
name_entry = 0;
|
||||
name_hbox.remove (*tmp);
|
||||
|
||||
/* put the name label back */
|
||||
|
||||
name_hbox.pack_start (name_label);
|
||||
name_label.show ();
|
||||
name_entry.hide ();
|
||||
|
||||
if (edit_next) {
|
||||
|
||||
TrackViewList const & allviews = _editor.get_track_views ();
|
||||
TrackViewList::const_iterator i = find (allviews.begin(), allviews.end(), this);
|
||||
TrackViewList::const_iterator i = std::find (allviews.begin(), allviews.end(), this);
|
||||
|
||||
if (i != allviews.end()) {
|
||||
|
||||
do {
|
||||
if (++i == allviews.end()) {
|
||||
return;
|
||||
}
|
||||
|
||||
RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*>(*i);
|
||||
|
||||
if (rtav && rtav->route()->record_enabled()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(*i)->hidden()) {
|
||||
break;
|
||||
}
|
||||
|
|
@ -680,7 +652,7 @@ TimeAxisView::end_name_edit (int response)
|
|||
} else if (edit_prev) {
|
||||
|
||||
TrackViewList const & allviews = _editor.get_track_views ();
|
||||
TrackViewList::const_iterator i = find (allviews.begin(), allviews.end(), this);
|
||||
TrackViewList::const_iterator i = std::find (allviews.begin(), allviews.end(), this);
|
||||
|
||||
if (i != allviews.begin()) {
|
||||
do {
|
||||
|
|
@ -750,13 +722,13 @@ TimeAxisView::set_selected (bool yn)
|
|||
Selectable::set_selected (yn);
|
||||
|
||||
if (_selected) {
|
||||
controls_ebox.set_name (controls_base_selected_name);
|
||||
time_axis_vbox.set_name (controls_base_selected_name);
|
||||
controls_vbox.set_name (controls_base_selected_name);
|
||||
//controls_ebox.set_name (controls_base_selected_name);
|
||||
//time_axis_vbox.set_name (controls_base_selected_name);
|
||||
//controls_vbox.set_name (controls_base_selected_name);
|
||||
} else {
|
||||
controls_ebox.set_name (controls_base_unselected_name);
|
||||
time_axis_vbox.set_name (controls_base_unselected_name);
|
||||
controls_vbox.set_name (controls_base_unselected_name);
|
||||
//controls_ebox.set_name (controls_base_unselected_name);
|
||||
//time_axis_vbox.set_name (controls_base_unselected_name);
|
||||
//controls_vbox.set_name (controls_base_unselected_name);
|
||||
hide_selection ();
|
||||
|
||||
/* children will be set for the yn=true case. but when deselecting
|
||||
|
|
@ -981,7 +953,7 @@ struct null_deleter { void operator()(void const *) const {} };
|
|||
bool
|
||||
TimeAxisView::is_child (TimeAxisView* tav)
|
||||
{
|
||||
return find (children.begin(), children.end(), boost::shared_ptr<TimeAxisView>(tav, null_deleter())) != children.end();
|
||||
return std::find (children.begin(), children.end(), boost::shared_ptr<TimeAxisView>(tav, null_deleter())) != children.end();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -995,7 +967,7 @@ TimeAxisView::remove_child (boost::shared_ptr<TimeAxisView> child)
|
|||
{
|
||||
Children::iterator i;
|
||||
|
||||
if ((i = find (children.begin(), children.end(), child)) != children.end()) {
|
||||
if ((i = std::find (children.begin(), children.end(), child)) != children.end()) {
|
||||
children.erase (i);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ class RegionView;
|
|||
class GhostRegion;
|
||||
class StreamView;
|
||||
class ArdourDialog;
|
||||
class WavesUI;
|
||||
|
||||
/** Abstract base class for time-axis views (horizontal editor 'strips')
|
||||
*
|
||||
|
|
@ -81,6 +82,7 @@ class ArdourDialog;
|
|||
* extended to create functional time-axis based views.
|
||||
*/
|
||||
class TimeAxisView : public virtual AxisView
|
||||
|
||||
{
|
||||
private:
|
||||
enum NamePackingBits {
|
||||
|
|
@ -90,7 +92,11 @@ class TimeAxisView : public virtual AxisView
|
|||
|
||||
public:
|
||||
|
||||
TimeAxisView(ARDOUR::Session* sess, PublicEditor& ed, TimeAxisView* parent, ArdourCanvas::Canvas& canvas);
|
||||
TimeAxisView (ARDOUR::Session* sess,
|
||||
PublicEditor& ed,
|
||||
TimeAxisView* parent,
|
||||
ArdourCanvas::Canvas& canvas,
|
||||
WavesUI& ui);
|
||||
virtual ~TimeAxisView ();
|
||||
|
||||
static PBD::Signal1<void,TimeAxisView*> CatchDeletion;
|
||||
|
|
@ -101,8 +107,8 @@ class TimeAxisView : public virtual AxisView
|
|||
/** @return maximum allowable value of order */
|
||||
static int max_order () { return _max_order; }
|
||||
|
||||
virtual void enter_internal_edit_mode () {}
|
||||
virtual void leave_internal_edit_mode () {}
|
||||
virtual void enter_internal_edit_mode () {}
|
||||
virtual void leave_internal_edit_mode () {}
|
||||
|
||||
ArdourCanvas::Group* canvas_display () { return _canvas_display; }
|
||||
ArdourCanvas::Group* ghost_group () { return _ghost_group; }
|
||||
|
|
@ -199,15 +205,14 @@ class TimeAxisView : public virtual AxisView
|
|||
|
||||
protected:
|
||||
/* The Standard LHS Controls */
|
||||
Gtk::HBox controls_hbox;
|
||||
Gtk::Table controls_table;
|
||||
Gtk::EventBox controls_ebox;
|
||||
Gtk::VBox controls_vbox;
|
||||
Gtk::VBox time_axis_vbox;
|
||||
Gtk::HBox name_hbox;
|
||||
Gtk::Label name_label;
|
||||
bool _name_editing;
|
||||
uint32_t height; /* in canvas units */
|
||||
//Gtk::HBox controls_hbox;
|
||||
//Gtk::Table controls_table;
|
||||
Gtk::Container& controls_event_box;
|
||||
//Gtk::VBox controls_vbox;
|
||||
Gtk::Container& time_axis_box;
|
||||
Gtk::Label& name_label;
|
||||
bool _name_editing;
|
||||
uint32_t height; /* in canvas units */
|
||||
std::string controls_base_unselected_name;
|
||||
std::string controls_base_selected_name;
|
||||
Gtk::Menu* display_menu; /* The standard LHS Track control popup-menus */
|
||||
|
|
@ -224,15 +229,15 @@ class TimeAxisView : public virtual AxisView
|
|||
double _y_position;
|
||||
PublicEditor& _editor;
|
||||
|
||||
virtual bool can_edit_name() const;
|
||||
virtual bool can_edit_name() const;
|
||||
|
||||
bool name_entry_key_release (GdkEventKey *ev);
|
||||
bool name_entry_key_press (GdkEventKey *ev);
|
||||
bool name_entry_focus_out (GdkEventFocus *ev);
|
||||
|
||||
Gtk::Entry* name_entry;
|
||||
void begin_name_edit ();
|
||||
void end_name_edit (int);
|
||||
Gtk::Entry& name_entry;
|
||||
void begin_name_edit ();
|
||||
void end_name_edit (int);
|
||||
|
||||
/* derived classes can override these */
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ TracksControlPanel::TracksControlPanel ()
|
|||
, _bit_depth_combo (get_combo_box_text ("bit_depth_combo"))
|
||||
, _frame_rate_combo (get_combo_box_text ("frame_rate_combo"))
|
||||
, _browse_button(get_waves_button("browse_default_folder"))
|
||||
, _auto_lock_timer_spin_button(get_spin_button("auto_lock_timer_spin_button"))
|
||||
, _have_control (false)
|
||||
, _ignore_changes (0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ class TracksControlPanel : public WavesDialog, public PBD::ScopedConnectionList
|
|||
Gtk::ComboBoxText& _frame_rate_combo;
|
||||
Gtk::Label& _latency_label;
|
||||
Gtk::Label& _default_open_path;
|
||||
Gtk::SpinButton& _auto_lock_timer_spin_button;
|
||||
|
||||
#include "tracks_control_panel.logic.h"
|
||||
};
|
||||
|
|
|
|||
|
|
@ -578,6 +578,18 @@ TracksControlPanel::refresh_session_settings_info()
|
|||
void
|
||||
TracksControlPanel::populate_auto_lock_timer()
|
||||
{
|
||||
using namespace std;
|
||||
using namespace Gtk;
|
||||
|
||||
_auto_lock_timer_spin_button.set_max_length(3);
|
||||
_auto_lock_timer_spin_button.set_numeric(true);
|
||||
|
||||
_auto_lock_timer_spin_button.set_update_policy(UPDATE_ALWAYS);
|
||||
_auto_lock_timer_spin_button.set_range(0, 999);
|
||||
_auto_lock_timer_spin_button.set_increments(1,1);
|
||||
|
||||
int time = ARDOUR_UI::config()->get_auto_lock_timer();
|
||||
_auto_lock_timer_spin_button.set_value(time);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1247,6 +1259,18 @@ TracksControlPanel::save_default_session_path()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::save_auto_lock_time()
|
||||
{
|
||||
using namespace std;
|
||||
|
||||
string s = _auto_lock_timer_spin_button.get_text();
|
||||
int time = atoi(s);
|
||||
|
||||
ARDOUR_UI::config()->set_auto_lock_timer(time);
|
||||
ARDOUR_UI::config()->save_state();
|
||||
}
|
||||
|
||||
void TracksControlPanel::update_session_config ()
|
||||
{
|
||||
ARDOUR_UI* ardour_ui = ARDOUR_UI::instance();
|
||||
|
|
@ -1264,6 +1288,17 @@ void TracksControlPanel::update_session_config ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::update_configs()
|
||||
{
|
||||
// update session config
|
||||
update_session_config();
|
||||
|
||||
// update global config
|
||||
save_default_session_path();
|
||||
save_auto_lock_time();
|
||||
}
|
||||
|
||||
void
|
||||
TracksControlPanel::on_ok (WavesButton*)
|
||||
{
|
||||
|
|
@ -1271,8 +1306,7 @@ TracksControlPanel::on_ok (WavesButton*)
|
|||
EngineStateController::instance()->push_current_state_to_backend(true);
|
||||
response(Gtk::RESPONSE_OK);
|
||||
|
||||
update_session_config();
|
||||
save_default_session_path();
|
||||
update_configs();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1291,8 +1325,7 @@ TracksControlPanel::on_apply (WavesButton*)
|
|||
EngineStateController::instance()->push_current_state_to_backend(true);
|
||||
//response(Gtk::RESPONSE_APPLY);
|
||||
|
||||
update_session_config();
|
||||
save_default_session_path();
|
||||
update_configs();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -55,9 +55,11 @@
|
|||
void on_stereo_out (WavesButton*);
|
||||
void on_browse_button (WavesButton*);
|
||||
void save_default_session_path();
|
||||
void save_auto_lock_time();
|
||||
void on_ok(WavesButton*);
|
||||
void on_cancel(WavesButton*);
|
||||
void on_apply(WavesButton*);
|
||||
void update_configs();
|
||||
void update_session_config();
|
||||
void on_capture_active_changed (DeviceConnectionControl* capture_control, bool active);
|
||||
void on_playback_active_changed (DeviceConnectionControl* playback_control, bool active);
|
||||
|
|
|
|||
|
|
@ -1,17 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GainSlider>
|
||||
<Button id="peak_display_button"
|
||||
width="96" height="20" />
|
||||
<Layout bgnormal="#383838" width="96"
|
||||
height="220">
|
||||
<Adjustment id="gain_adjustment"
|
||||
minvalue="0"
|
||||
maxvalue="1"/>
|
||||
<GainSlider meterwidth="6" thinmeterwidth="6">
|
||||
<Adjustment id="gain_adjustment"
|
||||
minvalue="0"
|
||||
maxvalue="1"/>
|
||||
<Layout Layout="" bgnormal="#383838" width="97" height="253">
|
||||
<Button id="peak_display_button"
|
||||
x="0" y="0"
|
||||
width="97" height="18"
|
||||
bgnormal="#B1B1B1"
|
||||
bgactive="#D83838"
|
||||
fgnormal="#000000"
|
||||
fgactive="#000000"
|
||||
bghover="#C47474"
|
||||
bordercolor="#C9C9C9"
|
||||
borderwidth="1 1 0 0"/>
|
||||
<VBox id="level_meter_home"
|
||||
x="0"
|
||||
y="18"
|
||||
width="22"
|
||||
x="1"
|
||||
y="36"
|
||||
width="27"
|
||||
height="187"/>
|
||||
<icon source="inspector_background.png" x="33" y="18"/>
|
||||
<Fader id="gain_slider"
|
||||
adjustment="gain_adjustment"
|
||||
facesource="slider_controller_fader.png"
|
||||
|
|
@ -21,9 +29,8 @@
|
|||
minposy="187"
|
||||
maxposx="10"
|
||||
maxposy="0"
|
||||
x="57"
|
||||
y="18"/>
|
||||
<icon source="inspector_background.png" x="24"/>
|
||||
x="66"
|
||||
y="35"/>
|
||||
<VBox id="gain_display_home" x="1" y="237" width="95" height="16"/>
|
||||
</Layout>
|
||||
<VBox id="gain_display_home"/>
|
||||
</GainSlider>
|
||||
|
|
@ -239,7 +239,7 @@
|
|||
<Label style="generic_control" text="SESSION FRAME RATE" x="24" y="100"/>
|
||||
<ComboBoxText style="generic_control" id="frame_rate_combo" x="215" y="100" width="150" height="20" />
|
||||
<Label style="generic_control" text="AUTO LOCK TIMER" x="24" y="175"/>
|
||||
<ComboBoxText style="generic_control" id="auto_lock_timer_combo" x="215" y="175" width="150" height="20" />
|
||||
<SpinButton style="generic_control" id="auto_lock_timer_spin_button" x="215" y="175" width="150" height="20" />
|
||||
|
||||
<Label style="generic_control" text="DEFAULT FOLDER FOR NEW SESSION" x = "24" y = "230" />
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -24,4 +24,5 @@ UI_CONFIG_VARIABLE(float, timeline_item_gradient_depth, "timeline-item-gradient-
|
|||
UI_CONFIG_VARIABLE(bool, all_floating_windows_are_dialogs, "all-floating-windows-are-dialogs", false)
|
||||
UI_CONFIG_VARIABLE (bool, color_regions_using_track_color, "color-regions-using-track-color", false)
|
||||
UI_CONFIG_VARIABLE (bool, show_waveform_clipping, "show-waveform-clipping", true)
|
||||
UI_CONFIG_VARIABLE (int, auto_lock_timer, "auto-lock-timer", 0)
|
||||
|
||||
|
|
|
|||
|
|
@ -35,8 +35,11 @@ std::map<std::string, const XMLTree*> WavesUI::__xml_tree_cache;
|
|||
|
||||
WavesUI::WavesUI (const std::string& layout_script_file, Gtk::Container& root)
|
||||
: _xml_tree (NULL)
|
||||
, _scrip_file_name (layout_script_file)
|
||||
, _root_container (root)
|
||||
{
|
||||
// To avoid a need of reading the same file many times:
|
||||
std::cout << "WavesUI::WavesUI (" << layout_script_file << ")" << std::endl;
|
||||
std::map<std::string, const XMLTree*>::const_iterator it = __xml_tree_cache.find(layout_script_file);
|
||||
if (it != __xml_tree_cache.end()) {
|
||||
_xml_tree = (*it).second;
|
||||
|
|
@ -93,6 +96,8 @@ WavesUI::create_widget (const XMLNode& definition, const XMLNodeMap& styles)
|
|||
child = manage (new Gtk::Label (text));
|
||||
} else if (widget_type == "ENTRY") {
|
||||
child = manage (new Gtk::Entry ());
|
||||
} else if (widget_type == "FOCUSENTRY") {
|
||||
child = manage (new Gtkmm2ext::FocusEntry ());
|
||||
} else if (widget_type == "SPINBUTTON") {
|
||||
child = manage (new Gtk::SpinButton ());
|
||||
} else if (widget_type == "LAYOUT") {
|
||||
|
|
@ -136,7 +141,6 @@ WavesUI::create_widget (const XMLNode& definition, const XMLNodeMap& styles)
|
|||
Gtk::Adjustment& adjustment = get_adjustment(adjustment_id.c_str());
|
||||
child = manage (new Gtkmm2ext::Fader(adjustment, face_image, handle_image, active_handle_image, minposx, minposy, maxposx, maxposy));
|
||||
} else if (widget_type == "ADJUSTMENT") {
|
||||
//dbg_msg("Creating ADJUSTMENT");
|
||||
double min_value = xml_property (definition, "minvalue", styles, 0.0);
|
||||
double max_value = xml_property (definition, "maxvalue", styles, 100.0);
|
||||
double initial_value = xml_property (definition, "initialvalue", styles, min_value);
|
||||
|
|
@ -367,11 +371,8 @@ WavesUI::set_attributes (Gtk::Widget& widget, const XMLNode& definition, const X
|
|||
widget.modify_font(Pango::FontDescription(property));
|
||||
}
|
||||
|
||||
if (xml_property (definition, "visible", styles, true)) {
|
||||
widget.show();
|
||||
} else {
|
||||
widget.hide();
|
||||
}
|
||||
widget.set_visible (xml_property (definition, "visible", styles, true));
|
||||
widget.set_no_show_all (xml_property (definition, "noshowall", styles, false));
|
||||
|
||||
property = xml_property (definition, "tooltip", styles, "");
|
||||
if (!property.empty ()) {
|
||||
|
|
@ -474,18 +475,30 @@ WavesUI::get_adjustment(const char* id)
|
|||
{
|
||||
Gtk::Adjustment* child = dynamic_cast<Gtk::Adjustment*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Adjustment ") + id + " not found !");
|
||||
dbg_msg (std::string("Adjustment ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
}
|
||||
|
||||
Gtk::Container&
|
||||
WavesUI::get_container (const char* id)
|
||||
{
|
||||
Gtk::Container* child = dynamic_cast<Gtk::Container*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtk::Container ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
}
|
||||
|
||||
|
||||
Gtk::EventBox&
|
||||
WavesUI::get_event_box (const char* id)
|
||||
{
|
||||
Gtk::EventBox* child = dynamic_cast<Gtk::EventBox*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtk::EventBox ") + id + " not found !");
|
||||
dbg_msg (std::string("Gtk::EventBox ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
|
|
@ -497,7 +510,7 @@ WavesUI::get_box (const char* id)
|
|||
{
|
||||
Gtk::Box* child = dynamic_cast<Gtk::Box*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtk::Box ") + id + " not found !");
|
||||
dbg_msg (std::string("Gtk::Box ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
|
|
@ -509,7 +522,7 @@ WavesUI::get_v_box (const char* id)
|
|||
{
|
||||
Gtk::VBox* child = dynamic_cast<Gtk::VBox*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtk::VBox ") + id + " not found !");
|
||||
dbg_msg (std::string("Gtk::VBox ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
|
|
@ -521,7 +534,7 @@ WavesUI::get_h_box (const char* id)
|
|||
{
|
||||
Gtk::HBox* child = dynamic_cast<Gtk::HBox*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtk::HBox ") + id + " not found !");
|
||||
dbg_msg (std::string("Gtk::HBox ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
|
|
@ -533,7 +546,7 @@ WavesUI::get_layout (const char* id)
|
|||
{
|
||||
Gtk::Layout* child = dynamic_cast<Gtk::Layout*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtk::Layout ") + id + " not found !");
|
||||
dbg_msg (std::string("Gtk::Layout ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
|
|
@ -545,7 +558,7 @@ WavesUI::get_label (const char* id)
|
|||
{
|
||||
Gtk::Label* child = dynamic_cast<Gtk::Label*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtk::Label ") + id + " not found !");
|
||||
dbg_msg (std::string("Gtk::Label ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
|
|
@ -557,7 +570,7 @@ WavesUI::get_combo_box_text (const char* id)
|
|||
{
|
||||
Gtk::ComboBoxText* child = dynamic_cast<Gtk::ComboBoxText*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtk::ComboBoxText ") + id + " not found !");
|
||||
dbg_msg (std::string("Gtk::ComboBoxText ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
|
|
@ -569,7 +582,18 @@ WavesUI::get_entry(const char* id)
|
|||
{
|
||||
Gtk::Entry* child = dynamic_cast<Gtk::Entry*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtk::Entry ") + id + " not found !");
|
||||
dbg_msg (std::string("Gtk::Entry ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
}
|
||||
|
||||
Gtkmm2ext::FocusEntry&
|
||||
WavesUI::get_focus_entry(const char* id)
|
||||
{
|
||||
Gtkmm2ext::FocusEntry* child = dynamic_cast<Gtkmm2ext::FocusEntry*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtkmm2ext::FocusEntry ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
|
|
@ -580,7 +604,7 @@ WavesUI::get_spin_button(const char* id)
|
|||
{
|
||||
Gtk::SpinButton* child = dynamic_cast<Gtk::SpinButton*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtk::SpinButton ") + id + " not found !");
|
||||
dbg_msg (std::string("Gtk::SpinButton ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
|
|
@ -591,7 +615,7 @@ WavesUI::get_waves_button (const char* id)
|
|||
{
|
||||
WavesButton* child = dynamic_cast<WavesButton*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("WavesButton ") + id + " not found !");
|
||||
dbg_msg (std::string("WavesButton ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
|
|
@ -602,9 +626,8 @@ WavesUI::get_fader (const char* id)
|
|||
{
|
||||
Gtkmm2ext::Fader* child = dynamic_cast<Gtkmm2ext::Fader*> (get_object(id));
|
||||
if (child == NULL ) {
|
||||
dbg_msg (std::string("Gtkmm2ext::Fader ") + id + " not found !");
|
||||
dbg_msg (std::string("Gtkmm2ext::Fader ") + id + " not found in " + _scrip_file_name + "!");
|
||||
throw std::exception();
|
||||
}
|
||||
return *child;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <gtkmm/label.h>
|
||||
#include <gtkmm/scrolledwindow.h>
|
||||
#include "gtkmm2ext/fader.h"
|
||||
#include "gtkmm2ext/focus_entry.h"
|
||||
#include "canvas/canvas.h"
|
||||
#include "canvas/xml_ui.h"
|
||||
#include "waves_button.h"
|
||||
|
|
@ -42,6 +43,7 @@ class WavesUI : public std::map<std::string, Gtk::Object*> {
|
|||
WavesUI (const std::string& layout_script_file, Gtk::Container& root);
|
||||
|
||||
Gtk::Adjustment& get_adjustment (const char* id);
|
||||
Gtk::Container& get_container (const char* id);
|
||||
Gtk::EventBox& get_event_box (const char* id);
|
||||
Gtk::Box& get_box (const char* id);
|
||||
Gtk::VBox& get_v_box (const char* id);
|
||||
|
|
@ -51,10 +53,12 @@ class WavesUI : public std::map<std::string, Gtk::Object*> {
|
|||
Gtk::Image& get_image (const char* id);
|
||||
Gtk::ComboBoxText& get_combo_box_text (const char* id);
|
||||
Gtk::Entry& get_entry(const char* id);
|
||||
Gtkmm2ext::FocusEntry& get_focus_entry(const char* id);
|
||||
Gtk::SpinButton& get_spin_button(const char* id);
|
||||
WavesButton& get_waves_button (const char* id);
|
||||
Gtkmm2ext::Fader& get_fader (const char* id);
|
||||
const XMLTree* xml_tree() { return _xml_tree; }
|
||||
Gtk::Container& root () { return _root_container; }
|
||||
|
||||
protected:
|
||||
void set_attributes (Gtk::Widget& widget, const XMLNode& definition, const XMLNodeMap& styles);
|
||||
|
|
@ -62,6 +66,8 @@ class WavesUI : public std::map<std::string, Gtk::Object*> {
|
|||
private:
|
||||
static std::map<std::string, const XMLTree*> __xml_tree_cache;
|
||||
const XMLTree* _xml_tree;
|
||||
const std::string _scrip_file_name;
|
||||
Gtk::Container& _root_container;
|
||||
|
||||
Gtk::Object* get_object(const char *id);
|
||||
const XMLTree* load_layout (const std::string& xml_file_name);
|
||||
|
|
|
|||
|
|
@ -247,9 +247,13 @@ public:
|
|||
|
||||
Glib::Threads::Thread* _hw_reset_event_thread;
|
||||
gint _hw_reset_request_count;
|
||||
Glib::Threads::Cond _hw_reset_condition;
|
||||
Glib::Threads::Mutex _reset_request_lock;
|
||||
gint _stop_hw_reset_processing;
|
||||
Glib::Threads::Thread* _hw_devicelist_update_thread;
|
||||
gint _hw_devicelist_update_count;
|
||||
Glib::Threads::Cond _hw_devicelist_update_condition;
|
||||
Glib::Threads::Mutex _devicelist_update_lock;
|
||||
gint _stop_hw_devicelist_processing;
|
||||
|
||||
void start_hw_event_processing();
|
||||
|
|
|
|||
|
|
@ -365,7 +365,9 @@ AudioEngine::process_callback (pframes_t nframes)
|
|||
void
|
||||
AudioEngine::request_backend_reset()
|
||||
{
|
||||
g_atomic_int_inc(&_hw_reset_request_count);
|
||||
Glib::Threads::Mutex::Lock guard (_reset_request_lock);
|
||||
g_atomic_int_inc (&_hw_reset_request_count);
|
||||
_hw_reset_condition.signal ();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -374,10 +376,14 @@ AudioEngine::do_reset_backend()
|
|||
{
|
||||
SessionEvent::create_per_thread_pool (X_("Backend reset processing thread"), 512);
|
||||
|
||||
Glib::Threads::Mutex::Lock guard (_reset_request_lock);
|
||||
|
||||
while (!_stop_hw_reset_processing) {
|
||||
|
||||
if (_hw_reset_request_count && _backend) {
|
||||
|
||||
_reset_request_lock.unlock();
|
||||
|
||||
g_atomic_int_dec_and_test (&_hw_reset_request_count);
|
||||
|
||||
// backup the device name
|
||||
|
|
@ -387,21 +393,26 @@ AudioEngine::do_reset_backend()
|
|||
if (_session) {
|
||||
// it's not a halt, but should be handled the same way:
|
||||
// disable record, stop transport and I/O processign but save the data.
|
||||
_session->engine_halted();
|
||||
_session->engine_halted ();
|
||||
}
|
||||
|
||||
// "hard reset" the device
|
||||
_backend->drop_device();
|
||||
_backend->set_device_name(name);
|
||||
_backend->drop_device ();
|
||||
_backend->set_device_name (name);
|
||||
|
||||
start();
|
||||
start ();
|
||||
|
||||
// inform about possible changes
|
||||
SampleRateChanged(_backend->sample_rate() );
|
||||
BufferSizeChanged(_backend->buffer_size() );
|
||||
}
|
||||
SampleRateChanged (_backend->sample_rate() );
|
||||
BufferSizeChanged (_backend->buffer_size() );
|
||||
|
||||
g_usleep(0);
|
||||
_reset_request_lock.lock();
|
||||
|
||||
} else {
|
||||
|
||||
_hw_reset_condition.wait (_reset_request_lock);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -409,7 +420,9 @@ AudioEngine::do_reset_backend()
|
|||
void
|
||||
AudioEngine::request_device_list_update()
|
||||
{
|
||||
Glib::Threads::Mutex::Lock guard (_devicelist_update_lock);
|
||||
g_atomic_int_inc (&_hw_devicelist_update_count);
|
||||
_hw_devicelist_update_condition.signal ();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -418,12 +431,22 @@ AudioEngine::do_devicelist_update()
|
|||
{
|
||||
SessionEvent::create_per_thread_pool (X_("Device list update processing thread"), 512);
|
||||
|
||||
Glib::Threads::Mutex::Lock guard (_devicelist_update_lock);
|
||||
|
||||
while (!_stop_hw_devicelist_processing) {
|
||||
|
||||
if (_hw_devicelist_update_count) {
|
||||
|
||||
_devicelist_update_lock.unlock();
|
||||
|
||||
g_atomic_int_dec_and_test (&_hw_devicelist_update_count);
|
||||
DeviceListChanged (); /* EMIT SIGNAL */
|
||||
DeviceListChanged (); /* EMIT SIGNAL */
|
||||
|
||||
_devicelist_update_lock.lock();
|
||||
|
||||
} else {
|
||||
_hw_devicelist_update_condition.wait (_devicelist_update_lock);
|
||||
}
|
||||
g_usleep(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -451,6 +474,7 @@ AudioEngine::stop_hw_event_processing()
|
|||
if (_hw_reset_event_thread) {
|
||||
g_atomic_int_set(&_stop_hw_reset_processing, 1);
|
||||
g_atomic_int_set(&_hw_reset_request_count, 0);
|
||||
_hw_reset_condition.signal ();
|
||||
_hw_reset_event_thread->join ();
|
||||
_hw_reset_event_thread = 0;
|
||||
}
|
||||
|
|
@ -458,6 +482,7 @@ AudioEngine::stop_hw_event_processing()
|
|||
if (_hw_devicelist_update_thread) {
|
||||
g_atomic_int_set(&_stop_hw_devicelist_processing, 1);
|
||||
g_atomic_int_set(&_hw_devicelist_update_count, 0);
|
||||
_hw_devicelist_update_condition.signal ();
|
||||
_hw_devicelist_update_thread->join ();
|
||||
_hw_devicelist_update_thread = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2198,7 +2198,7 @@ OSStatus WCMRCoreAudioDevice::AudioIOProc(AudioUnitRenderActionFlags * ioAction
|
|||
AudioBufferList inputAudioBufferList;
|
||||
inputAudioBufferList.mNumberBuffers = 1;
|
||||
inputAudioBufferList.mBuffers[0].mNumberChannels = m_InputChannels.size();
|
||||
inputAudioBufferList.mBuffers[0].mDataByteSize = expectedDataSize*10;
|
||||
inputAudioBufferList.mBuffers[0].mDataByteSize = expectedDataSize;
|
||||
inputAudioBufferList.mBuffers[0].mData = NULL;//new float[expectedDataSize]; // we are going to get buffer from CoreAudio
|
||||
|
||||
retVal = AudioUnitRender(m_AUHALAudioUnit, ioActionFlags, inTimeStamp, AUHAL_INPUT_ELEMENT, inNumberFrames, &inputAudioBufferList);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,9 @@ namespace XMLUI {
|
|||
extern LIBCANVAS_API double xml_property (const XMLNode& node, const char* prop_name, const XMLNodeMap& styles, double default_value);
|
||||
extern LIBCANVAS_API double xml_property (const XMLNode& node, const char* prop_name, double default_value);
|
||||
extern LIBCANVAS_API int32_t xml_property (const XMLNode& node, const char* prop_name, const XMLNodeMap& styles, int32_t default_value);
|
||||
extern LIBCANVAS_API int32_t xml_property (const XMLNode& node, const char* prop_name, int32_t default_value);
|
||||
extern LIBCANVAS_API uint32_t xml_property (const XMLNode& node, const char* prop_name, const XMLNodeMap& styles, uint32_t default_value);
|
||||
extern LIBCANVAS_API uint32_t xml_property (const XMLNode& node, const char* prop_name, uint32_t default_value);
|
||||
|
||||
extern LIBCANVAS_API bool xml_property (const XMLNode& node, const char* prop_name, const XMLNodeMap& styles, bool default_value);
|
||||
extern LIBCANVAS_API bool xml_property (const XMLNode& node, const char* prop_name, bool default_value);
|
||||
|
|
|
|||
|
|
@ -53,6 +53,13 @@ xml_property (const XMLNode &node, const char *prop_name, const XMLNodeMap& styl
|
|||
return atof(property.c_str());
|
||||
}
|
||||
|
||||
double
|
||||
xml_property (const XMLNode &node, const char *prop_name, double default_value)
|
||||
{
|
||||
return xml_property (node, prop_name, XMLNodeMap(), default_value);
|
||||
}
|
||||
|
||||
|
||||
int32_t
|
||||
xml_property (const XMLNode &node, const char *prop_name, const XMLNodeMap& styles, int32_t default_value)
|
||||
{
|
||||
|
|
@ -78,6 +85,14 @@ xml_property (const XMLNode &node, const char *prop_name, const XMLNodeMap& styl
|
|||
return value;
|
||||
}
|
||||
|
||||
|
||||
int32_t
|
||||
xml_property (const XMLNode &node, const char *prop_name, int32_t default_value)
|
||||
{
|
||||
return xml_property (node, prop_name, XMLNodeMap(), default_value);
|
||||
}
|
||||
|
||||
|
||||
uint32_t
|
||||
xml_property (const XMLNode &node, const char *prop_name, const XMLNodeMap& styles, uint32_t default_value)
|
||||
{
|
||||
|
|
@ -103,6 +118,12 @@ xml_property (const XMLNode &node, const char *prop_name, const XMLNodeMap& styl
|
|||
return value;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
xml_property (const XMLNode &node, const char *prop_name, uint32_t default_value)
|
||||
{
|
||||
return xml_property (node, prop_name, XMLNodeMap(), default_value);
|
||||
}
|
||||
|
||||
bool
|
||||
xml_property (const XMLNode &node, const char *prop_name, const XMLNodeMap& styles, bool default_value)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@
|
|||
#include <gtkmm/accelmap.h>
|
||||
#include <gtkmm/uimanager.h>
|
||||
|
||||
#include <glibmm/miscutils.h>
|
||||
|
||||
#include "pbd/error.h"
|
||||
|
||||
#include "gtkmm2ext/actions.h"
|
||||
|
|
@ -235,6 +237,50 @@ ActionManager::get_all_actions (vector<string>& names, vector<string>& paths, ve
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
ActionManager::enable_accelerators ()
|
||||
{
|
||||
/* the C++ API for functions used here appears to be broken in
|
||||
gtkmm2.6, so we fall back to the C level.
|
||||
*/
|
||||
|
||||
GList* list = gtk_ui_manager_get_action_groups (ui_manager->gobj());
|
||||
GList* node;
|
||||
GList* acts;
|
||||
string ui_string = "<ui>";
|
||||
|
||||
/* get all actions, build a string describing them all as <accelerator
|
||||
* action="name"/>
|
||||
*/
|
||||
|
||||
for (node = list; node; node = g_list_next (node)) {
|
||||
|
||||
GtkActionGroup* group = (GtkActionGroup*) node->data;
|
||||
|
||||
for (acts = gtk_action_group_list_actions (group); acts; acts = g_list_next (acts)) {
|
||||
ui_string += "<accelerator action=\"";
|
||||
|
||||
/* OK, this is pretty stupid ... there is the full
|
||||
* accel path returned by gtk_action_get_accel_path ()
|
||||
* but of course the UIManager doesn't use that, but
|
||||
* just a name, which is the last component of the
|
||||
* path. What a totally ridiculous design.
|
||||
*/
|
||||
|
||||
string fullpath = gtk_action_get_accel_path ((GtkAction*) acts->data);
|
||||
|
||||
ui_string += Glib::path_get_basename (fullpath);
|
||||
ui_string += "\"/>";
|
||||
}
|
||||
}
|
||||
|
||||
ui_string += "</ui>";
|
||||
|
||||
/* and load it */
|
||||
|
||||
ui_manager->add_ui_from_string (ui_string);
|
||||
}
|
||||
|
||||
struct ActionState {
|
||||
GtkAction* action;
|
||||
bool sensitive;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ namespace ActionManager {
|
|||
LIBGTKMM2EXT_API extern void set_toggle_action (const char* group, const char* name, bool);
|
||||
|
||||
LIBGTKMM2EXT_API extern void add_action_group (Glib::RefPtr<Gtk::ActionGroup>);
|
||||
LIBGTKMM2EXT_API extern void enable_accelerators ();
|
||||
|
||||
LIBGTKMM2EXT_API extern Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group,
|
||||
const char * name, const char * label);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue