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);
196 static void pop_back_splash (Gtk::Window&);
199 void launch_manual ();
200 void launch_reference ();
201 void launch_tracker ();
202 void launch_subscribe ();
203 void launch_cheat_sheet ();
204 void launch_website ();
205 void launch_website_dev ();
206 void launch_forums ();
207 void launch_howto_report ();
211 void load_from_application_api (const std::string& path);
214 int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
215 bool session_load_in_progress;
216 int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile const *);
217 bool session_is_new() const { return _session_is_new; }
219 ARDOUR::Session* the_session() { return _session; }
221 bool get_smart_mode () const;
223 RCOptionEditor* get_rc_option_editor() { return rc_option_editor; }
224 void show_tabbable (ArdourWidgets::Tabbable*);
226 void start_session_load (bool create_new);
227 void session_dialog_response_handler (int response, SessionDialog* session_dialog);
228 int build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path);
229 bool ask_about_loading_existing_session (const std::string& session_path);
230 int load_session_from_startup_fsm ();
232 /// @return true if session was successfully unloaded.
233 int unload_session (bool hide_stuff = false);
234 void close_session();
236 int save_state_canfail (std::string state_name = "", bool switch_to_it = false);
237 void save_state (const std::string & state_name = "", bool switch_to_it = false);
239 static ARDOUR_UI *instance () { return theArdourUI; }
241 /* signal emitted when escape key is pressed. All UI components that
242 need to respond to Escape in some way (e.g. break drag, clear
243 selection, etc) should connect to and handle this.
245 PBD::Signal0<void> Escape;
247 PublicEditor& the_editor() { return *editor;}
248 Mixer_UI* the_mixer() { return mixer; }
250 Gtk::Menu* shared_popup_menu ();
252 void new_midi_tracer_window ();
253 void toggle_editing_space();
254 void toggle_mixer_space();
255 void toggle_keep_tearoffs();
257 void reset_focus (Gtk::Widget*);
259 static PublicEditor* _instance;
261 /** Emitted frequently with the audible sample, false, and the edit point as
262 * parameters respectively.
264 * (either RapidScreenUpdate || SuperRapidScreenUpdate - user-config)
266 static sigc::signal<void, samplepos_t> Clock;
268 static void close_all_dialogs () { CloseAllDialogs(); }
269 static sigc::signal<void> CloseAllDialogs;
271 XMLNode* main_window_settings() const;
272 XMLNode* editor_settings() const;
273 XMLNode* preferences_settings() const;
274 XMLNode* mixer_settings () const;
275 XMLNode* keyboard_settings () const;
276 XMLNode* tearoff_settings (const char*) const;
278 void save_ardour_state ();
279 gboolean configure_handler (GdkEventConfigure* conf);
281 void halt_on_xrun_message ();
282 void xrun_handler (samplepos_t);
283 void create_xrun_marker (samplepos_t);
285 GUIObjectState* gui_object_state;
287 MainClock* primary_clock;
288 MainClock* secondary_clock;
289 void focus_on_clock ();
290 AudioClock* big_clock;
292 VideoTimeLine *video_timeline;
294 void store_clock_modes ();
295 void restore_clock_modes ();
296 void reset_main_clocks ();
298 void synchronize_sync_source_and_video_pullup ();
301 void add_route_dialog_response (int);
303 void add_routes_part_two ();
304 void add_routes_thread ();
306 void start_duplicate_routes ();
308 void add_video (Gtk::Window* float_window);
309 void remove_video ();
310 void start_video_server_menu (Gtk::Window* float_window);
311 bool start_video_server (Gtk::Window* float_window, bool popup_msg);
312 void stop_video_server (bool ask_confirm=false);
313 void flush_videotimeline_cache (bool localcacheonly=false);
314 void export_video (bool range = false);
316 void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *,
317 uint32_t, std::string const &, bool, ARDOUR::PresentationInfo::order_t order);
319 void session_add_mixed_track (const ARDOUR::ChanCount&, const ARDOUR::ChanCount&, ARDOUR::RouteGroup*,
320 uint32_t, std::string const &, bool strict_io,
321 ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
322 ARDOUR::PresentationInfo::order_t order);
324 void session_add_midi_bus (ARDOUR::RouteGroup*, uint32_t, std::string const &, bool strict_io,
325 ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
326 ARDOUR::PresentationInfo::order_t order);
328 void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, bool,
329 ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*,
330 ARDOUR::PresentationInfo::order_t order);
332 void session_add_foldback_bus (int32_t, uint32_t, std::string const &);
334 void display_insufficient_ports_message ();
336 void attach_to_engine ();
339 gint exit_on_main_window_close (GdkEventAny *);
341 void maximise_editing_space ();
342 void restore_editing_space ();
344 void show_ui_prefs ();
346 bool check_audioengine(Gtk::Window&);
348 void setup_profile ();
349 void setup_tooltips ();
351 void set_shuttle_fract (double);
353 void get_process_buffers ();
354 void drop_process_buffers ();
356 void reset_peak_display ();
357 void reset_route_peak_display (ARDOUR::Route*);
358 void reset_group_peak_display (ARDOUR::RouteGroup*);
360 const std::string& announce_string() const { return _announce_string; }
362 void hide_application ();
364 Gtk::Notebook& tabs();
365 Gtk::Window& main_window () { return _main_window; }
367 void setup_toplevel_window (Gtk::Window&, const std::string& name, void* owner);
369 /* called from a static C function */
371 GtkNotebook* tab_window_root_drop (GtkNotebook* src,
377 bool tabbed_window_state_event_handler (GdkEventWindowState*, void* object);
378 bool key_event_handler (GdkEventKey*, Gtk::Window* window);
380 ARDOUR::PresentationInfo::order_t translate_order (RouteDialogs::InsertAt);
382 std::map<std::string, std::string> route_setup_info (const std::string& script_path);
384 void gui_idle_handler ();
387 friend class PublicEditor;
389 void toggle_use_monitor_section ();
390 void monitor_dim_all ();
391 void monitor_cut_all ();
392 void monitor_mono ();
394 void toggle_auto_play ();
395 void toggle_auto_input ();
396 void toggle_punch ();
397 void unset_dual_punch ();
398 bool ignore_dual_punch;
399 void toggle_punch_in ();
400 void toggle_punch_out ();
401 void toggle_session_monitoring_in ();
402 void toggle_session_monitoring_disk ();
403 void show_loop_punch_ruler_and_disallow_hide ();
404 void reenable_hide_loop_punch_ruler_if_appropriate ();
405 void toggle_auto_return ();
406 void toggle_click ();
407 void toggle_audio_midi_setup ();
408 void toggle_session_auto_loop ();
409 void toggle_rc_options_window ();
410 void toggle_session_options_window ();
414 Gtk::Window _main_window;
415 Gtkmm2ext::VisibilityTracker* main_window_visibility;
416 Gtk::VBox main_vpacker;
417 Gtk::HBox status_bar_hpacker;
419 PublicEditor* editor;
421 Gtk::Tooltips _tooltips;
426 Gtk::Menu* _shared_popup_menu;
428 void hide_tabbable (ArdourWidgets::Tabbable*);
429 void detach_tabbable (ArdourWidgets::Tabbable*);
430 void attach_tabbable (ArdourWidgets::Tabbable*);
431 void button_change_tabbable_visibility (ArdourWidgets::Tabbable*);
432 void key_change_tabbable_visibility (ArdourWidgets::Tabbable*);
433 void toggle_editor_and_mixer ();
435 void tabbable_state_change (ArdourWidgets::Tabbable&);
437 void toggle_meterbridge ();
438 void toggle_luawindow ();
440 int setup_windows ();
441 void setup_transport ();
444 static ARDOUR_UI *theArdourUI;
445 SessionDialog *_session_dialog;
447 StartupFSM* startup_fsm;
451 void startup_done ();
452 void sfsm_response (StartupFSM::Result);
454 int ask_about_saving_session (const std::vector<std::string>& actions);
456 void save_session_at_its_request (std::string);
457 /* periodic safety backup, to be precise */
458 gint autosave_session();
459 void update_autosave();
460 sigc::connection _autosave_connection;
462 void session_dirty_changed ();
463 void update_title ();
465 void map_transport_state ();
466 int32_t do_engine_start ();
468 void engine_halted (const char* reason, bool free_reason);
469 void engine_stopped ();
470 void engine_running (uint32_t cnt);
474 void about_signal_response(int response);
476 Gtk::VBox top_packer;
478 sigc::connection clock_signal_connection;
479 void update_clocks ();
480 void start_clocking ();
481 void stop_clocking ();
483 void update_transport_clocks (samplepos_t pos);
484 void record_state_changed ();
486 std::list<MidiTracer*> _midi_tracer_windows;
488 /* Transport Control */
490 Gtk::Table transport_table;
491 Gtk::Frame transport_frame;
492 Gtk::HBox transport_hbox;
494 ArdourWidgets::ArdourVSpacer* secondary_clock_spacer;
495 void repack_transport_hbox ();
496 void update_clock_visibility ();
497 void toggle_follow_edits ();
499 void set_transport_controllable_state (const XMLNode&);
500 XMLNode& get_transport_controllable_state ();
502 TransportControlUI transport_ctrl;
504 ArdourWidgets::ArdourButton punch_in_button;
505 ArdourWidgets::ArdourButton punch_out_button;
506 ArdourWidgets::ArdourButton layered_button;
508 ArdourWidgets::ArdourVSpacer recpunch_spacer;
509 ArdourWidgets::ArdourVSpacer monitoring_spacer;
510 ArdourWidgets::ArdourVSpacer latency_spacer;
512 ArdourWidgets::ArdourButton monitor_in_button;
513 ArdourWidgets::ArdourButton monitor_disk_button;
514 ArdourWidgets::ArdourButton auto_input_button;
516 Gtk::Label punch_label;
517 Gtk::Label layered_label;
519 Gtk::Label punch_space;
520 Gtk::Label mon_space;
522 void toggle_external_sync ();
523 void toggle_time_master ();
524 void toggle_video_sync ();
527 ArdourWidgets::ArdourButton latency_disable_button;
529 Gtk::Label route_latency_value;
530 Gtk::Label io_latency_label;
531 Gtk::Label io_latency_value;
533 ShuttleControl shuttle_box;
534 MiniTimeline mini_timeline;
535 TimeInfoBox* time_info_box;
538 ArdourWidgets::ArdourVSpacer meterbox_spacer;
539 ArdourWidgets::ArdourVSpacer meterbox_spacer2;
541 ArdourWidgets::ArdourButton auto_return_button;
542 ArdourWidgets::ArdourButton follow_edits_button;
543 ArdourWidgets::ArdourButton sync_button;
545 ArdourWidgets::ArdourButton auditioning_alert_button;
546 ArdourWidgets::ArdourButton solo_alert_button;
547 ArdourWidgets::ArdourButton feedback_alert_button;
548 ArdourWidgets::ArdourButton error_alert_button;
550 ArdourWidgets::ArdourButton action_script_call_btn[MAX_LUA_ACTION_BUTTONS];
553 Gtk::Table editor_meter_table;
554 ArdourWidgets::ArdourButton editor_meter_peak_display;
555 LevelMeterHBox * editor_meter;
556 float editor_meter_max_peak;
557 bool editor_meter_peak_button_release (GdkEventButton*);
559 void blink_handler (bool);
560 sigc::connection blink_connection;
563 void solo_blink (bool);
564 void sync_blink (bool);
565 void audition_blink (bool);
566 void feedback_blink (bool);
567 void error_blink (bool);
569 void set_flat_buttons();
571 void soloing_changed (bool);
572 void auditioning_changed (bool);
573 void _auditioning_changed (bool);
575 bool solo_alert_press (GdkEventButton* ev);
576 void audition_alert_clicked ();
577 bool error_alert_press (GdkEventButton *);
579 void layered_button_clicked ();
581 void big_clock_value_changed ();
582 void primary_clock_value_changed ();
583 void secondary_clock_value_changed ();
585 /* called by Blink signal */
587 void transport_rec_enable_blink (bool onoff);
589 /* menu bar and associated stuff */
591 Gtk::MenuBar* menu_bar;
592 Gtk::EventBox menu_bar_base;
595 void use_menubar_as_top_menubar ();
596 void build_menu_bar ();
598 Gtk::Label wall_clock_label;
599 gint update_wall_clock ();
601 Gtk::Label disk_space_label;
602 void update_disk_space ();
603 void format_disk_space_label (float);
605 Gtk::Label timecode_format_label;
606 void update_timecode_format ();
608 Gtk::Label dsp_load_label;
609 void update_cpu_load ();
611 Gtk::Label peak_thread_work_label;
612 void update_peak_thread_work ();
614 Gtk::Label sample_rate_label;
615 void update_sample_rate (ARDOUR::samplecnt_t);
617 Gtk::Label format_label;
618 void update_format ();
620 void every_second ();
621 void every_point_one_seconds ();
622 void every_point_zero_something_seconds ();
624 sigc::connection second_connection;
625 sigc::connection point_one_second_connection;
626 sigc::connection point_zero_something_second_connection;
627 sigc::connection fps_connection;
629 void set_fps_timeout_connection ();
631 void open_session ();
632 void open_recent_session ();
633 void save_template_dialog_response (int response, SaveTemplateDialog* d);
634 void save_template ();
635 void manage_templates ();
637 void meta_session_setup (const std::string& script_path);
638 void meta_route_setup (const std::string& script_path);
640 void edit_metadata ();
641 void import_metadata ();
643 void set_transport_sensitivity (bool);
645 //stuff for ProTools-style numpad
646 void transport_numpad_event (int num);
647 void transport_numpad_decimal ();
648 bool _numpad_locate_happening;
649 int _pending_locate_num;
650 gint transport_numpad_timeout ();
651 sigc::connection _numpad_timeout_connection;
653 void transport_goto_nth_marker (int nth);
654 void transport_goto_zero ();
655 void transport_goto_start ();
656 void transport_goto_end ();
657 void transport_goto_wallclock ();
658 void transport_stop ();
659 void transport_record (bool roll);
660 void transport_roll ();
661 void transport_play_selection();
662 void transport_play_preroll();
663 void transport_rec_preroll();
664 void transport_rec_count_in();
665 void transport_forward (int option);
666 void transport_rewind (int option);
667 void transport_loop ();
668 void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
669 bool trx_record_enable_all_tracks ();
671 bool _session_is_new;
672 void set_session (ARDOUR::Session *);
673 void connect_dependents_to_session (ARDOUR::Session *);
674 void we_have_dependents ();
676 void setup_session_options ();
678 guint32 last_key_press_time;
680 bool process_snapshot_session_prompter (ArdourWidgets::Prompter& prompter, bool switch_to_it);
681 void snapshot_session (bool switch_to_it);
683 void quick_snapshot_session (bool switch_to_it); //does not promtp for name, just makes a timestamped file
685 SaveAsDialog* save_as_dialog;
687 bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
688 void save_session_as ();
689 void archive_session ();
690 void rename_session ();
693 int create_editor ();
694 int create_meterbridge ();
695 int create_luawindow ();
696 int create_masters ();
698 Meterbridge *meterbridge;
699 LuaWindow *luawindow;
701 /* Dialogs that can be created via new<T> */
703 RCOptionEditor* rc_option_editor;
704 Gtk::HBox rc_option_editor_placeholder;
706 WM::Proxy<SpeakerDialog> speaker_config_window;
707 WM::Proxy<AddRouteDialog> add_route_dialog;
708 WM::Proxy<About> about;
709 WM::Proxy<LocationUIWindow> location_ui;
710 WM::Proxy<RouteParams_UI> route_params;
711 WM::Proxy<EngineControl> audio_midi_setup;
712 WM::Proxy<ExportVideoDialog> export_video_dialog;
713 WM::Proxy<LuaScriptManager> lua_script_window;
714 WM::Proxy<IdleOMeter> idleometer;
715 WM::Proxy<PluginDSPLoadWindow> plugin_dsp_load_window;
716 WM::Proxy<TransportMastersWindow> transport_masters_window;
718 /* Windows/Dialogs that require a creator method */
720 WM::ProxyWithConstructor<SessionOptionEditor> session_option_editor;
721 WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
722 WM::ProxyWithConstructor<BundleManager> bundle_manager;
723 WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
724 WM::ProxyWithConstructor<BigTransportWindow> big_transport_window;
725 WM::ProxyWithConstructor<VirtualKeyboardWindow> virtual_keyboard_window;
726 WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
727 WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
728 WM::ProxyWithConstructor<KeyEditor> key_editor;
730 /* creator methods */
732 SessionOptionEditor* create_session_option_editor ();
733 BundleManager* create_bundle_manager ();
734 AddVideoDialog* create_add_video_dialog ();
735 BigClockWindow* create_big_clock_window();
736 BigTransportWindow* create_big_transport_window();
737 VirtualKeyboardWindow* create_virtual_keyboard_window();
738 GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
739 KeyEditor* create_key_editor ();
741 ARDOUR::SystemExec *video_server_process;
743 void handle_locations_change (ARDOUR::Location*);
745 /* Keyboard Handling */
747 ArdourKeyboard* keyboard;
749 /* Keymap handling */
751 void install_actions ();
752 void install_dependent_actions ();
754 void toggle_record_enable (uint16_t);
756 uint32_t rec_enabled_streams;
757 void count_recenabled_streams (ARDOUR::Route&);
761 Gtk::MenuItem *cleanup_item;
763 void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
765 void cleanup_peakfiles ();
768 bool have_configure_timeout;
769 ARDOUR::microseconds_t last_configure_time;
770 gint configure_timeout ();
772 ARDOUR::microseconds_t last_peak_grab;
773 ARDOUR::microseconds_t last_shuttle_request;
775 bool have_disk_speed_dialog_displayed;
776 void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
777 void disk_overrun_handler ();
778 void disk_underrun_handler ();
780 void session_format_mismatch (std::string, std::string);
782 void session_dialog (std::string);
783 int pending_state_dialog ();
784 int sr_mismatch_dialog (ARDOUR::samplecnt_t, ARDOUR::samplecnt_t);
785 void sr_mismatch_message (ARDOUR::samplecnt_t, ARDOUR::samplecnt_t);
787 Gtk::MenuItem* jack_disconnect_item;
788 Gtk::MenuItem* jack_reconnect_item;
789 Gtk::Menu* jack_bufsize_menu;
791 Glib::RefPtr<Gtk::ActionGroup> common_actions;
793 void editor_realized ();
795 std::vector<std::string> positional_sync_strings;
797 void toggle_use_mmc ();
798 void toggle_send_mmc ();
799 void toggle_send_mtc ();
800 void toggle_send_midi_clock ();
802 void toggle_use_osc ();
804 void parameter_changed (std::string);
805 void session_parameter_changed (std::string);
809 void check_memory_locking ();
811 void audioengine_setup ();
813 void display_message (const char* prefix, gint prefix_len, Glib::RefPtr<Gtk::TextBuffer::Tag>, Glib::RefPtr<Gtk::TextBuffer::Tag>, const char* msg);
814 Gtk::Label status_bar_label;
815 bool status_bar_button_press (GdkEventButton*);
817 PBD::ScopedConnectionList forever_connections;
818 PBD::ScopedConnection halt_connection;
819 PBD::ScopedConnection editor_meter_connection;
821 /* these are used only in response to a platform-specific "ShouldQuit" signal */
823 void queue_finish ();
824 void fontconfig_dialog ();
826 int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
827 int ambiguous_file (std::string file, std::vector<std::string> hits);
829 bool click_button_clicked (GdkEventButton *);
830 bool sync_button_clicked (GdkEventButton *);
832 VisibilityGroup _status_bar_visibility;
834 /** A ProcessThread so that we have some thread-local buffers for use by
835 * PluginEqGui::impulse_analysis ().
837 ARDOUR::ProcessThread* _process_thread;
839 void toggle_latency_switch ();
840 void latency_switch_changed ();
841 void session_latency_updated ();
843 void feedback_detected ();
845 ArdourWidgets::ArdourButton midi_panic_button;
848 void successful_graph_sort ();
849 bool _feedback_exists;
851 enum ArdourLogLevel {
858 ArdourLogLevel _log_not_acknowledged;
860 void on_theme_changed ();
862 bool xrun_button_release (GdkEventButton* ev);
864 std::string _announce_string;
865 void check_announcements ();
867 void audioengine_became_silent ();
869 DuplicateRouteDialog* duplicate_routes_dialog;
871 void grab_focus_after_dialog ();
873 void tabs_switch (GtkNotebookPage*, guint page_number);
874 void tabs_page_added (Gtk::Widget*, guint);
875 void tabs_page_removed (Gtk::Widget*, guint);
876 ArdourWidgets::ArdourButton editor_visibility_button;
877 ArdourWidgets::ArdourButton mixer_visibility_button;
878 ArdourWidgets::ArdourButton prefs_visibility_button;
880 bool key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev, Gtkmm2ext::Bindings*);
881 bool try_gtk_accel_binding (GtkWindow* win, GdkEventKey* ev, bool translate, GdkModifierType modifier);
883 bool main_window_delete_event (GdkEventAny*);
884 bool idle_ask_about_quit ();
886 bool tabbable_visibility_button_press (GdkEventButton* ev, std::string const& tabbable_name);
888 void step_up_through_tabs ();
889 void step_down_through_tabs ();
892 void close_current_dialog ();
894 bool bind_lua_action_script (GdkEventButton*, int);
895 void update_action_script_btn (int i, const std::string&);
898 #endif /* __ardour_gui_h__ */