expand help menu with various useful entries.
[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         static sigc::signal<void,bool> Blink;
197
198         /** point_zero_one_seconds -- 10Hz ^= 100ms */
199         static sigc::signal<void>      RapidScreenUpdate;
200
201         /** point_zero_something_seconds -- currently 25Hz ^= 40ms */
202         static sigc::signal<void>      SuperRapidScreenUpdate;
203
204         /** every_fps -- see set_fps_timeout_connection() 25Hz < x < 120Hz */
205         static sigc::signal<void>      FPSUpdate;
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
257         void session_add_audio_track (
258                 int input_channels,
259                 int32_t output_channels,
260                 ARDOUR::TrackMode mode,
261                 ARDOUR::RouteGroup* route_group,
262                 uint32_t how_many,
263                 std::string const & name_template
264                 ) {
265
266                 session_add_audio_route (true, input_channels, output_channels, mode, route_group, how_many, name_template);
267         }
268
269         void session_add_audio_bus (int input_channels, int32_t output_channels, ARDOUR::RouteGroup* route_group,
270                                     uint32_t how_many, std::string const & name_template) {
271                 session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, route_group, how_many, name_template);
272         }
273
274         void session_add_midi_track (ARDOUR::RouteGroup* route_group, uint32_t how_many, std::string const & name_template,
275                                      ARDOUR::PluginInfoPtr instrument) {
276                 session_add_midi_route (true, route_group, how_many, name_template, instrument);
277         }
278
279         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,
280                                       ARDOUR::PluginInfoPtr instrument);
281
282         /*void session_add_midi_bus () {
283                 session_add_midi_route (false);
284         }*/
285
286         void attach_to_engine ();
287         void post_engine ();
288
289         gint exit_on_main_window_close (GdkEventAny *);
290
291         void maximise_editing_space ();
292         void restore_editing_space ();
293
294         void show_ui_prefs ();
295
296         void update_tearoff_visibility ();
297
298         void setup_profile ();
299         void setup_tooltips ();
300
301         void set_shuttle_fract (double);
302
303         void get_process_buffers ();
304         void drop_process_buffers ();
305
306         void reset_peak_display ();
307         void reset_route_peak_display (ARDOUR::Route*);
308         void reset_group_peak_display (ARDOUR::RouteGroup*);
309
310         const std::string& announce_string() const { return _announce_string; }
311
312         int disconnect_from_engine ();
313         int reconnect_to_engine ();
314
315   protected:
316         friend class PublicEditor;
317
318         void toggle_auto_play ();
319         void toggle_auto_input ();
320         void toggle_punch ();
321         void unset_dual_punch ();
322         bool ignore_dual_punch;
323         void toggle_punch_in ();
324         void toggle_punch_out ();
325         void show_loop_punch_ruler_and_disallow_hide ();
326         void reenable_hide_loop_punch_ruler_if_appropriate ();
327         void toggle_auto_return ();
328         void toggle_click ();
329         void toggle_audio_midi_setup ();
330         void toggle_session_auto_loop ();
331         void toggle_rc_options_window ();
332         void toggle_session_options_window ();
333
334   private:
335         Gtk::Tooltips       _tooltips;
336         NSM_Client*          nsm;
337         bool                _was_dirty;
338         bool                _mixer_on_top;
339         bool first_time_engine_run;
340
341         void goto_editor_window ();
342         void goto_mixer_window ();
343         void toggle_mixer_window ();
344         void toggle_meterbridge ();
345         void toggle_editor_mixer ();
346
347         int  setup_windows ();
348         void setup_transport ();
349         void setup_clock ();
350
351         static ARDOUR_UI *theArdourUI;
352
353         int starting ();
354
355         int  ask_about_saving_session (const std::vector<std::string>& actions);
356
357         /* periodic safety backup, to be precise */
358         gint autosave_session();
359         void update_autosave();
360         sigc::connection _autosave_connection;
361
362         void map_transport_state ();
363         int32_t do_engine_start ();
364
365         void engine_halted (const char* reason, bool free_reason);
366         void engine_stopped ();
367         void engine_running ();
368
369         void use_config ();
370
371         static gint _blink  (void *);
372         void blink ();
373         gint blink_timeout_tag;
374         bool blink_on;
375         void start_blinking ();
376         void stop_blinking ();
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               _editor_transport_box;
404         Gtk::HBox                transport_hbox;
405         Gtk::Fixed               transport_base;
406         Gtk::Fixed               transport_button_base;
407         Gtk::Frame               transport_button_frame;
408         Gtk::HBox                transport_button_hbox;
409         Gtk::VBox                transport_button_vbox;
410         Gtk::HBox                transport_option_button_hbox;
411         Gtk::VBox                transport_option_button_vbox;
412         Gtk::HBox                transport_clock_hbox;
413         Gtk::VBox                transport_clock_vbox;
414         Gtk::HBox                primary_clock_hbox;
415         Gtk::HBox                secondary_clock_hbox;
416
417         struct TransportControllable : public PBD::Controllable {
418             enum ToggleType {
419                     Roll = 0,
420                     Stop,
421                     RecordEnable,
422                     GotoStart,
423                     GotoEnd,
424                     AutoLoop,
425                     PlaySelection,
426             };
427
428             TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
429             void set_value (double);
430             double get_value (void) const;
431
432             ARDOUR_UI& ui;
433             ToggleType type;
434         };
435
436         boost::shared_ptr<TransportControllable> roll_controllable;
437         boost::shared_ptr<TransportControllable> stop_controllable;
438         boost::shared_ptr<TransportControllable> goto_start_controllable;
439         boost::shared_ptr<TransportControllable> goto_end_controllable;
440         boost::shared_ptr<TransportControllable> auto_loop_controllable;
441         boost::shared_ptr<TransportControllable> play_selection_controllable;
442         boost::shared_ptr<TransportControllable> rec_controllable;
443
444         void toggle_follow_edits ();
445
446         void set_transport_controllable_state (const XMLNode&);
447         XMLNode& get_transport_controllable_state ();
448
449         ArdourButton roll_button;
450         ArdourButton stop_button;
451         ArdourButton goto_start_button;
452         ArdourButton goto_end_button;
453         ArdourButton auto_loop_button;
454         ArdourButton play_selection_button;
455         ArdourButton rec_button;
456
457         void toggle_external_sync ();
458         void toggle_time_master ();
459         void toggle_video_sync ();
460
461         ShuttleControl* shuttle_box;
462
463         ArdourButton auto_return_button;
464         ArdourButton follow_edits_button;
465         ArdourButton auto_input_button;
466         ArdourButton click_button;
467         ArdourButton sync_button;
468
469         ArdourButton auditioning_alert_button;
470         ArdourButton solo_alert_button;
471         ArdourButton feedback_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 solo_blink (bool);
481         void sync_blink (bool);
482         void audition_blink (bool);
483         void feedback_blink (bool);
484         
485         void set_flat_buttons();
486
487         void soloing_changed (bool);
488         void auditioning_changed (bool);
489         void _auditioning_changed (bool);
490         
491         bool solo_alert_press (GdkEventButton* ev);
492         bool audition_alert_press (GdkEventButton* ev);
493         bool feedback_alert_press (GdkEventButton *);
494
495         void big_clock_value_changed ();
496         void primary_clock_value_changed ();
497         void secondary_clock_value_changed ();
498
499         /* called by Blink signal */
500
501         void transport_rec_enable_blink (bool onoff);
502
503         Gtk::Menu*        session_popup_menu;
504
505         struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
506             RecentSessionModelColumns() {
507                     add (visible_name);
508                     add (tip);
509                     add (fullpath);
510             }
511             Gtk::TreeModelColumn<std::string> visible_name;
512             Gtk::TreeModelColumn<std::string> tip;
513             Gtk::TreeModelColumn<std::string> fullpath;
514         };
515
516         RecentSessionModelColumns    recent_session_columns;
517         Gtk::TreeView                recent_session_display;
518         Glib::RefPtr<Gtk::TreeStore> recent_session_model;
519
520         ArdourDialog*     session_selector_window;
521         Gtk::FileChooserDialog* open_session_selector;
522
523         void build_session_selector();
524         void redisplay_recent_sessions();
525         void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
526
527         struct RecentSessionsSorter {
528                 bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const {
529                     return ARDOUR::cmp_nocase(a.first, b.first) == -1;
530             }
531         };
532
533         /* menu bar and associated stuff */
534
535         Gtk::MenuBar* menu_bar;
536         Gtk::EventBox menu_bar_base;
537         Gtk::HBox     menu_hbox;
538
539         void use_menubar_as_top_menubar ();
540         void build_menu_bar ();
541
542         Gtk::Label   wall_clock_label;
543         gint update_wall_clock ();
544
545         Gtk::Label   disk_space_label;
546         void update_disk_space ();
547
548         Gtk::Label   timecode_format_label;
549         void update_timecode_format ();
550
551         Gtk::Label   cpu_load_label;
552         void update_cpu_load ();
553
554         Gtk::Label   buffer_load_label;
555         void update_buffer_load ();
556
557         Gtk::Label   sample_rate_label;
558         void update_sample_rate (ARDOUR::framecnt_t);
559
560         Gtk::Label    format_label;
561         void update_format ();
562         
563         gint every_second ();
564         gint every_point_one_seconds ();
565         gint every_point_zero_something_seconds ();
566         gint every_fps ();
567
568         sigc::connection second_connection;
569         sigc::connection point_one_second_connection;
570         sigc::connection point_zero_something_second_connection;
571         sigc::connection fps_connection;
572
573         void set_fps_timeout_connection ();
574
575         void open_session ();
576         void open_recent_session ();
577         void save_template ();
578
579         void edit_metadata ();
580         void import_metadata ();
581
582         void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &);
583         void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, ARDOUR::PluginInfoPtr);
584
585         void set_transport_sensitivity (bool);
586
587         //stuff for ProTools-style numpad
588         void transport_numpad_event (int num);
589         void transport_numpad_decimal ();
590         bool _numpad_locate_happening;
591         int _pending_locate_num;
592         gint transport_numpad_timeout ();
593         sigc::connection _numpad_timeout_connection;
594
595         void transport_goto_nth_marker (int nth);
596         void transport_goto_zero ();
597         void transport_goto_start ();
598         void transport_goto_end ();
599         void transport_goto_wallclock ();
600         void transport_stop ();
601         void transport_record (bool roll);
602         void transport_roll ();
603         void transport_play_selection();
604         void transport_play_preroll(); 
605         void transport_forward (int option);
606         void transport_rewind (int option);
607         void transport_loop ();
608         void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
609         bool trx_record_enable_all_tracks ();
610
611         bool _session_is_new;
612         void set_session (ARDOUR::Session *);
613         void connect_dependents_to_session (ARDOUR::Session *);
614         void we_have_dependents ();
615
616         void setup_session_options ();
617
618         guint32  last_key_press_time;
619
620         void snapshot_session (bool switch_to_it);
621         void rename_session ();
622         void setup_order_hint ();
623
624         Mixer_UI   *mixer;
625         int         create_mixer ();
626
627         PublicEditor     *editor;
628         int         create_editor ();
629
630         Meterbridge  *meterbridge;
631         int         create_meterbridge ();
632         /* Dialogs that can be created via new<T> */
633
634         WM::Proxy<SpeakerDialog> speaker_config_window;
635         WM::Proxy<KeyEditor> key_editor;
636         WM::Proxy<RCOptionEditor> rc_option_editor;
637         WM::Proxy<AddRouteDialog> add_route_dialog;
638         WM::Proxy<About> about;
639         WM::Proxy<LocationUIWindow> location_ui;
640         WM::Proxy<RouteParams_UI> route_params;
641         WM::Proxy<EngineControl> audio_midi_setup;
642
643         /* Windows/Dialogs that require a creator method */
644
645         WM::ProxyWithConstructor<SessionOptionEditor> session_option_editor;
646         WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
647         WM::ProxyWithConstructor<BundleManager> bundle_manager;
648         WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
649         WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
650         WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
651
652         /* creator methods */
653
654         SessionOptionEditor*    create_session_option_editor ();
655         BundleManager*          create_bundle_manager ();
656         AddVideoDialog*         create_add_video_dialog ();
657         BigClockWindow*         create_big_clock_window(); 
658         GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
659
660         ARDOUR::SystemExec *video_server_process;
661
662         void handle_locations_change (ARDOUR::Location*);
663
664         /* Keyboard Handling */
665
666         ArdourKeyboard* keyboard;
667
668         /* Keymap handling */
669
670         void install_actions ();
671
672         void toggle_record_enable (uint32_t);
673
674         uint32_t rec_enabled_streams;
675         void count_recenabled_streams (ARDOUR::Route&);
676
677         Splash* splash;
678
679         void pop_back_splash (Gtk::Window&);
680
681         /* cleanup */
682
683         Gtk::MenuItem *cleanup_item;
684
685         void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
686         void cleanup ();
687         void flush_trash ();
688
689         bool have_configure_timeout;
690         ARDOUR::microseconds_t last_configure_time;
691         gint configure_timeout ();
692
693         ARDOUR::microseconds_t last_peak_grab;
694         ARDOUR::microseconds_t last_shuttle_request;
695
696         bool have_disk_speed_dialog_displayed;
697         void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
698         void disk_overrun_handler ();
699         void disk_underrun_handler ();
700         void gui_idle_handler ();
701
702         void cancel_plugin_scan ();
703         void cancel_plugin_timeout ();
704         void plugin_scan_dialog (std::string type, std::string plugin, bool);
705         void plugin_scan_timeout (int);
706
707         void session_format_mismatch (std::string, std::string);
708
709         void session_dialog (std::string);
710         int pending_state_dialog ();
711         int sr_mismatch_dialog (ARDOUR::framecnt_t, ARDOUR::framecnt_t);
712
713         Gtk::MenuItem* jack_disconnect_item;
714         Gtk::MenuItem* jack_reconnect_item;
715         Gtk::Menu*     jack_bufsize_menu;
716
717         Glib::RefPtr<Gtk::ActionGroup> common_actions;
718
719         void editor_realized ();
720
721         std::vector<std::string> positional_sync_strings;
722
723         void toggle_send_midi_feedback ();
724         void toggle_use_mmc ();
725         void toggle_send_mmc ();
726         void toggle_send_mtc ();
727         void toggle_send_midi_clock ();
728
729         void toggle_use_osc ();
730
731         void parameter_changed (std::string);
732         void session_parameter_changed (std::string);
733
734         bool first_idle ();
735
736         void check_memory_locking ();
737
738         bool check_audioengine();
739         void audioengine_setup ();
740
741         void display_message (const char *prefix, gint prefix_len,
742                         Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag,
743                         const char *msg);
744         Gtk::Label status_bar_label;
745         bool status_bar_button_press (GdkEventButton*);
746         Gtk::ToggleButton error_log_button;
747
748         void loading_message (const std::string& msg);
749
750         PBD::ScopedConnectionList forever_connections;
751         PBD::ScopedConnection halt_connection; 
752
753         void step_edit_status_change (bool);
754
755         void platform_specific ();
756         void platform_setup ();
757
758         /* these are used only in response to a platform-specific "ShouldQuit" signal
759          */
760         bool idle_finish ();
761         void queue_finish ();
762         void fontconfig_dialog ();
763
764         int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
765         int ambiguous_file (std::string file, std::vector<std::string> hits);
766
767         bool click_button_clicked (GdkEventButton *);
768
769         VisibilityGroup _status_bar_visibility;
770
771         /** A ProcessThread so that we have some thread-local buffers for use by
772          *  PluginEqGui::impulse_analysis ().
773          */
774         ARDOUR::ProcessThread* _process_thread;
775
776         void feedback_detected ();
777
778         ArdourButton             midi_panic_button;
779         void                     midi_panic ();
780
781         void successful_graph_sort ();
782         bool _feedback_exists;
783
784         void resize_text_widgets ();
785
786         std::string _announce_string;
787         void check_announcements ();
788
789         int do_audio_midi_setup (uint32_t);
790 };
791
792 #endif /* __ardour_gui_h__ */
793