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