Add a separate, dedicated transport-control window
This commit is contained in:
parent
aab787f686
commit
22c497b62d
|
@ -569,6 +569,7 @@
|
|||
<menuitem action='toggle-bundle-manager'/>
|
||||
#endif
|
||||
<menuitem action='toggle-big-clock'/>
|
||||
<menuitem action='toggle-big-transport'/>
|
||||
#if 0
|
||||
<menuitem action='toggle-speaker-config'/>
|
||||
#endif
|
||||
|
|
|
@ -138,6 +138,7 @@ typedef uint64_t microseconds_t;
|
|||
#include "audio_clock.h"
|
||||
#include "audio_region_view.h"
|
||||
#include "big_clock_window.h"
|
||||
#include "big_transport_window.h"
|
||||
#include "bundle_manager.h"
|
||||
#include "duplicate_routes_dialog.h"
|
||||
#include "debug.h"
|
||||
|
@ -316,6 +317,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
, add_video_dialog (X_("add-video"), _("Add Video"), boost::bind (&ARDOUR_UI::create_add_video_dialog, this))
|
||||
, bundle_manager (X_("bundle-manager"), _("Bundle Manager"), boost::bind (&ARDOUR_UI::create_bundle_manager, this))
|
||||
, big_clock_window (X_("big-clock"), _("Big Clock"), boost::bind (&ARDOUR_UI::create_big_clock_window, this))
|
||||
, big_transport_window (X_("big-transport"), _("Transport Controls"), boost::bind (&ARDOUR_UI::create_big_transport_window, this))
|
||||
, audio_port_matrix (X_("audio-connection-manager"), _("Audio Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::AUDIO))
|
||||
, midi_port_matrix (X_("midi-connection-manager"), _("MIDI Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::MIDI))
|
||||
, key_editor (X_("key-editor"), _("Keyboard Shortcuts"), boost::bind (&ARDOUR_UI::create_key_editor, this))
|
||||
|
@ -464,6 +466,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
bundle_manager.set_state (*ui_xml, 0);
|
||||
location_ui.set_state (*ui_xml, 0);
|
||||
big_clock_window.set_state (*ui_xml, 0);
|
||||
big_transport_window.set_state (*ui_xml, 0);
|
||||
audio_port_matrix.set_state (*ui_xml, 0);
|
||||
midi_port_matrix.set_state (*ui_xml, 0);
|
||||
export_video_dialog.set_state (*ui_xml, 0);
|
||||
|
@ -486,6 +489,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
WM::Manager::instance().register_window (&bundle_manager);
|
||||
WM::Manager::instance().register_window (&location_ui);
|
||||
WM::Manager::instance().register_window (&big_clock_window);
|
||||
WM::Manager::instance().register_window (&big_transport_window);
|
||||
WM::Manager::instance().register_window (&audio_port_matrix);
|
||||
WM::Manager::instance().register_window (&midi_port_matrix);
|
||||
WM::Manager::instance().register_window (&idleometer);
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
#include "about.h"
|
||||
#include "add_video_dialog.h"
|
||||
#include "big_clock_window.h"
|
||||
#include "big_transport_window.h"
|
||||
#include "bundle_manager.h"
|
||||
#include "engine_dialog.h"
|
||||
#include "export_video_dialog.h"
|
||||
|
@ -105,6 +106,7 @@ class About;
|
|||
class AddRouteDialog;
|
||||
class AddVideoDialog;
|
||||
class BigClockWindow;
|
||||
class BigTransportWindow;
|
||||
class BundleManager;
|
||||
class EngineControl;
|
||||
class ExportVideoDialog;
|
||||
|
@ -679,6 +681,7 @@ private:
|
|||
WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
|
||||
WM::ProxyWithConstructor<BundleManager> bundle_manager;
|
||||
WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
|
||||
WM::ProxyWithConstructor<BigTransportWindow> big_transport_window;
|
||||
WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
|
||||
WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
|
||||
WM::ProxyWithConstructor<KeyEditor> key_editor;
|
||||
|
@ -689,6 +692,7 @@ private:
|
|||
BundleManager* create_bundle_manager ();
|
||||
AddVideoDialog* create_add_video_dialog ();
|
||||
BigClockWindow* create_big_clock_window();
|
||||
BigTransportWindow* create_big_transport_window();
|
||||
GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
|
||||
KeyEditor* create_key_editor ();
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#include "add_video_dialog.h"
|
||||
#include "ardour_ui.h"
|
||||
#include "big_clock_window.h"
|
||||
#include "big_transport_window.h"
|
||||
#include "bundle_manager.h"
|
||||
#include "global_port_matrix.h"
|
||||
#include "gui_object.h"
|
||||
|
@ -88,6 +89,10 @@ ARDOUR_UI::set_session (Session *s)
|
|||
|
||||
transport_ctrl.set_session (s);
|
||||
|
||||
if (big_transport_window) {
|
||||
big_transport_window->set_session (s);
|
||||
}
|
||||
|
||||
if (!_session) {
|
||||
WM::Manager::instance().set_session (s);
|
||||
/* Session option editor cannot exist across change-of-session */
|
||||
|
@ -868,6 +873,14 @@ ARDOUR_UI::create_big_clock_window ()
|
|||
return new BigClockWindow (*big_clock);
|
||||
}
|
||||
|
||||
BigTransportWindow*
|
||||
ARDOUR_UI::create_big_transport_window ()
|
||||
{
|
||||
BigTransportWindow* btw = new BigTransportWindow ();
|
||||
btw->set_session (_session);
|
||||
return btw;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::handle_locations_change (Location *)
|
||||
{
|
||||
|
@ -890,6 +903,9 @@ ARDOUR_UI::tabbed_window_state_event_handler (GdkEventWindowState* ev, void* obj
|
|||
if (big_clock_window) {
|
||||
big_clock_window->set_transient_for (*editor->own_window());
|
||||
}
|
||||
if (big_transport_window) {
|
||||
big_transport_window->set_transient_for (*editor->own_window());
|
||||
}
|
||||
}
|
||||
|
||||
} else if (object == mixer) {
|
||||
|
@ -899,6 +915,9 @@ ARDOUR_UI::tabbed_window_state_event_handler (GdkEventWindowState* ev, void* obj
|
|||
if (big_clock_window) {
|
||||
big_clock_window->set_transient_for (*mixer->own_window());
|
||||
}
|
||||
if (big_transport_window) {
|
||||
big_transport_window->set_transient_for (*mixer->own_window());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
41
gtk2_ardour/big_transport_window.cc
Normal file
41
gtk2_ardour/big_transport_window.cc
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (C) 2017 Robin Gareus <robin@gareus.org>
|
||||
* Copyright (C) 2013 Paul Davis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <gtkmm/box.h>
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "big_transport_window.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
|
||||
using namespace Glib;
|
||||
using namespace Gtk;
|
||||
|
||||
BigTransportWindow::BigTransportWindow ()
|
||||
: ArdourWindow (_("Transport Controls"))
|
||||
{
|
||||
transport_ctrl.setup (ARDOUR_UI::instance ());
|
||||
transport_ctrl.map_actions ();
|
||||
|
||||
set_keep_above (true);
|
||||
VBox* vbox = manage (new VBox);
|
||||
vbox->pack_start (transport_ctrl, true, true);
|
||||
add (*vbox);
|
||||
vbox->show_all();
|
||||
}
|
44
gtk2_ardour/big_transport_window.h
Normal file
44
gtk2_ardour/big_transport_window.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (C) 2017 Robin Gareus <robin@gareus.org>
|
||||
* Copyright (C) 2013 Paul Davis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _big_transport_window_h_
|
||||
#define _big_transport_window_h_
|
||||
|
||||
#include "ardour_window.h"
|
||||
#include "transport_control_ui.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
class Session;
|
||||
}
|
||||
|
||||
class BigTransportWindow : public ArdourWindow
|
||||
{
|
||||
public:
|
||||
BigTransportWindow ();
|
||||
|
||||
void set_session (ARDOUR::Session *s) {
|
||||
transport_ctrl.set_session (s);
|
||||
}
|
||||
|
||||
private:
|
||||
TransportControlUI transport_ctrl;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -53,6 +53,7 @@ gtk2_ardour_sources = [
|
|||
'automation_time_axis.cc',
|
||||
'axis_view.cc',
|
||||
'big_clock_window.cc',
|
||||
'big_transport_window.cc',
|
||||
'bundle_manager.cc',
|
||||
'clock_group.cc',
|
||||
'color_theme_manager.cc',
|
||||
|
|
Loading…
Reference in New Issue
Block a user