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