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