add initial code/stubs, actions, menu items for save as
[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 "meterbridge.h"
77 #include "ui_config.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 SessionDialog;
105 class SessionOptionEditor;
106 class ShuttleControl;
107 class Splash;
108 class TimeInfoBox;
109 class MidiTracer;
110 class NSM_Client;
111 class LevelMeterHBox;
112 class GUIObjectState;
113
114 namespace ARDOUR {
115         class ControlProtocolInfo;
116         class IO;
117         class Port;
118         class Route;
119         class RouteGroup;
120         class Location;
121         class ProcessThread;
122 }
123
124 namespace Gtkmm2ext {
125         class TearOff;
126 }
127
128 class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
129 {
130     private:
131         /* This must be the first data element because constructor ordering
132            relies on it.
133         */
134         UIConfiguration*     ui_config;
135
136     public:
137         ARDOUR_UI (int *argcp, char **argvp[], const char* localedir);
138         ~ARDOUR_UI();
139
140         bool run_startup (bool should_be_new, std::string load_template);
141
142         void show_splash ();
143         void hide_splash ();
144
145         void launch_chat ();
146         void launch_manual ();
147         void launch_reference ();
148         void launch_tracker ();
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 idle_load (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         static UIConfiguration *config () { return theArdourUI->ui_config; }
182         
183         PublicEditor&     the_editor(){return *editor;}
184         Mixer_UI* the_mixer() { return mixer; }
185
186         void new_midi_tracer_window ();
187         void toggle_editing_space();
188         void toggle_mixer_space();
189         void toggle_keep_tearoffs();
190
191         Gtk::Tooltips& tooltips() { return _tooltips; }
192
193         Gtk::HBox& editor_transport_box() { return _editor_transport_box; }
194
195         static PublicEditor* _instance;
196
197         /** Emitted frequently with the audible frame, false, and the edit point as
198          *  parameters respectively.
199          *
200          *  (either RapidScreenUpdate || SuperRapidScreenUpdate - user-config)
201          */
202         static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
203
204         static void close_all_dialogs () { CloseAllDialogs(); }
205         static sigc::signal<void> CloseAllDialogs;
206
207         XMLNode* editor_settings() const;
208         XMLNode* mixer_settings () const;
209         XMLNode* keyboard_settings () const;
210         XMLNode* tearoff_settings (const char*) const;
211
212         void save_ardour_state ();
213         gboolean configure_handler (GdkEventConfigure* conf);
214
215         void halt_on_xrun_message ();
216         void xrun_handler (framepos_t);
217         void create_xrun_marker (framepos_t);
218
219         GUIObjectState* gui_object_state;
220         
221         MainClock* primary_clock;
222         MainClock* secondary_clock;
223         void focus_on_clock ();
224         AudioClock*   big_clock;
225
226         TimeInfoBox* time_info_box;
227
228         VideoTimeLine *video_timeline;
229
230         void store_clock_modes ();
231         void restore_clock_modes ();
232         void reset_main_clocks ();
233
234         void synchronize_sync_source_and_video_pullup ();
235
236         void add_route (Gtk::Window* float_window);
237         void add_routes_part_two ();
238         void add_routes_thread ();
239
240         void add_video (Gtk::Window* float_window);
241         void remove_video ();
242         void start_video_server_menu (Gtk::Window* float_window);
243         bool start_video_server (Gtk::Window* float_window, bool popup_msg);
244         void stop_video_server (bool ask_confirm=false);
245         void flush_videotimeline_cache (bool localcacheonly=false);
246
247         void session_add_audio_track (
248                 int input_channels,
249                 int32_t output_channels,
250                 ARDOUR::TrackMode mode,
251                 ARDOUR::RouteGroup* route_group,
252                 uint32_t how_many,
253                 std::string const & name_template
254                 ) {
255
256                 session_add_audio_route (true, input_channels, output_channels, mode, route_group, how_many, name_template);
257         }
258
259         void session_add_audio_bus (int input_channels, int32_t output_channels, ARDOUR::RouteGroup* route_group,
260                                     uint32_t how_many, std::string const & name_template) {
261                 session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, route_group, how_many, name_template);
262         }
263
264         void session_add_midi_track (ARDOUR::RouteGroup* route_group, uint32_t how_many, std::string const & name_template,
265                                      ARDOUR::PluginInfoPtr instrument) {
266                 session_add_midi_route (true, route_group, how_many, name_template, instrument);
267         }
268
269         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,
270                                       ARDOUR::PluginInfoPtr instrument);
271
272         /*void session_add_midi_bus () {
273                 session_add_midi_route (false);
274         }*/
275
276         void attach_to_engine ();
277         void post_engine ();
278
279         gint exit_on_main_window_close (GdkEventAny *);
280
281         void maximise_editing_space ();
282         void restore_editing_space ();
283
284         void show_ui_prefs ();
285
286         void update_tearoff_visibility ();
287
288         void setup_profile ();
289         void setup_tooltips ();
290
291         void set_shuttle_fract (double);
292
293         void get_process_buffers ();
294         void drop_process_buffers ();
295
296         void reset_peak_display ();
297         void reset_route_peak_display (ARDOUR::Route*);
298         void reset_group_peak_display (ARDOUR::RouteGroup*);
299
300         const std::string& announce_string() const { return _announce_string; }
301
302         int disconnect_from_engine ();
303         int reconnect_to_engine ();
304
305   protected:
306         friend class PublicEditor;
307
308         void toggle_auto_play ();
309         void toggle_auto_input ();
310         void toggle_punch ();
311         void unset_dual_punch ();
312         bool ignore_dual_punch;
313         void toggle_punch_in ();
314         void toggle_punch_out ();
315         void show_loop_punch_ruler_and_disallow_hide ();
316         void reenable_hide_loop_punch_ruler_if_appropriate ();
317         void toggle_auto_return ();
318         void toggle_click ();
319         void toggle_audio_midi_setup ();
320         void toggle_session_auto_loop ();
321         void toggle_rc_options_window ();
322         void toggle_session_options_window ();
323
324   private:
325         PublicEditor*        editor;
326         Mixer_UI*            mixer;
327         Gtk::Tooltips       _tooltips;
328         NSM_Client*          nsm;
329         bool                _was_dirty;
330         bool                _mixer_on_top;
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         /* periodic safety backup, to be precise */
350         gint autosave_session();
351         void update_autosave();
352         sigc::connection _autosave_connection;
353
354         void map_transport_state ();
355         int32_t do_engine_start ();
356
357         void engine_halted (const char* reason, bool free_reason);
358         void engine_stopped ();
359         void engine_running ();
360
361         void use_config ();
362
363         void about_signal_response(int response);
364
365         Gtk::VBox     top_packer;
366
367         sigc::connection clock_signal_connection;
368         void         update_clocks ();
369         void         start_clocking ();
370         void         stop_clocking ();
371
372         bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
373
374         void update_transport_clocks (framepos_t pos);
375         void record_state_changed ();
376
377         std::list<MidiTracer*> _midi_tracer_windows;
378
379         void detach_tearoff (Gtk::Box* parent, Gtk::Widget* contents);
380         void reattach_tearoff (Gtk::Box* parent, Gtk::Widget* contents, int32_t order);
381         void reattach_all_tearoffs ();
382
383         /* Transport Control */
384
385         Gtkmm2ext::TearOff*      transport_tearoff;
386         Gtk::Frame               transport_frame;
387         Gtk::HBox                transport_tearoff_hbox;
388         Gtk::HBox               _editor_transport_box;
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
458         Gtk::VBox alert_box;
459         Gtk::VBox meter_box;
460         LevelMeterHBox * editor_meter;
461         float            editor_meter_max_peak;
462         ArdourButton     editor_meter_peak_display;
463         bool             editor_meter_peak_button_release (GdkEventButton*);
464
465         void blink_handler (bool);
466         sigc::connection blink_connection;
467
468         void solo_blink (bool);
469         void sync_blink (bool);
470         void audition_blink (bool);
471         void feedback_blink (bool);
472         
473         void set_flat_buttons();
474
475         void soloing_changed (bool);
476         void auditioning_changed (bool);
477         void _auditioning_changed (bool);
478         
479         bool solo_alert_press (GdkEventButton* ev);
480         bool audition_alert_press (GdkEventButton* ev);
481         bool feedback_alert_press (GdkEventButton *);
482
483         void big_clock_value_changed ();
484         void primary_clock_value_changed ();
485         void secondary_clock_value_changed ();
486
487         /* called by Blink signal */
488
489         void transport_rec_enable_blink (bool onoff);
490
491         Gtk::Menu*        session_popup_menu;
492
493         struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
494             RecentSessionModelColumns() {
495                     add (visible_name);
496                     add (tip);
497                     add (fullpath);
498             }
499             Gtk::TreeModelColumn<std::string> visible_name;
500             Gtk::TreeModelColumn<std::string> tip;
501             Gtk::TreeModelColumn<std::string> fullpath;
502         };
503
504         RecentSessionModelColumns    recent_session_columns;
505         Gtk::TreeView                recent_session_display;
506         Glib::RefPtr<Gtk::TreeStore> recent_session_model;
507
508         ArdourDialog*     session_selector_window;
509         Gtk::FileChooserDialog* open_session_selector;
510
511         void build_session_selector();
512         void redisplay_recent_sessions();
513         void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
514
515         struct RecentSessionsSorter {
516                 bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const {
517                     return ARDOUR::cmp_nocase(a.first, b.first) == -1;
518             }
519         };
520
521         /* menu bar and associated stuff */
522
523         Gtk::MenuBar* menu_bar;
524         Gtk::EventBox menu_bar_base;
525         Gtk::HBox     menu_hbox;
526
527         void use_menubar_as_top_menubar ();
528         void build_menu_bar ();
529
530         Gtk::Label   wall_clock_label;
531         gint update_wall_clock ();
532
533         Gtk::Label   disk_space_label;
534         void update_disk_space ();
535
536         Gtk::Label   timecode_format_label;
537         void update_timecode_format ();
538
539         Gtk::Label   cpu_load_label;
540         void update_cpu_load ();
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         void save_template ();
565
566         void edit_metadata ();
567         void import_metadata ();
568
569         void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &);
570         void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, ARDOUR::PluginInfoPtr);
571
572         void set_transport_sensitivity (bool);
573
574         //stuff for ProTools-style numpad
575         void transport_numpad_event (int num);
576         void transport_numpad_decimal ();
577         bool _numpad_locate_happening;
578         int _pending_locate_num;
579         gint transport_numpad_timeout ();
580         sigc::connection _numpad_timeout_connection;
581
582         void transport_goto_nth_marker (int nth);
583         void transport_goto_zero ();
584         void transport_goto_start ();
585         void transport_goto_end ();
586         void transport_goto_wallclock ();
587         void transport_stop ();
588         void transport_record (bool roll);
589         void transport_roll ();
590         void transport_play_selection();
591         void transport_play_preroll(); 
592         void transport_forward (int option);
593         void transport_rewind (int option);
594         void transport_loop ();
595         void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
596         bool trx_record_enable_all_tracks ();
597
598         bool _session_is_new;
599         void set_session (ARDOUR::Session *);
600         void connect_dependents_to_session (ARDOUR::Session *);
601         void we_have_dependents ();
602
603         void setup_session_options ();
604
605         guint32  last_key_press_time;
606
607         void snapshot_session (bool switch_to_it);
608         void save_session_as ();
609         void rename_session ();
610         void setup_order_hint ();
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
628         /* Windows/Dialogs that require a creator method */
629
630         WM::ProxyWithConstructor<SessionOptionEditor> session_option_editor;
631         WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
632         WM::ProxyWithConstructor<BundleManager> bundle_manager;
633         WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
634         WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
635         WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
636
637         /* creator methods */
638
639         SessionOptionEditor*    create_session_option_editor ();
640         BundleManager*          create_bundle_manager ();
641         AddVideoDialog*         create_add_video_dialog ();
642         BigClockWindow*         create_big_clock_window(); 
643         GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
644
645         ARDOUR::SystemExec *video_server_process;
646
647         void handle_locations_change (ARDOUR::Location*);
648
649         /* Keyboard Handling */
650
651         ArdourKeyboard* keyboard;
652
653         /* Keymap handling */
654
655         void install_actions ();
656
657         void toggle_record_enable (uint32_t);
658
659         uint32_t rec_enabled_streams;
660         void count_recenabled_streams (ARDOUR::Route&);
661
662         Splash* splash;
663
664         void pop_back_splash (Gtk::Window&);
665
666         /* cleanup */
667
668         Gtk::MenuItem *cleanup_item;
669
670         void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
671         void cleanup ();
672         void flush_trash ();
673
674         bool have_configure_timeout;
675         ARDOUR::microseconds_t last_configure_time;
676         gint configure_timeout ();
677
678         ARDOUR::microseconds_t last_peak_grab;
679         ARDOUR::microseconds_t last_shuttle_request;
680
681         bool have_disk_speed_dialog_displayed;
682         void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
683         void disk_overrun_handler ();
684         void disk_underrun_handler ();
685         void gui_idle_handler ();
686
687         void cancel_plugin_scan ();
688         void cancel_plugin_timeout ();
689         void plugin_scan_dialog (std::string type, std::string plugin, bool);
690         void plugin_scan_timeout (int);
691
692         void session_format_mismatch (std::string, std::string);
693
694         void session_dialog (std::string);
695         int pending_state_dialog ();
696         int sr_mismatch_dialog (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
697
698         Gtk::MenuItem* jack_disconnect_item;
699         Gtk::MenuItem* jack_reconnect_item;
700         Gtk::Menu*     jack_bufsize_menu;
701
702         Glib::RefPtr<Gtk::ActionGroup> common_actions;
703
704         void editor_realized ();
705
706         std::vector<std::string> positional_sync_strings;
707
708         void toggle_send_midi_feedback ();
709         void toggle_use_mmc ();
710         void toggle_send_mmc ();
711         void toggle_send_mtc ();
712         void toggle_send_midi_clock ();
713
714         void toggle_use_osc ();
715
716         void parameter_changed (std::string);
717         void session_parameter_changed (std::string);
718
719         bool first_idle ();
720
721         void check_memory_locking ();
722
723         bool check_audioengine();
724         void audioengine_setup ();
725
726         void display_message (const char *prefix, gint prefix_len,
727                         Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
728                         const char *msg);
729         Gtk::Label status_bar_label;
730         bool status_bar_button_press (GdkEventButton*);
731         Gtk::ToggleButton error_log_button;
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         void resize_text_widgets ();
770
771         std::string _announce_string;
772         void check_announcements ();
773
774         int do_audio_midi_setup (uint32_t);
775 };
776
777 #endif /* __ardour_gui_h__ */
778