2 * Copyright (C) 2005-2019 Paul Davis <paul@linuxaudiosystems.com>
3 * Copyright (C) 2005 Karsten Wiese <fzuuzf@googlemail.com>
4 * Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
5 * Copyright (C) 2006-2007 Doug McLain <doug@nostar.net>
6 * Copyright (C) 2006-2011 David Robillard <d@drobilla.net>
7 * Copyright (C) 2007-2012 Carl Hetherington <carl@carlh.net>
8 * Copyright (C) 2007-2015 Tim Mayberry <mojofunk@gmail.com>
9 * Copyright (C) 2008 Hans Baier <hansfbaier@googlemail.com>
10 * Copyright (C) 2012-2015 Colin Fletcher <colin.m.fletcher@googlemail.com>
11 * Copyright (C) 2013-2015 Nick Mainsbridge <mainsbridge@gmail.com>
12 * Copyright (C) 2013-2016 John Emmas <john@creativepost.co.uk>
13 * Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
14 * Copyright (C) 2014-2018 Ben Loftis <ben@harrisonconsoles.com>
15 * Copyright (C) 2017 Johannes Mueller <github@johannes-mueller.org>
16 * Copyright (C) 2018 Len Ovens <len@ovenwerks.net>
18 * This program is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License along
29 * with this program; if not, write to the Free Software Foundation, Inc.,
30 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
33 #ifndef __ardour_gui_h__
34 #define __ardour_gui_h__
38 /* need _BSD_SOURCE to get timersub macros */
52 #include "pbd/xml++.h"
53 #include <gtkmm/box.h>
54 #include <gtkmm/frame.h>
55 #include <gtkmm/label.h>
56 #include <gtkmm/table.h>
57 #include <gtkmm/fixed.h>
58 #include <gtkmm/drawingarea.h>
59 #include <gtkmm/eventbox.h>
60 #include <gtkmm/menu.h>
61 #include <gtkmm/menuitem.h>
62 #include <gtkmm/messagedialog.h>
63 #include <gtkmm/notebook.h>
64 #include <gtkmm/button.h>
65 #include <gtkmm/togglebutton.h>
66 #include <gtkmm/treeview.h>
67 #include <gtkmm/menubar.h>
68 #include <gtkmm/textbuffer.h>
69 #include <gtkmm/adjustment.h>
71 #include "gtkmm2ext/gtk_ui.h"
72 #include "gtkmm2ext/bindings.h"
73 #include "gtkmm2ext/visibility_tracker.h"
75 #include "ardour/ardour.h"
76 #include "ardour/types.h"
77 #include "ardour/utils.h"
78 #include "ardour/plugin.h"
79 #include "ardour/session_handle.h"
80 #include "ardour/system_exec.h"
82 #include "video_timeline.h"
84 #include "widgets/ardour_button.h"
85 #include "widgets/ardour_spacer.h"
87 #include "add_route_dialog.h"
88 #include "ardour_dialog.h"
89 #include "ardour_window.h"
92 #include "mini_timeline.h"
93 #include "shuttle_control.h"
94 #include "startup_fsm.h"
95 #include "transport_control.h"
96 #include "transport_control_ui.h"
97 #include "visibility_group.h"
98 #include "window_manager.h"
102 #include "add_video_dialog.h"
103 #include "big_clock_window.h"
104 #include "big_transport_window.h"
105 #include "bundle_manager.h"
106 #include "engine_dialog.h"
107 #include "export_video_dialog.h"
108 #include "global_port_matrix.h"
109 #include "idleometer.h"
110 #include "keyeditor.h"
111 #include "location_ui.h"
112 #include "lua_script_manager.h"
113 #include "plugin_dspload_window.h"
114 #include "rc_option_editor.h"
115 #include "route_dialogs.h"
116 #include "route_params_ui.h"
117 #include "session_option_editor.h"
118 #include "speaker_dialog.h"
119 #include "transport_masters_dialog.h"
120 #include "virtual_keyboard_window.h"
123 class AddRouteDialog;
124 class AddVideoDialog;
125 class BigClockWindow;
126 class BigTransportWindow;
129 class ExportVideoDialog;
131 class LocationUIWindow;
132 class LuaScriptManager;
133 class RCOptionEditor;
134 class RouteParams_UI;
135 class SessionOptionEditor;
137 class GlobalPortMatrixWindow;
139 class PluginDSPLoadWindow;
140 class TransportMastersWindow;
141 class VirtualKeyboardWindow;
145 class ArdourKeyboard;
147 class ConnectionEditor;
148 class DuplicateRouteDialog;
153 class SaveTemplateDialog;
155 class SessionOptionEditorWindow;
162 class LevelMeterHBox;
163 class GUIObjectState;
166 class ControlProtocolInfo;
179 namespace ArdourWidgets {
184 #define MAX_LUA_ACTION_SCRIPTS 32
185 #define MAX_LUA_ACTION_BUTTONS 12
187 class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr, public TransportControlProvider
190 ARDOUR_UI (int *argcp, char **argvp[], const char* localedir);
193 bool run_startup (bool should_be_new, std::string load_template);
198 void launch_manual ();
199 void launch_reference ();
200 void launch_tracker ();
201 void launch_subscribe ();
202 void launch_cheat_sheet ();
203 void launch_website ();
204 void launch_website_dev ();
205 void launch_forums ();
206 void launch_howto_report ();
210 void load_from_application_api (const std::string& path);
213 int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
214 bool session_load_in_progress;
215 int build_session (std::string const& path, std::string const& snapshot, std::string const& session_template, ARDOUR::BusProfile const&, bool from_startup_fsm = false);
216 bool session_is_new() const { return _session_is_new; }
218 ARDOUR::Session* the_session() { return _session; }
220 bool get_smart_mode () const;
222 RCOptionEditor* get_rc_option_editor() { return rc_option_editor; }
223 void show_tabbable (ArdourWidgets::Tabbable*);
225 void start_session_load (bool create_new);
226 void session_dialog_response_handler (int response, SessionDialog* session_dialog);
227 void build_session_from_dialog (SessionDialog&, std::string const& session_name, std::string const& session_path, std::string const& session_template);
228 bool ask_about_loading_existing_session (const std::string& session_path);
229 int load_session_from_startup_fsm ();
231 /// @return true if session was successfully unloaded.
232 int unload_session (bool hide_stuff = false);
233 void close_session();
235 int save_state_canfail (std::string state_name = "", bool switch_to_it = false);
236 void save_state (const std::string & state_name = "", bool switch_to_it = false);
238 static ARDOUR_UI *instance () { return theArdourUI; }
240 /* signal emitted when escape key is pressed. All UI components that
241 need to respond to Escape in some way (e.g. break drag, clear
242 selection, etc) should connect to and handle this.
244 PBD::Signal0<void> Escape;
246 PublicEditor& the_editor() { return *editor;}
247 Mixer_UI* the_mixer() { return mixer; }
249 Gtk::Menu* shared_popup_menu ();
251 void new_midi_tracer_window ();
252 void toggle_editing_space();
253 void toggle_mixer_space();
254 void toggle_keep_tearoffs();
256 void reset_focus (Gtk::Widget*);
258 static PublicEditor* _instance;
260 /** Emitted frequently with the audible sample, false, and the edit point as
261 * parameters respectively.
263 * (either RapidScreenUpdate || SuperRapidScreenUpdate - user-config)
265 static sigc::signal<void, samplepos_t> Clock;
267 static void close_all_dialogs () { CloseAllDialogs(); }
268 static sigc::signal<void> CloseAllDialogs;
270 XMLNode* main_window_settings() const;
271 XMLNode* editor_settings() const;
272 XMLNode* preferences_settings() const;
273 XMLNode* mixer_settings () const;
274 XMLNode* keyboard_settings () const;
275 XMLNode* tearoff_settings (const char*) const;
277 void save_ardour_state ();
278 gboolean configure_handler (GdkEventConfigure* conf);
280 void halt_on_xrun_message ();
281 void xrun_handler (samplepos_t);
282 void create_xrun_marker (samplepos_t);
284 GUIObjectState* gui_object_state;
286 MainClock* primary_clock;
287 MainClock* secondary_clock;
288 void focus_on_clock ();
289 AudioClock* big_clock;
291 VideoTimeLine *video_timeline;
293 void store_clock_modes ();
294 void restore_clock_modes ();
295 void reset_main_clocks ();
297 void synchronize_sync_source_and_video_pullup ();
300 void add_route_dialog_response (int);
302 void add_routes_part_two ();
303 void add_routes_thread ();
305 void start_duplicate_routes ();
307 void add_video (Gtk::Window* float_window);
308 void remove_video ();
309 void start_video_server_menu (Gtk::Window* float_window);
310 bool start_video_server (Gtk::Window* float_window, bool popup_msg);
311 void stop_video_server (bool ask_confirm=false);
312 void flush_videotimeline_cache (bool localcacheonly=false);
313 void export_video (bool range = false);
315 void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *,
316 uint32_t, std::string const &, bool, ARDOUR::PresentationInfo::order_t order);
318 void session_add_mixed_track (const ARDOUR::ChanCount&, const ARDOUR::ChanCount&, ARDOUR::RouteGroup*,
319 uint32_t, std::string const &, bool strict_io,
320 ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
321 ARDOUR::PresentationInfo::order_t order);
323 void session_add_midi_bus (ARDOUR::RouteGroup*, uint32_t, std::string const &, bool strict_io,
324 ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
325 ARDOUR::PresentationInfo::order_t order);
327 void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, bool,
328 ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*,
329 ARDOUR::PresentationInfo::order_t order);
331 void session_add_foldback_bus (int32_t, uint32_t, std::string const &);
333 void display_insufficient_ports_message ();
335 void attach_to_engine ();
338 gint exit_on_main_window_close (GdkEventAny *);
340 void maximise_editing_space ();
341 void restore_editing_space ();
343 void show_ui_prefs ();
345 bool check_audioengine(Gtk::Window&);
347 void setup_profile ();
348 void setup_tooltips ();
350 void set_shuttle_fract (double);
352 void get_process_buffers ();
353 void drop_process_buffers ();
355 void reset_peak_display ();
356 void reset_route_peak_display (ARDOUR::Route*);
357 void reset_group_peak_display (ARDOUR::RouteGroup*);
359 const std::string& announce_string() const { return _announce_string; }
361 void hide_application ();
363 Gtk::Notebook& tabs();
364 Gtk::Window& main_window () { return _main_window; }
366 void setup_toplevel_window (Gtk::Window&, const std::string& name, void* owner);
368 /* called from a static C function */
370 GtkNotebook* tab_window_root_drop (GtkNotebook* src,
376 bool tabbed_window_state_event_handler (GdkEventWindowState*, void* object);
377 bool key_event_handler (GdkEventKey*, Gtk::Window* window);
379 ARDOUR::PresentationInfo::order_t translate_order (RouteDialogs::InsertAt);
381 std::map<std::string, std::string> route_setup_info (const std::string& script_path);
383 void gui_idle_handler ();
386 friend class PublicEditor;
388 void toggle_use_monitor_section ();
389 void monitor_dim_all ();
390 void monitor_cut_all ();
391 void monitor_mono ();
393 void toggle_auto_play ();
394 void toggle_auto_input ();
395 void toggle_punch ();
396 void unset_dual_punch ();
397 bool ignore_dual_punch;
398 void toggle_punch_in ();
399 void toggle_punch_out ();
400 void toggle_session_monitoring_in ();
401 void toggle_session_monitoring_disk ();
402 void show_loop_punch_ruler_and_disallow_hide ();
403 void reenable_hide_loop_punch_ruler_if_appropriate ();
404 void toggle_auto_return ();
405 void toggle_click ();
406 void toggle_audio_midi_setup ();
407 void toggle_session_auto_loop ();
408 void toggle_rc_options_window ();
409 void toggle_session_options_window ();
413 Gtk::Window _main_window;
414 Gtkmm2ext::VisibilityTracker* main_window_visibility;
415 Gtk::VBox main_vpacker;
416 Gtk::HBox status_bar_hpacker;
418 PublicEditor* editor;
420 Gtk::Tooltips _tooltips;
425 Gtk::Menu* _shared_popup_menu;
427 void hide_tabbable (ArdourWidgets::Tabbable*);
428 void detach_tabbable (ArdourWidgets::Tabbable*);
429 void attach_tabbable (ArdourWidgets::Tabbable*);
430 void button_change_tabbable_visibility (ArdourWidgets::Tabbable*);
431 void key_change_tabbable_visibility (ArdourWidgets::Tabbable*);
432 void toggle_editor_and_mixer ();
434 void tabbable_state_change (ArdourWidgets::Tabbable&);
436 void toggle_meterbridge ();
437 void toggle_luawindow ();
439 int setup_windows ();
440 void setup_transport ();
443 static ARDOUR_UI *theArdourUI;
444 SessionDialog *_session_dialog;
446 StartupFSM* startup_fsm;
450 void startup_done ();
451 void sfsm_response (StartupFSM::Result);
453 int ask_about_saving_session (const std::vector<std::string>& actions);
455 void audio_midi_setup_reconfigure_done (int response, std::string path, std::string snapshot, std::string mix_template);
456 int load_session_stage_two (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
457 void audio_midi_setup_for_new_session_done (int response, std::string path, std::string snapshot, std::string session_template, ARDOUR::BusProfile const&);
458 int build_session_stage_two (std::string const& path, std::string const& snapshot, std::string const& session_template, ARDOUR::BusProfile const&);
459 sigc::connection _engine_dialog_connection;
461 void save_session_at_its_request (std::string);
462 /* periodic safety backup, to be precise */
463 gint autosave_session();
464 void update_autosave();
465 sigc::connection _autosave_connection;
467 void session_dirty_changed ();
468 void update_title ();
470 void map_transport_state ();
471 int32_t do_engine_start ();
473 void engine_halted (const char* reason, bool free_reason);
474 void engine_stopped ();
475 void engine_running (uint32_t cnt);
479 void about_signal_response(int response);
481 Gtk::VBox top_packer;
483 sigc::connection clock_signal_connection;
484 void update_clocks ();
485 void start_clocking ();
486 void stop_clocking ();
488 void update_transport_clocks (samplepos_t pos);
489 void record_state_changed ();
491 std::list<MidiTracer*> _midi_tracer_windows;
493 /* Transport Control */
495 Gtk::Table transport_table;
496 Gtk::Frame transport_frame;
497 Gtk::HBox transport_hbox;
499 ArdourWidgets::ArdourVSpacer* secondary_clock_spacer;
500 void repack_transport_hbox ();
501 void update_clock_visibility ();
502 void toggle_follow_edits ();
504 void set_transport_controllable_state (const XMLNode&);
505 XMLNode& get_transport_controllable_state ();
507 TransportControlUI transport_ctrl;
509 ArdourWidgets::ArdourButton punch_in_button;
510 ArdourWidgets::ArdourButton punch_out_button;
511 ArdourWidgets::ArdourButton layered_button;
513 ArdourWidgets::ArdourVSpacer recpunch_spacer;
514 ArdourWidgets::ArdourVSpacer monitoring_spacer;
515 ArdourWidgets::ArdourVSpacer latency_spacer;
517 ArdourWidgets::ArdourButton monitor_in_button;
518 ArdourWidgets::ArdourButton monitor_disk_button;
519 ArdourWidgets::ArdourButton auto_input_button;
521 Gtk::Label punch_label;
522 Gtk::Label layered_label;
524 Gtk::Label punch_space;
525 Gtk::Label mon_space;
527 void toggle_external_sync ();
528 void toggle_time_master ();
529 void toggle_video_sync ();
532 ArdourWidgets::ArdourButton latency_disable_button;
534 Gtk::Label route_latency_value;
535 Gtk::Label io_latency_label;
536 Gtk::Label io_latency_value;
538 ShuttleControl shuttle_box;
539 MiniTimeline mini_timeline;
540 TimeInfoBox* time_info_box;
543 ArdourWidgets::ArdourVSpacer meterbox_spacer;
544 ArdourWidgets::ArdourVSpacer meterbox_spacer2;
546 ArdourWidgets::ArdourButton auto_return_button;
547 ArdourWidgets::ArdourButton follow_edits_button;
548 ArdourWidgets::ArdourButton sync_button;
550 ArdourWidgets::ArdourButton auditioning_alert_button;
551 ArdourWidgets::ArdourButton solo_alert_button;
552 ArdourWidgets::ArdourButton feedback_alert_button;
553 ArdourWidgets::ArdourButton error_alert_button;
555 ArdourWidgets::ArdourButton action_script_call_btn[MAX_LUA_ACTION_BUTTONS];
558 Gtk::Table editor_meter_table;
559 ArdourWidgets::ArdourButton editor_meter_peak_display;
560 LevelMeterHBox * editor_meter;
561 float editor_meter_max_peak;
562 bool editor_meter_peak_button_release (GdkEventButton*);
564 void blink_handler (bool);
565 sigc::connection blink_connection;
568 void solo_blink (bool);
569 void sync_blink (bool);
570 void audition_blink (bool);
571 void feedback_blink (bool);
572 void error_blink (bool);
574 void set_flat_buttons();
576 void soloing_changed (bool);
577 void auditioning_changed (bool);
578 void _auditioning_changed (bool);
580 bool solo_alert_press (GdkEventButton* ev);
581 void audition_alert_clicked ();
582 bool error_alert_press (GdkEventButton *);
584 void layered_button_clicked ();
586 void big_clock_value_changed ();
587 void primary_clock_value_changed ();
588 void secondary_clock_value_changed ();
590 /* called by Blink signal */
592 void transport_rec_enable_blink (bool onoff);
594 /* menu bar and associated stuff */
596 Gtk::MenuBar* menu_bar;
597 Gtk::EventBox menu_bar_base;
600 void use_menubar_as_top_menubar ();
601 void build_menu_bar ();
603 Gtk::Label wall_clock_label;
604 gint update_wall_clock ();
606 Gtk::Label disk_space_label;
607 void update_disk_space ();
608 void format_disk_space_label (float);
610 Gtk::Label timecode_format_label;
611 void update_timecode_format ();
613 Gtk::Label dsp_load_label;
614 void update_cpu_load ();
616 Gtk::Label peak_thread_work_label;
617 void update_peak_thread_work ();
619 Gtk::Label sample_rate_label;
620 void update_sample_rate (ARDOUR::samplecnt_t);
622 Gtk::Label format_label;
623 void update_format ();
625 void every_second ();
626 void every_point_one_seconds ();
627 void every_point_zero_something_seconds ();
629 sigc::connection second_connection;
630 sigc::connection point_one_second_connection;
631 sigc::connection point_zero_something_second_connection;
632 sigc::connection fps_connection;
634 void set_fps_timeout_connection ();
636 void open_session ();
637 void open_recent_session ();
638 void save_template_dialog_response (int response, SaveTemplateDialog* d);
639 void save_template ();
640 void manage_templates ();
642 void meta_session_setup (const std::string& script_path);
643 void meta_route_setup (const std::string& script_path);
645 void edit_metadata ();
646 void import_metadata ();
648 void set_transport_sensitivity (bool);
650 //stuff for ProTools-style numpad
651 void transport_numpad_event (int num);
652 void transport_numpad_decimal ();
653 bool _numpad_locate_happening;
654 int _pending_locate_num;
655 gint transport_numpad_timeout ();
656 sigc::connection _numpad_timeout_connection;
658 void transport_goto_nth_marker (int nth);
659 void transport_goto_zero ();
660 void transport_goto_start ();
661 void transport_goto_end ();
662 void transport_goto_wallclock ();
663 void transport_stop ();
664 void transport_record (bool roll);
665 void transport_roll ();
666 void transport_play_selection();
667 void transport_play_preroll();
668 void transport_rec_preroll();
669 void transport_rec_count_in();
670 void transport_forward (int option);
671 void transport_rewind (int option);
672 void transport_loop ();
673 void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
674 bool trx_record_enable_all_tracks ();
676 bool _session_is_new;
677 void set_session (ARDOUR::Session *);
678 void connect_dependents_to_session (ARDOUR::Session *);
679 void we_have_dependents ();
681 void setup_session_options ();
683 guint32 last_key_press_time;
685 bool process_snapshot_session_prompter (ArdourWidgets::Prompter& prompter, bool switch_to_it);
686 void snapshot_session (bool switch_to_it);
688 void quick_snapshot_session (bool switch_to_it); //does not promtp for name, just makes a timestamped file
690 SaveAsDialog* save_as_dialog;
692 bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
693 void save_session_as ();
694 void archive_session ();
695 void rename_session ();
698 int create_editor ();
699 int create_meterbridge ();
700 int create_luawindow ();
701 int create_masters ();
703 Meterbridge *meterbridge;
704 LuaWindow *luawindow;
706 /* Dialogs that can be created via new<T> */
708 RCOptionEditor* rc_option_editor;
709 Gtk::HBox rc_option_editor_placeholder;
711 WM::Proxy<SpeakerDialog> speaker_config_window;
712 WM::Proxy<AddRouteDialog> add_route_dialog;
713 WM::Proxy<About> about;
714 WM::Proxy<LocationUIWindow> location_ui;
715 WM::Proxy<RouteParams_UI> route_params;
716 WM::Proxy<EngineControl> audio_midi_setup;
717 WM::Proxy<ExportVideoDialog> export_video_dialog;
718 WM::Proxy<LuaScriptManager> lua_script_window;
719 WM::Proxy<IdleOMeter> idleometer;
720 WM::Proxy<PluginDSPLoadWindow> plugin_dsp_load_window;
721 WM::Proxy<TransportMastersWindow> transport_masters_window;
723 /* Windows/Dialogs that require a creator method */
725 WM::ProxyWithConstructor<SessionOptionEditor> session_option_editor;
726 WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
727 WM::ProxyWithConstructor<BundleManager> bundle_manager;
728 WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
729 WM::ProxyWithConstructor<BigTransportWindow> big_transport_window;
730 WM::ProxyWithConstructor<VirtualKeyboardWindow> virtual_keyboard_window;
731 WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
732 WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
733 WM::ProxyWithConstructor<KeyEditor> key_editor;
735 /* creator methods */
737 SessionOptionEditor* create_session_option_editor ();
738 BundleManager* create_bundle_manager ();
739 AddVideoDialog* create_add_video_dialog ();
740 BigClockWindow* create_big_clock_window();
741 BigTransportWindow* create_big_transport_window();
742 VirtualKeyboardWindow* create_virtual_keyboard_window();
743 GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
744 KeyEditor* create_key_editor ();
746 ARDOUR::SystemExec *video_server_process;
748 void handle_locations_change (ARDOUR::Location*);
750 /* Keyboard Handling */
752 ArdourKeyboard* keyboard;
754 /* Keymap handling */
756 void install_actions ();
757 void install_dependent_actions ();
759 void toggle_record_enable (uint16_t);
761 uint32_t rec_enabled_streams;
762 void count_recenabled_streams (ARDOUR::Route&);
766 Gtk::MenuItem *cleanup_item;
768 void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
770 void cleanup_peakfiles ();
773 bool have_configure_timeout;
774 ARDOUR::microseconds_t last_configure_time;
775 gint configure_timeout ();
777 ARDOUR::microseconds_t last_peak_grab;
778 ARDOUR::microseconds_t last_shuttle_request;
780 bool have_disk_speed_dialog_displayed;
781 void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
782 void disk_overrun_handler ();
783 void disk_underrun_handler ();
785 void session_format_mismatch (std::string, std::string);
787 void session_dialog (std::string);
788 int pending_state_dialog ();
789 int sr_mismatch_dialog (ARDOUR::samplecnt_t, ARDOUR::samplecnt_t);
790 void sr_mismatch_message (ARDOUR::samplecnt_t, ARDOUR::samplecnt_t);
792 Gtk::MenuItem* jack_disconnect_item;
793 Gtk::MenuItem* jack_reconnect_item;
794 Gtk::Menu* jack_bufsize_menu;
796 Glib::RefPtr<Gtk::ActionGroup> common_actions;
798 void editor_realized ();
800 std::vector<std::string> positional_sync_strings;
802 void toggle_use_mmc ();
803 void toggle_send_mmc ();
804 void toggle_send_mtc ();
805 void toggle_send_midi_clock ();
807 void toggle_use_osc ();
809 void parameter_changed (std::string);
810 void session_parameter_changed (std::string);
814 void check_memory_locking ();
816 void audioengine_setup ();
818 void display_message (const char* prefix, gint prefix_len, Glib::RefPtr<Gtk::TextBuffer::Tag>, Glib::RefPtr<Gtk::TextBuffer::Tag>, const char* msg);
819 Gtk::Label status_bar_label;
820 bool status_bar_button_press (GdkEventButton*);
822 PBD::ScopedConnectionList forever_connections;
823 PBD::ScopedConnection halt_connection;
824 PBD::ScopedConnection editor_meter_connection;
826 /* these are used only in response to a platform-specific "ShouldQuit" signal */
828 void queue_finish ();
829 void fontconfig_dialog ();
831 int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
832 int ambiguous_file (std::string file, std::vector<std::string> hits);
834 bool click_button_clicked (GdkEventButton *);
835 bool sync_button_clicked (GdkEventButton *);
837 VisibilityGroup _status_bar_visibility;
839 /** A ProcessThread so that we have some thread-local buffers for use by
840 * PluginEqGui::impulse_analysis ().
842 ARDOUR::ProcessThread* _process_thread;
844 void toggle_latency_switch ();
845 void latency_switch_changed ();
846 void session_latency_updated ();
848 void feedback_detected ();
850 ArdourWidgets::ArdourButton midi_panic_button;
853 void successful_graph_sort ();
854 bool _feedback_exists;
856 enum ArdourLogLevel {
863 ArdourLogLevel _log_not_acknowledged;
865 void on_theme_changed ();
867 bool xrun_button_release (GdkEventButton* ev);
869 std::string _announce_string;
870 void check_announcements ();
872 void audioengine_became_silent ();
874 DuplicateRouteDialog* duplicate_routes_dialog;
876 void grab_focus_after_dialog ();
878 void tabs_switch (GtkNotebookPage*, guint page_number);
879 void tabs_page_added (Gtk::Widget*, guint);
880 void tabs_page_removed (Gtk::Widget*, guint);
881 ArdourWidgets::ArdourButton editor_visibility_button;
882 ArdourWidgets::ArdourButton mixer_visibility_button;
883 ArdourWidgets::ArdourButton prefs_visibility_button;
885 bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev, Gtkmm2ext::Bindings*);
886 bool try_gtk_accel_binding (GtkWindow* win, GdkEventKey* ev, bool translate, GdkModifierType modifier);
888 bool main_window_delete_event (GdkEventAny*);
889 bool idle_ask_about_quit ();
891 bool tabbable_visibility_button_press (GdkEventButton* ev, std::string const& tabbable_name);
893 void step_up_through_tabs ();
894 void step_down_through_tabs ();
897 void close_current_dialog ();
899 bool bind_lua_action_script (GdkEventButton*, int);
900 void update_action_script_btn (int i, const std::string&);
903 #endif /* __ardour_gui_h__ */