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 int load_session_stage_two (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
215 void audio_midi_setup_reconfigure_done (int response, std::string path, std::string snapshot, std::string mix_template);
216 bool session_load_in_progress;
217 int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile const *);
218 bool session_is_new() const { return _session_is_new; }
220 ARDOUR::Session* the_session() { return _session; }
222 bool get_smart_mode () const;
224 RCOptionEditor* get_rc_option_editor() { return rc_option_editor; }
225 void show_tabbable (ArdourWidgets::Tabbable*);
227 void start_session_load (bool create_new);
228 void session_dialog_response_handler (int response, SessionDialog* session_dialog);
229 int build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path);
230 bool ask_about_loading_existing_session (const std::string& session_path);
231 int load_session_from_startup_fsm ();
233 /// @return true if session was successfully unloaded.
234 int unload_session (bool hide_stuff = false);
235 void close_session();
237 int save_state_canfail (std::string state_name = "", bool switch_to_it = false);
238 void save_state (const std::string & state_name = "", bool switch_to_it = false);
240 static ARDOUR_UI *instance () { return theArdourUI; }
242 /* signal emitted when escape key is pressed. All UI components that
243 need to respond to Escape in some way (e.g. break drag, clear
244 selection, etc) should connect to and handle this.
246 PBD::Signal0<void> Escape;
248 PublicEditor& the_editor() { return *editor;}
249 Mixer_UI* the_mixer() { return mixer; }
251 Gtk::Menu* shared_popup_menu ();
253 void new_midi_tracer_window ();
254 void toggle_editing_space();
255 void toggle_mixer_space();
256 void toggle_keep_tearoffs();
258 void reset_focus (Gtk::Widget*);
260 static PublicEditor* _instance;
262 /** Emitted frequently with the audible sample, false, and the edit point as
263 * parameters respectively.
265 * (either RapidScreenUpdate || SuperRapidScreenUpdate - user-config)
267 static sigc::signal<void, samplepos_t> Clock;
269 static void close_all_dialogs () { CloseAllDialogs(); }
270 static sigc::signal<void> CloseAllDialogs;
272 XMLNode* main_window_settings() const;
273 XMLNode* editor_settings() const;
274 XMLNode* preferences_settings() const;
275 XMLNode* mixer_settings () const;
276 XMLNode* keyboard_settings () const;
277 XMLNode* tearoff_settings (const char*) const;
279 void save_ardour_state ();
280 gboolean configure_handler (GdkEventConfigure* conf);
282 void halt_on_xrun_message ();
283 void xrun_handler (samplepos_t);
284 void create_xrun_marker (samplepos_t);
286 GUIObjectState* gui_object_state;
288 MainClock* primary_clock;
289 MainClock* secondary_clock;
290 void focus_on_clock ();
291 AudioClock* big_clock;
293 VideoTimeLine *video_timeline;
295 void store_clock_modes ();
296 void restore_clock_modes ();
297 void reset_main_clocks ();
299 void synchronize_sync_source_and_video_pullup ();
302 void add_route_dialog_response (int);
304 void add_routes_part_two ();
305 void add_routes_thread ();
307 void start_duplicate_routes ();
309 void add_video (Gtk::Window* float_window);
310 void remove_video ();
311 void start_video_server_menu (Gtk::Window* float_window);
312 bool start_video_server (Gtk::Window* float_window, bool popup_msg);
313 void stop_video_server (bool ask_confirm=false);
314 void flush_videotimeline_cache (bool localcacheonly=false);
315 void export_video (bool range = false);
317 void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *,
318 uint32_t, std::string const &, bool, ARDOUR::PresentationInfo::order_t order);
320 void session_add_mixed_track (const ARDOUR::ChanCount&, const ARDOUR::ChanCount&, ARDOUR::RouteGroup*,
321 uint32_t, std::string const &, bool strict_io,
322 ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
323 ARDOUR::PresentationInfo::order_t order);
325 void session_add_midi_bus (ARDOUR::RouteGroup*, uint32_t, std::string const &, bool strict_io,
326 ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
327 ARDOUR::PresentationInfo::order_t order);
329 void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, bool,
330 ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*,
331 ARDOUR::PresentationInfo::order_t order);
333 void session_add_foldback_bus (int32_t, uint32_t, std::string const &);
335 void display_insufficient_ports_message ();
337 void attach_to_engine ();
340 gint exit_on_main_window_close (GdkEventAny *);
342 void maximise_editing_space ();
343 void restore_editing_space ();
345 void show_ui_prefs ();
347 bool check_audioengine(Gtk::Window&);
349 void setup_profile ();
350 void setup_tooltips ();
352 void set_shuttle_fract (double);
354 void get_process_buffers ();
355 void drop_process_buffers ();
357 void reset_peak_display ();
358 void reset_route_peak_display (ARDOUR::Route*);
359 void reset_group_peak_display (ARDOUR::RouteGroup*);
361 const std::string& announce_string() const { return _announce_string; }
363 void hide_application ();
365 Gtk::Notebook& tabs();
366 Gtk::Window& main_window () { return _main_window; }
368 void setup_toplevel_window (Gtk::Window&, const std::string& name, void* owner);
370 /* called from a static C function */
372 GtkNotebook* tab_window_root_drop (GtkNotebook* src,
378 bool tabbed_window_state_event_handler (GdkEventWindowState*, void* object);
379 bool key_event_handler (GdkEventKey*, Gtk::Window* window);
381 ARDOUR::PresentationInfo::order_t translate_order (RouteDialogs::InsertAt);
383 std::map<std::string, std::string> route_setup_info (const std::string& script_path);
385 void gui_idle_handler ();
388 friend class PublicEditor;
390 void toggle_use_monitor_section ();
391 void monitor_dim_all ();
392 void monitor_cut_all ();
393 void monitor_mono ();
395 void toggle_auto_play ();
396 void toggle_auto_input ();
397 void toggle_punch ();
398 void unset_dual_punch ();
399 bool ignore_dual_punch;
400 void toggle_punch_in ();
401 void toggle_punch_out ();
402 void toggle_session_monitoring_in ();
403 void toggle_session_monitoring_disk ();
404 void show_loop_punch_ruler_and_disallow_hide ();
405 void reenable_hide_loop_punch_ruler_if_appropriate ();
406 void toggle_auto_return ();
407 void toggle_click ();
408 void toggle_audio_midi_setup ();
409 void toggle_session_auto_loop ();
410 void toggle_rc_options_window ();
411 void toggle_session_options_window ();
415 Gtk::Window _main_window;
416 Gtkmm2ext::VisibilityTracker* main_window_visibility;
417 Gtk::VBox main_vpacker;
418 Gtk::HBox status_bar_hpacker;
420 PublicEditor* editor;
422 Gtk::Tooltips _tooltips;
427 Gtk::Menu* _shared_popup_menu;
429 void hide_tabbable (ArdourWidgets::Tabbable*);
430 void detach_tabbable (ArdourWidgets::Tabbable*);
431 void attach_tabbable (ArdourWidgets::Tabbable*);
432 void button_change_tabbable_visibility (ArdourWidgets::Tabbable*);
433 void key_change_tabbable_visibility (ArdourWidgets::Tabbable*);
434 void toggle_editor_and_mixer ();
436 void tabbable_state_change (ArdourWidgets::Tabbable&);
438 void toggle_meterbridge ();
439 void toggle_luawindow ();
441 int setup_windows ();
442 void setup_transport ();
445 static ARDOUR_UI *theArdourUI;
446 SessionDialog *_session_dialog;
448 StartupFSM* startup_fsm;
452 void startup_done ();
453 void sfsm_response (StartupFSM::Result);
455 int ask_about_saving_session (const std::vector<std::string>& actions);
457 void save_session_at_its_request (std::string);
458 /* periodic safety backup, to be precise */
459 gint autosave_session();
460 void update_autosave();
461 sigc::connection _autosave_connection;
463 void session_dirty_changed ();
464 void update_title ();
466 void map_transport_state ();
467 int32_t do_engine_start ();
469 void engine_halted (const char* reason, bool free_reason);
470 void engine_stopped ();
471 void engine_running (uint32_t cnt);
475 void about_signal_response(int response);
477 Gtk::VBox top_packer;
479 sigc::connection clock_signal_connection;
480 void update_clocks ();
481 void start_clocking ();
482 void stop_clocking ();
484 void update_transport_clocks (samplepos_t pos);
485 void record_state_changed ();
487 std::list<MidiTracer*> _midi_tracer_windows;
489 /* Transport Control */
491 Gtk::Table transport_table;
492 Gtk::Frame transport_frame;
493 Gtk::HBox transport_hbox;
495 ArdourWidgets::ArdourVSpacer* secondary_clock_spacer;
496 void repack_transport_hbox ();
497 void update_clock_visibility ();
498 void toggle_follow_edits ();
500 void set_transport_controllable_state (const XMLNode&);
501 XMLNode& get_transport_controllable_state ();
503 TransportControlUI transport_ctrl;
505 ArdourWidgets::ArdourButton punch_in_button;
506 ArdourWidgets::ArdourButton punch_out_button;
507 ArdourWidgets::ArdourButton layered_button;
509 ArdourWidgets::ArdourVSpacer recpunch_spacer;
510 ArdourWidgets::ArdourVSpacer monitoring_spacer;
511 ArdourWidgets::ArdourVSpacer latency_spacer;
513 ArdourWidgets::ArdourButton monitor_in_button;
514 ArdourWidgets::ArdourButton monitor_disk_button;
515 ArdourWidgets::ArdourButton auto_input_button;
517 Gtk::Label punch_label;
518 Gtk::Label layered_label;
520 Gtk::Label punch_space;
521 Gtk::Label mon_space;
523 void toggle_external_sync ();
524 void toggle_time_master ();
525 void toggle_video_sync ();
528 ArdourWidgets::ArdourButton latency_disable_button;
530 Gtk::Label route_latency_value;
531 Gtk::Label io_latency_label;
532 Gtk::Label io_latency_value;
534 ShuttleControl shuttle_box;
535 MiniTimeline mini_timeline;
536 TimeInfoBox* time_info_box;
539 ArdourWidgets::ArdourVSpacer meterbox_spacer;
540 ArdourWidgets::ArdourVSpacer meterbox_spacer2;
542 ArdourWidgets::ArdourButton auto_return_button;
543 ArdourWidgets::ArdourButton follow_edits_button;
544 ArdourWidgets::ArdourButton sync_button;
546 ArdourWidgets::ArdourButton auditioning_alert_button;
547 ArdourWidgets::ArdourButton solo_alert_button;
548 ArdourWidgets::ArdourButton feedback_alert_button;
549 ArdourWidgets::ArdourButton error_alert_button;
551 ArdourWidgets::ArdourButton action_script_call_btn[MAX_LUA_ACTION_BUTTONS];
554 Gtk::Table editor_meter_table;
555 ArdourWidgets::ArdourButton editor_meter_peak_display;
556 LevelMeterHBox * editor_meter;
557 float editor_meter_max_peak;
558 bool editor_meter_peak_button_release (GdkEventButton*);
560 void blink_handler (bool);
561 sigc::connection blink_connection;
564 void solo_blink (bool);
565 void sync_blink (bool);
566 void audition_blink (bool);
567 void feedback_blink (bool);
568 void error_blink (bool);
570 void set_flat_buttons();
572 void soloing_changed (bool);
573 void auditioning_changed (bool);
574 void _auditioning_changed (bool);
576 bool solo_alert_press (GdkEventButton* ev);
577 void audition_alert_clicked ();
578 bool error_alert_press (GdkEventButton *);
580 void layered_button_clicked ();
582 void big_clock_value_changed ();
583 void primary_clock_value_changed ();
584 void secondary_clock_value_changed ();
586 /* called by Blink signal */
588 void transport_rec_enable_blink (bool onoff);
590 /* menu bar and associated stuff */
592 Gtk::MenuBar* menu_bar;
593 Gtk::EventBox menu_bar_base;
596 void use_menubar_as_top_menubar ();
597 void build_menu_bar ();
599 Gtk::Label wall_clock_label;
600 gint update_wall_clock ();
602 Gtk::Label disk_space_label;
603 void update_disk_space ();
604 void format_disk_space_label (float);
606 Gtk::Label timecode_format_label;
607 void update_timecode_format ();
609 Gtk::Label dsp_load_label;
610 void update_cpu_load ();
612 Gtk::Label peak_thread_work_label;
613 void update_peak_thread_work ();
615 Gtk::Label sample_rate_label;
616 void update_sample_rate (ARDOUR::samplecnt_t);
618 Gtk::Label format_label;
619 void update_format ();
621 void every_second ();
622 void every_point_one_seconds ();
623 void every_point_zero_something_seconds ();
625 sigc::connection second_connection;
626 sigc::connection point_one_second_connection;
627 sigc::connection point_zero_something_second_connection;
628 sigc::connection fps_connection;
630 void set_fps_timeout_connection ();
632 void open_session ();
633 void open_recent_session ();
634 void save_template_dialog_response (int response, SaveTemplateDialog* d);
635 void save_template ();
636 void manage_templates ();
638 void meta_session_setup (const std::string& script_path);
639 void meta_route_setup (const std::string& script_path);
641 void edit_metadata ();
642 void import_metadata ();
644 void set_transport_sensitivity (bool);
646 //stuff for ProTools-style numpad
647 void transport_numpad_event (int num);
648 void transport_numpad_decimal ();
649 bool _numpad_locate_happening;
650 int _pending_locate_num;
651 gint transport_numpad_timeout ();
652 sigc::connection _numpad_timeout_connection;
654 void transport_goto_nth_marker (int nth);
655 void transport_goto_zero ();
656 void transport_goto_start ();
657 void transport_goto_end ();
658 void transport_goto_wallclock ();
659 void transport_stop ();
660 void transport_record (bool roll);
661 void transport_roll ();
662 void transport_play_selection();
663 void transport_play_preroll();
664 void transport_rec_preroll();
665 void transport_rec_count_in();
666 void transport_forward (int option);
667 void transport_rewind (int option);
668 void transport_loop ();
669 void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
670 bool trx_record_enable_all_tracks ();
672 bool _session_is_new;
673 void set_session (ARDOUR::Session *);
674 void connect_dependents_to_session (ARDOUR::Session *);
675 void we_have_dependents ();
677 void setup_session_options ();
679 guint32 last_key_press_time;
681 bool process_snapshot_session_prompter (ArdourWidgets::Prompter& prompter, bool switch_to_it);
682 void snapshot_session (bool switch_to_it);
684 void quick_snapshot_session (bool switch_to_it); //does not promtp for name, just makes a timestamped file
686 SaveAsDialog* save_as_dialog;
688 bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
689 void save_session_as ();
690 void archive_session ();
691 void rename_session ();
694 int create_editor ();
695 int create_meterbridge ();
696 int create_luawindow ();
697 int create_masters ();
699 Meterbridge *meterbridge;
700 LuaWindow *luawindow;
702 /* Dialogs that can be created via new<T> */
704 RCOptionEditor* rc_option_editor;
705 Gtk::HBox rc_option_editor_placeholder;
707 WM::Proxy<SpeakerDialog> speaker_config_window;
708 WM::Proxy<AddRouteDialog> add_route_dialog;
709 WM::Proxy<About> about;
710 WM::Proxy<LocationUIWindow> location_ui;
711 WM::Proxy<RouteParams_UI> route_params;
712 WM::Proxy<EngineControl> audio_midi_setup;
713 WM::Proxy<ExportVideoDialog> export_video_dialog;
714 WM::Proxy<LuaScriptManager> lua_script_window;
715 WM::Proxy<IdleOMeter> idleometer;
716 WM::Proxy<PluginDSPLoadWindow> plugin_dsp_load_window;
717 WM::Proxy<TransportMastersWindow> transport_masters_window;
719 /* Windows/Dialogs that require a creator method */
721 WM::ProxyWithConstructor<SessionOptionEditor> session_option_editor;
722 WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
723 WM::ProxyWithConstructor<BundleManager> bundle_manager;
724 WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
725 WM::ProxyWithConstructor<BigTransportWindow> big_transport_window;
726 WM::ProxyWithConstructor<VirtualKeyboardWindow> virtual_keyboard_window;
727 WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
728 WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
729 WM::ProxyWithConstructor<KeyEditor> key_editor;
731 /* creator methods */
733 SessionOptionEditor* create_session_option_editor ();
734 BundleManager* create_bundle_manager ();
735 AddVideoDialog* create_add_video_dialog ();
736 BigClockWindow* create_big_clock_window();
737 BigTransportWindow* create_big_transport_window();
738 VirtualKeyboardWindow* create_virtual_keyboard_window();
739 GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
740 KeyEditor* create_key_editor ();
742 ARDOUR::SystemExec *video_server_process;
744 void handle_locations_change (ARDOUR::Location*);
746 /* Keyboard Handling */
748 ArdourKeyboard* keyboard;
750 /* Keymap handling */
752 void install_actions ();
753 void install_dependent_actions ();
755 void toggle_record_enable (uint16_t);
757 uint32_t rec_enabled_streams;
758 void count_recenabled_streams (ARDOUR::Route&);
762 Gtk::MenuItem *cleanup_item;
764 void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
766 void cleanup_peakfiles ();
769 bool have_configure_timeout;
770 ARDOUR::microseconds_t last_configure_time;
771 gint configure_timeout ();
773 ARDOUR::microseconds_t last_peak_grab;
774 ARDOUR::microseconds_t last_shuttle_request;
776 bool have_disk_speed_dialog_displayed;
777 void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
778 void disk_overrun_handler ();
779 void disk_underrun_handler ();
781 void session_format_mismatch (std::string, std::string);
783 void session_dialog (std::string);
784 int pending_state_dialog ();
785 int sr_mismatch_dialog (ARDOUR::samplecnt_t, ARDOUR::samplecnt_t);
786 void sr_mismatch_message (ARDOUR::samplecnt_t, ARDOUR::samplecnt_t);
788 Gtk::MenuItem* jack_disconnect_item;
789 Gtk::MenuItem* jack_reconnect_item;
790 Gtk::Menu* jack_bufsize_menu;
792 Glib::RefPtr<Gtk::ActionGroup> common_actions;
794 void editor_realized ();
796 std::vector<std::string> positional_sync_strings;
798 void toggle_use_mmc ();
799 void toggle_send_mmc ();
800 void toggle_send_mtc ();
801 void toggle_send_midi_clock ();
803 void toggle_use_osc ();
805 void parameter_changed (std::string);
806 void session_parameter_changed (std::string);
810 void check_memory_locking ();
812 void audioengine_setup ();
814 void display_message (const char* prefix, gint prefix_len, Glib::RefPtr<Gtk::TextBuffer::Tag>, Glib::RefPtr<Gtk::TextBuffer::Tag>, const char* msg);
815 Gtk::Label status_bar_label;
816 bool status_bar_button_press (GdkEventButton*);
818 PBD::ScopedConnectionList forever_connections;
819 PBD::ScopedConnection halt_connection;
820 PBD::ScopedConnection editor_meter_connection;
822 /* these are used only in response to a platform-specific "ShouldQuit" signal */
824 void queue_finish ();
825 void fontconfig_dialog ();
827 int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
828 int ambiguous_file (std::string file, std::vector<std::string> hits);
830 bool click_button_clicked (GdkEventButton *);
831 bool sync_button_clicked (GdkEventButton *);
833 VisibilityGroup _status_bar_visibility;
835 /** A ProcessThread so that we have some thread-local buffers for use by
836 * PluginEqGui::impulse_analysis ().
838 ARDOUR::ProcessThread* _process_thread;
840 void toggle_latency_switch ();
841 void latency_switch_changed ();
842 void session_latency_updated ();
844 void feedback_detected ();
846 ArdourWidgets::ArdourButton midi_panic_button;
849 void successful_graph_sort ();
850 bool _feedback_exists;
852 enum ArdourLogLevel {
859 ArdourLogLevel _log_not_acknowledged;
861 void on_theme_changed ();
863 bool xrun_button_release (GdkEventButton* ev);
865 std::string _announce_string;
866 void check_announcements ();
868 void audioengine_became_silent ();
870 DuplicateRouteDialog* duplicate_routes_dialog;
872 void grab_focus_after_dialog ();
874 void tabs_switch (GtkNotebookPage*, guint page_number);
875 void tabs_page_added (Gtk::Widget*, guint);
876 void tabs_page_removed (Gtk::Widget*, guint);
877 ArdourWidgets::ArdourButton editor_visibility_button;
878 ArdourWidgets::ArdourButton mixer_visibility_button;
879 ArdourWidgets::ArdourButton prefs_visibility_button;
881 bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev, Gtkmm2ext::Bindings*);
882 bool try_gtk_accel_binding (GtkWindow* win, GdkEventKey* ev, bool translate, GdkModifierType modifier);
884 bool main_window_delete_event (GdkEventAny*);
885 bool idle_ask_about_quit ();
887 bool tabbable_visibility_button_press (GdkEventButton* ev, std::string const& tabbable_name);
889 void step_up_through_tabs ();
890 void step_down_through_tabs ();
893 void close_current_dialog ();
895 bool bind_lua_action_script (GdkEventButton*, int);
896 void update_action_script_btn (int i, const std::string&);
899 #endif /* __ardour_gui_h__ */