#include "pbd/xml++.h"
-#include "pbd/controllable.h"
#include <gtkmm/box.h>
#include <gtkmm/frame.h>
#include <gtkmm/label.h>
#include "enums.h"
#include "mini_timeline.h"
#include "shuttle_control.h"
+#include "transport_control.h"
+#include "transport_control_ui.h"
#include "visibility_group.h"
#include "window_manager.h"
#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"
#include "keyeditor.h"
#include "location_ui.h"
#include "lua_script_manager.h"
+#include "plugin_dspload_window.h"
#include "rc_option_editor.h"
#include "route_dialogs.h"
#include "route_params_ui.h"
#include "session_option_editor.h"
#include "speaker_dialog.h"
+#include "transport_masters_dialog.h"
#else
class About;
class AddRouteDialog;
class AddVideoDialog;
class BigClockWindow;
+class BigTransportWindow;
class BundleManager;
class EngineControl;
class ExportVideoDialog;
class SpeakerDialog;
class GlobalPortMatrixWindow;
class IdleOMeter;
+class PluginDSPLoadWindow;
+class TransportMastersWindow;
#endif
class VideoTimeLine;
class DuplicateRouteDialog;
class MainClock;
class Mixer_UI;
-class ArdourPrompter;
class PublicEditor;
class SaveAsDialog;
+class SaveTemplateDialog;
class SessionDialog;
class SessionOptionEditorWindow;
class Splash;
}
namespace ArdourWidgets {
+ class Prompter;
class Tabbable;
}
-class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
+#define MAX_LUA_ACTION_SCRIPTS 12
+
+class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr, public TransportControlProvider
{
public:
ARDOUR_UI (int *argcp, char **argvp[], const char* localedir);
void finish();
int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
- bool session_loaded;
bool session_load_in_progress;
- int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile&);
+ int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile*);
bool session_is_new() const { return _session_is_new; }
ARDOUR::Session* the_session() { return _session; }
bool get_smart_mode () const;
+ RCOptionEditor* get_rc_option_editor() { return rc_option_editor; }
+ void show_tabbable (ArdourWidgets::Tabbable*);
+
int get_session_parameters (bool quit_on_cancel, bool should_be_new = false, std::string load_template = "");
int build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path);
bool ask_about_loading_existing_session (const std::string& session_path);
void toggle_monitor_section_visibility ();
void toggle_keep_tearoffs();
+ void toggle_vca_pane();
+#ifdef MIXBUS
+ void toggle_mixbus_pane();
+#endif
+
void reset_focus (Gtk::Widget*);
static PublicEditor* _instance;
- /** Emitted frequently with the audible frame, false, and the edit point as
+ /** Emitted frequently with the audible sample, false, and the edit point as
* parameters respectively.
*
* (either RapidScreenUpdate || SuperRapidScreenUpdate - user-config)
*/
- static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
+ static sigc::signal<void, samplepos_t> Clock;
static void close_all_dialogs () { CloseAllDialogs(); }
static sigc::signal<void> CloseAllDialogs;
gboolean configure_handler (GdkEventConfigure* conf);
void halt_on_xrun_message ();
- void xrun_handler (framepos_t);
- void create_xrun_marker (framepos_t);
+ void xrun_handler (samplepos_t);
+ void create_xrun_marker (samplepos_t);
GUIObjectState* gui_object_state;
void flush_videotimeline_cache (bool localcacheonly=false);
void export_video (bool range = false);
- void session_add_vca (std::string const &, uint32_t);
-
- void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &, bool, ARDOUR::PresentationInfo::order_t order);
- void session_add_audio_track (
- int input_channels,
- int32_t output_channels,
- ARDOUR::TrackMode mode,
- ARDOUR::RouteGroup* route_group,
- uint32_t how_many,
- std::string const & name_template,
- bool strict_io,
- ARDOUR::PresentationInfo::order_t order
- ) {
- session_add_audio_route (true, input_channels, output_channels, mode, route_group, how_many, name_template, strict_io, order);
- }
-
- void session_add_audio_bus (
- int input_channels,
- int32_t output_channels,
- ARDOUR::RouteGroup* route_group,
- uint32_t how_many,
- std::string const & name_template,
- bool strict_io,
- ARDOUR::PresentationInfo::order_t order
- ) {
- session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, route_group, how_many, name_template, strict_io, order);
- }
-
- void session_add_midi_track (
- ARDOUR::RouteGroup* route_group,
- uint32_t how_many,
- std::string const & name_template,
- bool strict_io,
- ARDOUR::PluginInfoPtr instrument,
- ARDOUR::Plugin::PresetRecord* preset,
- ARDOUR::PresentationInfo::order_t order
- ) {
- session_add_midi_route (true, route_group, how_many, name_template, strict_io, instrument, preset, order);
- }
-
- void session_add_mixed_track (const ARDOUR::ChanCount&, const ARDOUR::ChanCount&, ARDOUR::RouteGroup*, uint32_t, std::string const &, bool,
+ void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *,
+ uint32_t, std::string const &, bool, ARDOUR::PresentationInfo::order_t order);
+
+ void session_add_mixed_track (const ARDOUR::ChanCount&, const ARDOUR::ChanCount&, ARDOUR::RouteGroup*,
+ uint32_t, std::string const &, bool strict_io,
ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
ARDOUR::PresentationInfo::order_t order);
- void session_add_midi_bus (ARDOUR::RouteGroup*, uint32_t, std::string const &, bool, ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
+
+ void session_add_midi_bus (ARDOUR::RouteGroup*, uint32_t, std::string const &, bool strict_io,
+ ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
ARDOUR::PresentationInfo::order_t order);
+
void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, bool,
ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*,
ARDOUR::PresentationInfo::order_t order);
+
+ void session_add_foldback_bus (uint32_t, std::string const &);
+
void display_insufficient_ports_message ();
void attach_to_engine ();
ARDOUR::PresentationInfo::order_t translate_order (RouteDialogs::InsertAt);
+ std::map<std::string, std::string> route_setup_info (const std::string& script_path);
+
protected:
friend class PublicEditor;
void toggle_session_options_window ();
private:
+
Gtk::Window _main_window;
Gtkmm2ext::VisibilityTracker* main_window_visibility;
Gtk::VBox main_vpacker;
bool _initial_verbose_plugin_scan;
bool first_time_engine_run;
- void show_tabbable (ArdourWidgets::Tabbable*);
void hide_tabbable (ArdourWidgets::Tabbable*);
void detach_tabbable (ArdourWidgets::Tabbable*);
void attach_tabbable (ArdourWidgets::Tabbable*);
void start_clocking ();
void stop_clocking ();
- void update_transport_clocks (framepos_t pos);
+ void update_transport_clocks (samplepos_t pos);
void record_state_changed ();
std::list<MidiTracer*> _midi_tracer_windows;
ArdourWidgets::ArdourVSpacer* secondary_clock_spacer;
void repack_transport_hbox ();
void update_clock_visibility ();
-
- struct TransportControllable : public PBD::Controllable {
- enum ToggleType {
- Roll = 0,
- Stop,
- RecordEnable,
- GotoStart,
- GotoEnd,
- AutoLoop,
- PlaySelection,
- };
-
- TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
- void set_value (double, PBD::Controllable::GroupControlDisposition group_override);
- double get_value (void) const;
-
- ARDOUR_UI& ui;
- ToggleType type;
- };
-
- boost::shared_ptr<TransportControllable> roll_controllable;
- boost::shared_ptr<TransportControllable> stop_controllable;
- boost::shared_ptr<TransportControllable> goto_start_controllable;
- boost::shared_ptr<TransportControllable> goto_end_controllable;
- boost::shared_ptr<TransportControllable> auto_loop_controllable;
- boost::shared_ptr<TransportControllable> play_selection_controllable;
- boost::shared_ptr<TransportControllable> rec_controllable;
-
void toggle_follow_edits ();
void set_transport_controllable_state (const XMLNode&);
XMLNode& get_transport_controllable_state ();
- ArdourWidgets::ArdourButton roll_button;
- ArdourWidgets::ArdourButton stop_button;
- ArdourWidgets::ArdourButton goto_start_button;
- ArdourWidgets::ArdourButton goto_end_button;
- ArdourWidgets::ArdourButton auto_loop_button;
- ArdourWidgets::ArdourButton play_selection_button;
- ArdourWidgets::ArdourButton rec_button;
+ TransportControlUI transport_ctrl;
+
ArdourWidgets::ArdourButton punch_in_button;
ArdourWidgets::ArdourButton punch_out_button;
ArdourWidgets::ArdourButton layered_button;
void toggle_time_master ();
void toggle_video_sync ();
- ShuttleControl shuttle_box;
- MiniTimeline mini_timeline;
- TimeInfoBox *time_info_box;
+ ShuttleControl shuttle_box;
+ MiniTimeline mini_timeline;
+ TimeInfoBox* time_info_box;
+
+
+ ArdourWidgets::ArdourVSpacer meterbox_spacer;
+ ArdourWidgets::ArdourVSpacer meterbox_spacer2;
ArdourWidgets::ArdourButton auto_return_button;
ArdourWidgets::ArdourButton follow_edits_button;
- ArdourWidgets::ArdourButton click_button;
ArdourWidgets::ArdourButton sync_button;
ArdourWidgets::ArdourButton auditioning_alert_button;
ArdourWidgets::ArdourButton feedback_alert_button;
ArdourWidgets::ArdourButton error_alert_button;
- ArdourWidgets::ArdourButton action_script_call_btn[10];
+ ArdourWidgets::ArdourButton action_script_call_btn[MAX_LUA_ACTION_SCRIPTS];
Gtk::Table action_script_table;
Gtk::VBox alert_box;
- Gtk::VBox meter_box;
+ Gtk::Table editor_meter_table;
ArdourWidgets::ArdourButton editor_meter_peak_display;
LevelMeterHBox * editor_meter;
float editor_meter_max_peak;
Gtk::Label wall_clock_label;
gint update_wall_clock ();
- Gtk::Label disk_space_label;
+ Gtk::Label disk_space_label;
void update_disk_space ();
+ void format_disk_space_label (float);
Gtk::Label timecode_format_label;
void update_timecode_format ();
- Gtk::Label cpu_load_label;
+ Gtk::Label dsp_load_label;
void update_cpu_load ();
- Gtk::Label xrun_label;
- void update_xrun_count ();
-
Gtk::Label peak_thread_work_label;
void update_peak_thread_work ();
- Gtk::Label buffer_load_label;
- void update_buffer_load ();
-
Gtk::Label sample_rate_label;
- void update_sample_rate (ARDOUR::framecnt_t);
+ void update_sample_rate (ARDOUR::samplecnt_t);
Gtk::Label format_label;
void update_format ();
void open_session ();
void open_recent_session ();
- bool process_save_template_prompter (ArdourPrompter& prompter);
+ void save_template_dialog_response (int response, SaveTemplateDialog* d);
void save_template ();
void manage_templates ();
+ void meta_session_setup (const std::string& script_path);
+ void meta_route_setup (const std::string& script_path);
+
void edit_metadata ();
void import_metadata ();
- void set_loop_sensitivity ();
void set_transport_sensitivity (bool);
//stuff for ProTools-style numpad
guint32 last_key_press_time;
- bool process_snapshot_session_prompter (ArdourPrompter& prompter, bool switch_to_it);
+ bool process_snapshot_session_prompter (ArdourWidgets::Prompter& prompter, bool switch_to_it);
void snapshot_session (bool switch_to_it);
void quick_snapshot_session (bool switch_to_it); //does not promtp for name, just makes a timestamped file
WM::Proxy<ExportVideoDialog> export_video_dialog;
WM::Proxy<LuaScriptManager> lua_script_window;
WM::Proxy<IdleOMeter> idleometer;
+ WM::Proxy<PluginDSPLoadWindow> plugin_dsp_load_window;
+ WM::Proxy<TransportMastersWindow> transport_masters_window;
/* Windows/Dialogs that require a creator method */
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;
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 ();
void session_dialog (std::string);
int pending_state_dialog ();
- int sr_mismatch_dialog (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
- void sr_mismatch_message (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
+ int sr_mismatch_dialog (ARDOUR::samplecnt_t, ARDOUR::samplecnt_t);
+ void sr_mismatch_message (ARDOUR::samplecnt_t, ARDOUR::samplecnt_t);
Gtk::MenuItem* jack_disconnect_item;
Gtk::MenuItem* jack_reconnect_item;
void audioengine_setup ();
- void display_message (const char *prefix, gint prefix_len,
- Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
- const char *msg);
+ void display_message (const char* prefix, gint prefix_len, Glib::RefPtr<Gtk::TextBuffer::Tag>, Glib::RefPtr<Gtk::TextBuffer::Tag>, const char* msg);
Gtk::Label status_bar_label;
bool status_bar_button_press (GdkEventButton*);
PBD::ScopedConnection halt_connection;
PBD::ScopedConnection editor_meter_connection;
- void step_edit_status_change (bool);
-
/* these are used only in response to a platform-specific "ShouldQuit" signal */
bool idle_finish ();
void queue_finish ();
int ambiguous_file (std::string file, std::vector<std::string> hits);
bool click_button_clicked (GdkEventButton *);
- bool click_button_scroll (GdkEventScroll *);
bool sync_button_clicked (GdkEventButton *);
VisibilityGroup _status_bar_visibility;