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