initial/partial implementation of duplicate track/bus
[ardour.git] / gtk2_ardour / ardour_ui.h
1 /*
2     Copyright (C) 1999-2002 Paul Davis
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #ifndef __ardour_gui_h__
21 #define __ardour_gui_h__
22
23 #include <time.h>
24
25 /* need _BSD_SOURCE to get timersub macros */
26
27 #ifdef _BSD_SOURCE
28 #include <sys/time.h>
29 #else
30 #define _BSD_SOURCE
31 #include <sys/time.h>
32 #undef _BSD_SOURCE
33 #endif
34
35 #include <list>
36 #include <cmath>
37
38
39 #include "pbd/xml++.h"
40 #include "pbd/controllable.h"
41 #include <gtkmm/box.h>
42 #include <gtkmm/frame.h>
43 #include <gtkmm/label.h>
44 #include <gtkmm/table.h>
45 #include <gtkmm/fixed.h>
46 #include <gtkmm/drawingarea.h>
47 #include <gtkmm/eventbox.h>
48 #include <gtkmm/menu.h>
49 #include <gtkmm/menuitem.h>
50 #include <gtkmm/button.h>
51 #include <gtkmm/togglebutton.h>
52 #include <gtkmm/treeview.h>
53 #include <gtkmm/menubar.h>
54 #include <gtkmm/textbuffer.h>
55 #include <gtkmm/adjustment.h>
56 #include <gtkmm2ext/gtk_ui.h>
57 #include <gtkmm2ext/click_box.h>
58 #include <gtkmm2ext/stateful_button.h>
59 #include <gtkmm2ext/bindable_button.h>
60
61 #include "ardour/ardour.h"
62 #include "ardour/types.h"
63 #include "ardour/utils.h"
64 #include "ardour/plugin.h"
65 #include "ardour/session_handle.h"
66 #include "ardour/system_exec.h"
67
68 #include "video_timeline.h"
69
70 #include "add_route_dialog.h"
71 #include "ardour_button.h"
72 #include "ardour_dialog.h"
73 #include "ardour_window.h"
74 #include "editing.h"
75 #include "enums.h"
76 #include "visibility_group.h"
77 #include "window_manager.h"
78
79 #ifdef COMPILER_MSVC
80 #include "about.h"
81 #include "add_video_dialog.h"
82 #include "big_clock_window.h"
83 #include "bundle_manager.h"
84 #include "engine_dialog.h"
85 #include "export_video_dialog.h"
86 #include "global_port_matrix.h"
87 #include "keyeditor.h"
88 #include "location_ui.h"
89 #include "rc_option_editor.h"
90 #include "route_params_ui.h"
91 #include "session_option_editor.h"
92 #include "speaker_dialog.h"
93 #else
94 class About;
95 class AddRouteDialog;
96 class AddVideoDialog;
97 class BigClockWindow;
98 class BundleManager;
99 class EngineControl;
100 class ExportVideoDialog;
101 class KeyEditor;
102 class LocationUIWindow;
103 class RCOptionEditor;
104 class RouteParams_UI;
105 class SessionOptionEditor;
106 class SpeakerDialog;
107 class GlobalPortMatrixWindow;
108 #endif
109
110 class VideoTimeLine;
111 class ArdourKeyboard;
112 class AudioClock;
113 class ButtonJoiner;
114 class ConnectionEditor;
115 class MainClock;
116 class Mixer_UI;
117 class ArdourPrompter;
118 class PublicEditor;
119 class SaveAsDialog;
120 class SessionDialog;
121 class SessionOptionEditor;
122 class ShuttleControl;
123 class Splash;
124 class TimeInfoBox;
125 class Meterbridge;
126 class MidiTracer;
127 class NSM_Client;
128 class LevelMeterHBox;
129 class GUIObjectState;
130
131 namespace ARDOUR {
132         class ControlProtocolInfo;
133         class IO;
134         class Port;
135         class Route;
136         class RouteGroup;
137         class Location;
138         class ProcessThread;
139 }
140
141 namespace Gtkmm2ext {
142         class TearOff;
143 }
144
145 namespace Gtk {
146         class ProgressBar;
147 }
148
149 class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
150 {
151     public:
152         ARDOUR_UI (int *argcp, char **argvp[], const char* localedir);
153         ~ARDOUR_UI();
154
155         bool run_startup (bool should_be_new, std::string load_template);
156
157         void show_splash ();
158         void hide_splash ();
159
160         void launch_chat ();
161         void launch_manual ();
162         void launch_reference ();
163         void launch_tracker ();
164         void launch_subscribe ();
165         void launch_cheat_sheet ();
166         void launch_website ();
167         void launch_website_dev ();
168         void launch_forums ();
169         void launch_howto_report ();
170         void show_about ();
171         void hide_about ();
172
173         void load_from_application_api (const std::string& path);
174         void finish();
175
176         int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
177         bool session_loaded;
178         int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile&);
179         bool session_is_new() const { return _session_is_new; }
180
181         ARDOUR::Session* the_session() { return _session; }
182
183         bool get_smart_mode () const;
184
185         int get_session_parameters (bool quit_on_cancel, bool should_be_new = false, std::string load_template = "");
186         int  build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path);
187         bool ask_about_loading_existing_session (const std::string& session_path);
188
189         /// @return true if session was successfully unloaded.
190         int unload_session (bool hide_stuff = false);
191         void close_session();
192
193         int  save_state_canfail (std::string state_name = "", bool switch_to_it = false);
194         void save_state (const std::string & state_name = "", bool switch_to_it = false);
195
196         static ARDOUR_UI *instance () { return theArdourUI; }
197
198         PublicEditor&     the_editor() { return *editor;}
199         Mixer_UI* the_mixer() { return mixer; }
200
201         void new_midi_tracer_window ();
202         void toggle_editing_space();
203         void toggle_mixer_space();
204         void toggle_keep_tearoffs();
205
206         static PublicEditor* _instance;
207
208         /** Emitted frequently with the audible frame, false, and the edit point as
209          *  parameters respectively.
210          *
211          *  (either RapidScreenUpdate || SuperRapidScreenUpdate - user-config)
212          */
213         static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
214
215         static void close_all_dialogs () { CloseAllDialogs(); }
216         static sigc::signal<void> CloseAllDialogs;
217
218         XMLNode* editor_settings() const;
219         XMLNode* mixer_settings () const;
220         XMLNode* keyboard_settings () const;
221         XMLNode* tearoff_settings (const char*) const;
222
223         void save_ardour_state ();
224         gboolean configure_handler (GdkEventConfigure* conf);
225
226         void halt_on_xrun_message ();
227         void xrun_handler (framepos_t);
228         void create_xrun_marker (framepos_t);
229
230         GUIObjectState* gui_object_state;
231
232         MainClock* primary_clock;
233         MainClock* secondary_clock;
234         void focus_on_clock ();
235         AudioClock*   big_clock;
236
237         TimeInfoBox* time_info_box;
238
239         VideoTimeLine *video_timeline;
240
241         void store_clock_modes ();
242         void restore_clock_modes ();
243         void reset_main_clocks ();
244
245         void synchronize_sync_source_and_video_pullup ();
246
247         void add_route (Gtk::Window* float_window);
248         void add_routes_part_two ();
249         void add_routes_thread ();
250
251         void duplicate_routes ();
252
253         void add_video (Gtk::Window* float_window);
254         void remove_video ();
255         void start_video_server_menu (Gtk::Window* float_window);
256         bool start_video_server (Gtk::Window* float_window, bool popup_msg);
257         void stop_video_server (bool ask_confirm=false);
258         void flush_videotimeline_cache (bool localcacheonly=false);
259         void export_video (bool range = false);
260
261         void session_add_audio_track (
262                 int input_channels,
263                 int32_t output_channels,
264                 ARDOUR::TrackMode mode,
265                 ARDOUR::RouteGroup* route_group,
266                 uint32_t how_many,
267                 std::string const & name_template
268                 ) {
269
270                 session_add_audio_route (true, input_channels, output_channels, mode, route_group, how_many, name_template);
271         }
272
273         void session_add_audio_bus (int input_channels, int32_t output_channels, ARDOUR::RouteGroup* route_group,
274                                     uint32_t how_many, std::string const & name_template) {
275                 session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, route_group, how_many, name_template);
276         }
277
278         void session_add_midi_track (ARDOUR::RouteGroup* route_group, uint32_t how_many, std::string const & name_template,
279                                      ARDOUR::PluginInfoPtr instrument) {
280                 session_add_midi_route (true, route_group, how_many, name_template, instrument);
281         }
282
283         void session_add_mixed_track (const ARDOUR::ChanCount& input, const ARDOUR::ChanCount& output, ARDOUR::RouteGroup* route_group, uint32_t how_many, std::string const & name_template,
284                                       ARDOUR::PluginInfoPtr instrument);
285
286         /*void session_add_midi_bus () {
287                 session_add_midi_route (false);
288         }*/
289
290         void attach_to_engine ();
291         void post_engine ();
292
293         gint exit_on_main_window_close (GdkEventAny *);
294
295         void maximise_editing_space ();
296         void restore_editing_space ();
297
298         void show_ui_prefs ();
299
300         bool check_audioengine(Gtk::Window&);
301
302         void update_tearoff_visibility ();
303
304         void setup_profile ();
305         void setup_tooltips ();
306
307         void set_shuttle_fract (double);
308
309         void get_process_buffers ();
310         void drop_process_buffers ();
311
312         void reset_peak_display ();
313         void reset_route_peak_display (ARDOUR::Route*);
314         void reset_group_peak_display (ARDOUR::RouteGroup*);
315
316         const std::string& announce_string() const { return _announce_string; }
317
318         void hide_application ();
319
320   protected:
321         friend class PublicEditor;
322
323         void toggle_auto_play ();
324         void toggle_auto_input ();
325         void toggle_punch ();
326         void unset_dual_punch ();
327         bool ignore_dual_punch;
328         void toggle_punch_in ();
329         void toggle_punch_out ();
330         void show_loop_punch_ruler_and_disallow_hide ();
331         void reenable_hide_loop_punch_ruler_if_appropriate ();
332         void toggle_auto_return ();
333         void toggle_click ();
334         void toggle_audio_midi_setup ();
335         void toggle_session_auto_loop ();
336         void toggle_rc_options_window ();
337         void toggle_session_options_window ();
338
339   private:
340         PublicEditor*        editor;
341         Mixer_UI*            mixer;
342         NSM_Client*          nsm;
343         bool                _was_dirty;
344         bool                _mixer_on_top;
345         bool                _initial_verbose_plugin_scan;
346         bool first_time_engine_run;
347
348         void goto_editor_window ();
349         void goto_mixer_window ();
350         void toggle_mixer_window ();
351         void toggle_meterbridge ();
352         void toggle_editor_mixer ();
353
354         int  setup_windows ();
355         void setup_transport ();
356         void setup_clock ();
357
358         static ARDOUR_UI *theArdourUI;
359
360         int starting ();
361
362         int  ask_about_saving_session (const std::vector<std::string>& actions);
363
364         void save_session_at_its_request (std::string);
365         /* periodic safety backup, to be precise */
366         gint autosave_session();
367         void update_autosave();
368         sigc::connection _autosave_connection;
369
370         void map_transport_state ();
371         int32_t do_engine_start ();
372
373         void engine_halted (const char* reason, bool free_reason);
374         void engine_stopped ();
375         void engine_running ();
376
377         void use_config ();
378
379         void about_signal_response(int response);
380
381         Gtk::VBox     top_packer;
382
383         sigc::connection clock_signal_connection;
384         void         update_clocks ();
385         void         start_clocking ();
386         void         stop_clocking ();
387
388         bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
389
390         void update_transport_clocks (framepos_t pos);
391         void record_state_changed ();
392
393         std::list<MidiTracer*> _midi_tracer_windows;
394
395         void detach_tearoff (Gtk::Box* parent, Gtk::Widget* contents);
396         void reattach_tearoff (Gtk::Box* parent, Gtk::Widget* contents, int32_t order);
397         void reattach_all_tearoffs ();
398
399         /* Transport Control */
400
401         Gtkmm2ext::TearOff*      transport_tearoff;
402         Gtk::Frame               transport_frame;
403         Gtk::HBox                transport_tearoff_hbox;
404         Gtk::HBox                transport_hbox;
405         Gtk::Fixed               transport_base;
406         Gtk::Fixed               transport_button_base;
407         Gtk::Frame               transport_button_frame;
408         Gtk::HBox                transport_button_hbox;
409         Gtk::VBox                transport_button_vbox;
410         Gtk::HBox                transport_option_button_hbox;
411         Gtk::VBox                transport_option_button_vbox;
412         Gtk::HBox                transport_clock_hbox;
413         Gtk::VBox                transport_clock_vbox;
414         Gtk::HBox                primary_clock_hbox;
415         Gtk::HBox                secondary_clock_hbox;
416
417         struct TransportControllable : public PBD::Controllable {
418             enum ToggleType {
419                     Roll = 0,
420                     Stop,
421                     RecordEnable,
422                     GotoStart,
423                     GotoEnd,
424                     AutoLoop,
425                     PlaySelection,
426             };
427
428             TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
429             void set_value (double);
430             double get_value (void) const;
431
432             ARDOUR_UI& ui;
433             ToggleType type;
434         };
435
436         boost::shared_ptr<TransportControllable> roll_controllable;
437         boost::shared_ptr<TransportControllable> stop_controllable;
438         boost::shared_ptr<TransportControllable> goto_start_controllable;
439         boost::shared_ptr<TransportControllable> goto_end_controllable;
440         boost::shared_ptr<TransportControllable> auto_loop_controllable;
441         boost::shared_ptr<TransportControllable> play_selection_controllable;
442         boost::shared_ptr<TransportControllable> rec_controllable;
443
444         void toggle_follow_edits ();
445
446         void set_transport_controllable_state (const XMLNode&);
447         XMLNode& get_transport_controllable_state ();
448
449         ArdourButton roll_button;
450         ArdourButton stop_button;
451         ArdourButton goto_start_button;
452         ArdourButton goto_end_button;
453         ArdourButton auto_loop_button;
454         ArdourButton play_selection_button;
455         ArdourButton rec_button;
456
457         void toggle_external_sync ();
458         void toggle_time_master ();
459         void toggle_video_sync ();
460
461         ShuttleControl* shuttle_box;
462
463         ArdourButton auto_return_button;
464         ArdourButton follow_edits_button;
465         ArdourButton auto_input_button;
466         ArdourButton click_button;
467         ArdourButton sync_button;
468
469         ArdourButton auditioning_alert_button;
470         ArdourButton solo_alert_button;
471         ArdourButton feedback_alert_button;
472         ArdourButton error_alert_button;
473
474         Gtk::VBox alert_box;
475         Gtk::VBox meter_box;
476         LevelMeterHBox * editor_meter;
477         float            editor_meter_max_peak;
478         ArdourButton     editor_meter_peak_display;
479         bool             editor_meter_peak_button_release (GdkEventButton*);
480
481         void blink_handler (bool);
482         sigc::connection blink_connection;
483
484         void cancel_solo ();
485         void solo_blink (bool);
486         void sync_blink (bool);
487         void audition_blink (bool);
488         void feedback_blink (bool);
489         void error_blink (bool);
490
491         void set_flat_buttons();
492
493         void soloing_changed (bool);
494         void auditioning_changed (bool);
495         void _auditioning_changed (bool);
496
497         bool solo_alert_press (GdkEventButton* ev);
498         bool audition_alert_press (GdkEventButton* ev);
499         bool feedback_alert_press (GdkEventButton *);
500         bool error_alert_press (GdkEventButton *);
501
502         void big_clock_value_changed ();
503         void primary_clock_value_changed ();
504         void secondary_clock_value_changed ();
505
506         /* called by Blink signal */
507
508         void transport_rec_enable_blink (bool onoff);
509
510         Gtk::Menu*        session_popup_menu;
511
512         /* menu bar and associated stuff */
513
514         Gtk::MenuBar* menu_bar;
515         Gtk::EventBox menu_bar_base;
516         Gtk::HBox     menu_hbox;
517
518         void use_menubar_as_top_menubar ();
519         void build_menu_bar ();
520
521         Gtk::Label   wall_clock_label;
522         gint update_wall_clock ();
523
524         Gtk::Label   disk_space_label;
525         void update_disk_space ();
526
527         Gtk::Label   timecode_format_label;
528         void update_timecode_format ();
529
530         Gtk::Label   cpu_load_label;
531         void update_cpu_load ();
532
533         Gtk::Label   xrun_label;
534         void update_xrun_count ();
535
536         Gtk::Label   peak_thread_work_label;
537         void update_peak_thread_work ();
538
539         Gtk::Label   buffer_load_label;
540         void update_buffer_load ();
541
542         Gtk::Label   sample_rate_label;
543         void update_sample_rate (ARDOUR::framecnt_t);
544
545         Gtk::Label    format_label;
546         void update_format ();
547
548         void every_second ();
549         void every_point_one_seconds ();
550         void every_point_zero_something_seconds ();
551
552         sigc::connection second_connection;
553         sigc::connection point_one_second_connection;
554         sigc::connection point_zero_something_second_connection;
555         sigc::connection fps_connection;
556
557         void set_fps_timeout_connection ();
558
559         void open_session ();
560         void open_recent_session ();
561         bool process_save_template_prompter (ArdourPrompter& prompter);
562         void save_template ();
563
564         void edit_metadata ();
565         void import_metadata ();
566
567         void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &);
568         void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, ARDOUR::PluginInfoPtr);
569
570         void set_transport_sensitivity (bool);
571
572         //stuff for ProTools-style numpad
573         void transport_numpad_event (int num);
574         void transport_numpad_decimal ();
575         bool _numpad_locate_happening;
576         int _pending_locate_num;
577         gint transport_numpad_timeout ();
578         sigc::connection _numpad_timeout_connection;
579
580         void transport_goto_nth_marker (int nth);
581         void transport_goto_zero ();
582         void transport_goto_start ();
583         void transport_goto_end ();
584         void transport_goto_wallclock ();
585         void transport_stop ();
586         void transport_record (bool roll);
587         void transport_roll ();
588         void transport_play_selection();
589         void transport_play_preroll();
590         void transport_forward (int option);
591         void transport_rewind (int option);
592         void transport_loop ();
593         void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
594         bool trx_record_enable_all_tracks ();
595
596         bool _session_is_new;
597         void set_session (ARDOUR::Session *);
598         void connect_dependents_to_session (ARDOUR::Session *);
599         void we_have_dependents ();
600
601         void setup_session_options ();
602
603         guint32  last_key_press_time;
604
605         bool process_snapshot_session_prompter (ArdourPrompter& prompter, bool switch_to_it);
606         void snapshot_session (bool switch_to_it);
607
608         SaveAsDialog* save_as_dialog;
609
610         bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
611         void save_session_as ();
612         void rename_session ();
613         void setup_order_hint (AddRouteDialog::InsertAt);
614
615         int         create_mixer ();
616         int         create_editor ();
617
618         Meterbridge  *meterbridge;
619         int         create_meterbridge ();
620         /* Dialogs that can be created via new<T> */
621
622         WM::Proxy<SpeakerDialog> speaker_config_window;
623         WM::Proxy<KeyEditor> key_editor;
624         WM::Proxy<RCOptionEditor> rc_option_editor;
625         WM::Proxy<AddRouteDialog> add_route_dialog;
626         WM::Proxy<About> about;
627         WM::Proxy<LocationUIWindow> location_ui;
628         WM::Proxy<RouteParams_UI> route_params;
629         WM::Proxy<EngineControl> audio_midi_setup;
630         WM::Proxy<ExportVideoDialog> export_video_dialog;
631
632         /* Windows/Dialogs that require a creator method */
633
634         WM::ProxyWithConstructor<SessionOptionEditor> session_option_editor;
635         WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
636         WM::ProxyWithConstructor<BundleManager> bundle_manager;
637         WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
638         WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
639         WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
640
641         /* creator methods */
642
643         SessionOptionEditor*    create_session_option_editor ();
644         BundleManager*          create_bundle_manager ();
645         AddVideoDialog*         create_add_video_dialog ();
646         BigClockWindow*         create_big_clock_window();
647         GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
648
649         ARDOUR::SystemExec *video_server_process;
650
651         void handle_locations_change (ARDOUR::Location*);
652
653         /* Keyboard Handling */
654
655         ArdourKeyboard* keyboard;
656
657         /* Keymap handling */
658
659         void install_actions ();
660
661         void toggle_record_enable (uint32_t);
662
663         uint32_t rec_enabled_streams;
664         void count_recenabled_streams (ARDOUR::Route&);
665
666         Splash* splash;
667
668         void pop_back_splash (Gtk::Window&);
669
670         /* cleanup */
671
672         Gtk::MenuItem *cleanup_item;
673
674         void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
675         void cleanup ();
676         void cleanup_peakfiles ();
677         void flush_trash ();
678
679         bool have_configure_timeout;
680         ARDOUR::microseconds_t last_configure_time;
681         gint configure_timeout ();
682
683         ARDOUR::microseconds_t last_peak_grab;
684         ARDOUR::microseconds_t last_shuttle_request;
685
686         bool have_disk_speed_dialog_displayed;
687         void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
688         void disk_overrun_handler ();
689         void disk_underrun_handler ();
690         void gui_idle_handler ();
691
692         void cancel_plugin_scan ();
693         void cancel_plugin_timeout ();
694         void plugin_scan_dialog (std::string type, std::string plugin, bool);
695         void plugin_scan_timeout (int);
696
697         void session_format_mismatch (std::string, std::string);
698
699         void session_dialog (std::string);
700         int pending_state_dialog ();
701         int sr_mismatch_dialog (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
702
703         Gtk::MenuItem* jack_disconnect_item;
704         Gtk::MenuItem* jack_reconnect_item;
705         Gtk::Menu*     jack_bufsize_menu;
706
707         Glib::RefPtr<Gtk::ActionGroup> common_actions;
708
709         void editor_realized ();
710
711         std::vector<std::string> positional_sync_strings;
712
713         void toggle_send_midi_feedback ();
714         void toggle_use_mmc ();
715         void toggle_send_mmc ();
716         void toggle_send_mtc ();
717         void toggle_send_midi_clock ();
718
719         void toggle_use_osc ();
720
721         void parameter_changed (std::string);
722         void session_parameter_changed (std::string);
723
724         bool first_idle ();
725
726         void check_memory_locking ();
727
728         void audioengine_setup ();
729
730         void display_message (const char *prefix, gint prefix_len,
731                         Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
732                         const char *msg);
733         Gtk::Label status_bar_label;
734         bool status_bar_button_press (GdkEventButton*);
735
736         void loading_message (const std::string& msg);
737
738         PBD::ScopedConnectionList forever_connections;
739         PBD::ScopedConnection halt_connection;
740
741         void step_edit_status_change (bool);
742
743         void platform_specific ();
744         void platform_setup ();
745
746         /* these are used only in response to a platform-specific "ShouldQuit" signal
747          */
748         bool idle_finish ();
749         void queue_finish ();
750         void fontconfig_dialog ();
751
752         int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
753         int ambiguous_file (std::string file, std::vector<std::string> hits);
754
755         bool click_button_clicked (GdkEventButton *);
756
757         VisibilityGroup _status_bar_visibility;
758
759         /** A ProcessThread so that we have some thread-local buffers for use by
760          *  PluginEqGui::impulse_analysis ().
761          */
762         ARDOUR::ProcessThread* _process_thread;
763
764         void feedback_detected ();
765
766         ArdourButton             midi_panic_button;
767         void                     midi_panic ();
768
769         void successful_graph_sort ();
770         bool _feedback_exists;
771
772         enum ArdourLogLevel {
773                 LogLevelNone = 0,
774                 LogLevelInfo,
775                 LogLevelWarning,
776                 LogLevelError
777         };
778
779         ArdourLogLevel _log_not_acknowledged;
780
781         void resize_text_widgets ();
782
783         bool xrun_button_release (GdkEventButton* ev);
784
785         std::string _announce_string;
786         void check_announcements ();
787
788         int do_audio_midi_setup (uint32_t);
789         void audioengine_became_silent ();
790 };
791
792 #endif /* __ardour_gui_h__ */