* added Menu for sending midi clock
[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 /* need _BSD_SOURCE to get timersub macros */
24
25 #ifdef _BSD_SOURCE
26 #include <sys/time.h>
27 #else
28 #define _BSD_SOURCE
29 #include <sys/time.h>
30 #undef _BSD_SOURCE
31 #endif
32
33 #include <list>
34
35 #include <cmath>
36
37 #include <libgnomecanvasmm/canvas.h>
38
39 #include <pbd/xml++.h>
40 #include <gtkmm/box.h>
41 #include <gtkmm/frame.h>
42 #include <gtkmm/label.h>
43 #include <gtkmm/table.h>
44 #include <gtkmm/fixed.h>
45 #include <gtkmm/drawingarea.h>
46 #include <gtkmm/eventbox.h>
47 #include <gtkmm/menu.h>
48 #include <gtkmm/menuitem.h>
49 #include <gtkmm/button.h>
50 #include <gtkmm/togglebutton.h>
51 #include <gtkmm/treeview.h>
52 #include <gtkmm/menubar.h>
53 #include <gtkmm/textbuffer.h>
54 #include <gtkmm/adjustment.h>
55 #include <gtkmm2ext/gtk_ui.h>
56 #include <gtkmm2ext/click_box.h>
57 #include <gtkmm2ext/stateful_button.h>
58 #include <gtkmm2ext/bindable_button.h>
59 #include <ardour/ardour.h>
60 #include <ardour/session.h>
61 #include <ardour/configuration.h>
62 #include <ardour/types.h>
63
64 #include "audio_clock.h"
65 #include "ardour_dialog.h"
66 #include "editing.h"
67 #include "ui_config.h"
68
69 class AudioClock;
70 class PublicEditor;
71 class Keyboard;
72 class OptionEditor;
73 class KeyEditor;
74 class Mixer_UI;
75 class ConnectionEditor;
76 class RouteParams_UI;
77 class About;
78 class Splash;
79 class AddRouteDialog;
80 class NewSessionDialog;
81 class LocationUI;
82 class ThemeManager;
83 class BundleManager;
84
85 namespace Gtkmm2ext {
86         class TearOff;
87 }
88
89 namespace ARDOUR {
90         class AudioEngine;
91         class Route;
92         class Port;
93         class IO;
94         class ControlProtocolInfo;
95 }
96
97 namespace ALSA {
98         class MultiChannelDevice;
99 }
100
101 #define FRAME_NAME "BaseFrame"
102
103 extern sigc::signal<void>  ColorsChanged;
104 extern sigc::signal<void>  DPIReset;
105
106 class ARDOUR_UI : public Gtkmm2ext::UI
107 {
108   public:
109         ARDOUR_UI (int *argcp, char **argvp[]);
110         ~ARDOUR_UI();
111
112         void show ();
113         bool shown() { return shown_flag; }
114
115         void show_splash ();
116         void hide_splash ();
117
118         void show_about ();
119         void hide_about ();
120
121         void idle_load (const Glib::ustring& path);
122         int load_session (const Glib::ustring& path, const Glib::ustring& snapshot, Glib::ustring mix_template = Glib::ustring());
123         bool session_loaded;
124         int build_session (const Glib::ustring& path, const Glib::ustring& snapshot,
125                            uint32_t ctl_chns,
126                            uint32_t master_chns,
127                            ARDOUR::AutoConnectOption input_connect,
128                            ARDOUR::AutoConnectOption output_connect,
129                            uint32_t nphysin,
130                            uint32_t nphysout,
131                            nframes_t initial_length);
132         bool session_is_new() const { return _session_is_new; }
133
134         ARDOUR::Session* the_session() { return session; }
135
136         bool will_create_new_session_automatically() const {
137                 return _will_create_new_session_automatically;
138         }
139
140         void set_will_create_new_session_automatically (bool yn) {
141                 _will_create_new_session_automatically = yn;
142         }
143
144         bool get_session_parameters (bool have_engine = false, bool should_be_new = false);
145         void parse_cmdline_path (const Glib::ustring& cmdline_path, Glib::ustring& session_name, Glib::ustring& session_path, bool& existing_session);
146         int  load_cmdline_session (const Glib::ustring& session_name, const Glib::ustring& session_path, bool& existing_session);
147         int  build_session_from_nsd (const Glib::ustring& session_name, const Glib::ustring& session_path);
148         bool ask_about_loading_existing_session (const Glib::ustring& session_path);
149
150         /// @return true if session was successfully unloaded.
151         int unload_session (bool hide_stuff = false);
152         void close_session();
153
154         int  save_state_canfail (string state_name = "");
155         void save_state (const string & state_name = "");
156
157         static double gain_to_slider_position (ARDOUR::gain_t g);
158         static ARDOUR::gain_t slider_position_to_gain (double pos);
159
160         static ARDOUR_UI *instance () { return theArdourUI; }
161         static UIConfiguration *config () { return ui_config; }
162
163         PublicEditor&     the_editor(){return *editor;}
164         Mixer_UI* the_mixer() { return mixer; }
165
166         ARDOUR::AudioEngine& the_engine() const { return *engine; }
167
168         void toggle_key_editor ();
169         void toggle_location_window ();
170         void toggle_theme_manager ();
171         void toggle_bundle_manager ();
172         void toggle_big_clock_window ();
173         void toggle_connection_editor ();
174         void toggle_route_params_window ();
175         void toggle_editing_space();
176
177         Gtk::Tooltips& tooltips() { return _tooltips; }
178
179         static sigc::signal<void,bool> Blink;
180         static sigc::signal<void>      RapidScreenUpdate;
181         static sigc::signal<void>      SuperRapidScreenUpdate;
182         static sigc::signal<void,nframes_t, bool, nframes_t> Clock;
183
184         void name_io_setup (ARDOUR::AudioEngine&, string&, ARDOUR::IO& io, bool in);
185
186         static gint hide_and_quit (GdkEventAny *ev, ArdourDialog *);
187
188         XMLNode* editor_settings() const;
189         XMLNode* mixer_settings () const;
190         XMLNode* keyboard_settings () const;
191
192         void save_ardour_state ();
193         gboolean configure_handler (GdkEventConfigure* conf);
194
195         void do_transport_locate (nframes_t position);
196         void halt_on_xrun_message ();
197         void xrun_handler (nframes_t);
198         void create_xrun_marker (nframes_t);
199
200         AudioClock primary_clock;
201         AudioClock secondary_clock;
202         AudioClock preroll_clock;
203         AudioClock postroll_clock;
204
205         void store_clock_modes ();
206         void restore_clock_modes ();
207
208         void add_route (Gtk::Window* float_window);
209
210         void session_add_audio_track (int input_channels, int32_t output_channels, ARDOUR::TrackMode mode, uint32_t how_many) {
211                 session_add_audio_route (true, input_channels, output_channels, mode, how_many);
212         }
213
214         void session_add_audio_bus (int input_channels, int32_t output_channels, uint32_t how_many) {
215                 session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, how_many);
216         }
217
218         void session_add_midi_track (uint32_t how_many) {
219                 session_add_midi_route (true, how_many);
220         }
221
222         /*void session_add_midi_bus () {
223                 session_add_midi_route (false);
224         }*/
225
226         int  create_engine ();
227         void post_engine ();
228
229         gint exit_on_main_window_close (GdkEventAny *);
230
231         void maximise_editing_space ();
232         void restore_editing_space ();
233
234         void set_native_file_header_format (ARDOUR::HeaderFormat sf);
235         void set_native_file_data_format (ARDOUR::SampleFormat sf);
236
237         void setup_profile ();
238         void setup_theme ();
239
240         void set_shuttle_fract (double);
241
242   protected:
243         friend class PublicEditor;
244
245         void toggle_clocking ();
246         void toggle_auto_play ();
247         void toggle_auto_input ();
248         void toggle_punch ();
249         void unset_dual_punch ();
250         bool ignore_dual_punch;
251         void toggle_punch_in ();
252         void toggle_punch_out ();
253         void toggle_auto_return ();
254         void toggle_click ();
255
256         void toggle_session_auto_loop ();
257
258         void toggle_options_window ();
259
260   private:
261         struct GlobalClickBox : public Gtk::VBox {
262             Gtkmm2ext::ClickBox  *box;
263             Gtk::Frame      frame;
264             Gtk::Label      label;
265             vector<string> &strings;
266             Gtk::Adjustment adjustment;
267
268             static void printer (char buf[32], Gtk::Adjustment &adj, void *arg);
269
270             GlobalClickBox (const string &str, vector<string> &vs)
271                     : strings (vs),
272                       adjustment (0, 0, vs.size() - 1, 1, 1, 0) {
273                     box = new Gtkmm2ext::ClickBox (&adjustment, "ClickButton");
274                     label.set_text (str);
275                     label.set_name ("GlobalButtonLabel");
276                     frame.add (*box);
277                     frame.set_shadow_type (Gtk::SHADOW_IN);
278                     pack_start (label);
279                     pack_start (frame);
280                     box->set_print_func (printer, this);
281                     box->set_wrap (true);
282             };
283         };
284
285         ARDOUR::AudioEngine                 *engine;
286         ARDOUR::Session                     *session;
287
288         Gtk::Tooltips          _tooltips;
289
290         void                     goto_editor_window ();
291         void                     goto_mixer_window ();
292
293         Gtk::Table               adjuster_table;
294         Gtk::Frame               adjuster_frame;
295         Gtk::Fixed               adjuster_base;
296
297         GlobalClickBox     *online_control_button;
298         vector<string>      online_control_strings;
299
300         GlobalClickBox    *crossfade_time_button;
301         vector<string>     crossfade_time_strings;
302
303         Gtk::ToggleButton   preroll_button;
304         Gtk::ToggleButton   postroll_button;
305
306         int  setup_windows ();
307         void setup_transport ();
308         void setup_clock ();
309
310         static ARDOUR_UI *theArdourUI;
311
312         void backend_audio_error (bool we_set_params, Gtk::Window* toplevel = 0);
313         void startup ();
314         void shutdown ();
315
316         void finish();
317         int  ask_about_saving_session (const string & why);
318
319         /* periodic safety backup, to be precise */
320         gint autosave_session();
321         void update_autosave();
322         sigc::connection _autosave_connection;
323
324         void queue_transport_change ();
325         void map_transport_state ();
326         int32_t do_engine_start ();
327
328         void engine_halted ();
329         void engine_stopped ();
330         void engine_running ();
331
332         void use_config ();
333
334         static gint _blink  (void *);
335         void blink ();
336         gint blink_timeout_tag;
337         bool blink_on;
338         void start_blinking ();
339         void stop_blinking ();
340
341         void about_signal_response(int response);
342
343   private:
344         Gtk::VBox     top_packer;
345
346         sigc::connection clock_signal_connection;
347         void         update_clocks ();
348         void         start_clocking ();
349         void         stop_clocking ();
350
351         void manage_window (Gtk::Window&);
352
353         AudioClock   big_clock;
354         Gtk::Window* big_clock_window;
355
356         void float_big_clock (Gtk::Window* parent);
357         bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
358
359         void update_transport_clocks (nframes_t pos);
360         void record_state_changed ();
361
362         /* Transport Control */
363
364         void detach_tearoff (Gtk::Box* parent, Gtk::Widget* contents);
365         void reattach_tearoff (Gtk::Box* parent, Gtk::Widget* contents, int32_t order);
366
367         Gtkmm2ext::TearOff*      transport_tearoff;
368         Gtk::Frame               transport_frame;
369         Gtk::HBox                transport_tearoff_hbox;
370         Gtk::HBox                transport_hbox;
371         Gtk::Fixed               transport_base;
372         Gtk::Fixed               transport_button_base;
373         Gtk::Frame               transport_button_frame;
374         Gtk::HBox                transport_button_hbox;
375         Gtk::VBox                transport_button_vbox;
376         Gtk::HBox                transport_option_button_hbox;
377         Gtk::VBox                transport_option_button_vbox;
378         Gtk::HBox                transport_clock_hbox;
379         Gtk::VBox                transport_clock_vbox;
380         Gtk::HBox                primary_clock_hbox;
381         Gtk::HBox                secondary_clock_hbox;
382
383
384         struct TransportControllable : public PBD::Controllable {
385             enum ToggleType {
386                     Roll = 0,
387                     Stop,
388                     RecordEnable,
389                     GotoStart,
390                     GotoEnd,
391                     AutoLoop,
392                     PlaySelection,
393                     ShuttleControl
394
395             };
396
397             TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
398             void set_value (float);
399             float get_value (void) const;
400
401             void set_id (const std::string&);
402
403             ARDOUR_UI& ui;
404             ToggleType type;
405         };
406
407         boost::shared_ptr<TransportControllable> roll_controllable;
408         boost::shared_ptr<TransportControllable> stop_controllable;
409         boost::shared_ptr<TransportControllable> goto_start_controllable;
410         boost::shared_ptr<TransportControllable> goto_end_controllable;
411         boost::shared_ptr<TransportControllable> auto_loop_controllable;
412         boost::shared_ptr<TransportControllable> play_selection_controllable;
413         boost::shared_ptr<TransportControllable> rec_controllable;
414         boost::shared_ptr<TransportControllable> shuttle_controllable;
415         BindingProxy shuttle_controller_binding_proxy;
416
417         void set_transport_controllable_state (const XMLNode&);
418         XMLNode& get_transport_controllable_state ();
419
420         BindableButton roll_button;
421         BindableButton stop_button;
422         BindableButton goto_start_button;
423         BindableButton goto_end_button;
424         BindableButton auto_loop_button;
425         BindableButton play_selection_button;
426         BindableButton rec_button;
427
428         Gtk::ComboBoxText sync_option_combo;
429
430         void sync_option_changed ();
431         void toggle_time_master ();
432         void toggle_video_sync ();
433
434         Gtk::DrawingArea  shuttle_box;
435         Gtk::EventBox     speed_display_box;
436         Gtk::Label        speed_display_label;
437         Gtk::Button       shuttle_units_button;
438         Gtk::ComboBoxText shuttle_style_button;
439         Gtk::Menu*        shuttle_unit_menu;
440         Gtk::Menu*        shuttle_style_menu;
441         float             shuttle_max_speed;
442         Gtk::Menu*        shuttle_context_menu;
443
444         void build_shuttle_context_menu ();
445         void show_shuttle_context_menu ();
446         void shuttle_style_changed();
447         void shuttle_unit_clicked ();
448         void set_shuttle_max_speed (float);
449         void update_speed_display ();
450         float last_speed_displayed;
451
452         gint shuttle_box_button_press (GdkEventButton*);
453         gint shuttle_box_button_release (GdkEventButton*);
454         gint shuttle_box_scroll (GdkEventScroll*);
455         gint shuttle_box_motion (GdkEventMotion*);
456         gint shuttle_box_expose (GdkEventExpose*);
457         gint mouse_shuttle (double x, bool force);
458         void use_shuttle_fract (bool force);
459
460         bool   shuttle_grabbed;
461         double shuttle_fract;
462
463         Gtkmm2ext::StatefulToggleButton punch_in_button;
464         Gtkmm2ext::StatefulToggleButton punch_out_button;
465         Gtkmm2ext::StatefulToggleButton auto_return_button;
466         Gtkmm2ext::StatefulToggleButton auto_play_button;
467         Gtkmm2ext::StatefulToggleButton auto_input_button;
468         Gtkmm2ext::StatefulToggleButton click_button;
469         Gtkmm2ext::StatefulToggleButton time_master_button;
470
471         Gtk::ToggleButton auditioning_alert_button;
472         Gtk::ToggleButton solo_alert_button;
473
474         Gtk::VBox alert_box;
475
476         void solo_blink (bool);
477         void audition_blink (bool);
478
479         void soloing_changed (bool);
480         void auditioning_changed (bool);
481         void _auditioning_changed (bool);
482
483         void solo_alert_toggle ();
484         void audition_alert_toggle ();
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         struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
497             RecentSessionModelColumns() {
498                     add (visible_name);
499                     add (fullpath);
500             }
501             Gtk::TreeModelColumn<Glib::ustring> visible_name;
502             Gtk::TreeModelColumn<Glib::ustring> fullpath;
503         };
504
505         RecentSessionModelColumns    recent_session_columns;
506         Gtk::TreeView                recent_session_display;
507         Glib::RefPtr<Gtk::TreeStore> recent_session_model;
508
509         ArdourDialog*     session_selector_window;
510         Gtk::FileChooserDialog* open_session_selector;
511
512         void build_session_selector();
513         void redisplay_recent_sessions();
514         void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
515
516         struct RecentSessionsSorter {
517             bool operator() (std::pair<string,string> a, std::pair<string,string> b) const {
518                     return cmp_nocase(a.first, b.first) == -1;
519             }
520         };
521
522         /* menu bar and associated stuff */
523
524         Gtk::MenuBar* menu_bar;
525         Gtk::EventBox menu_bar_base;
526         Gtk::HBox     menu_hbox;
527
528         void use_menubar_as_top_menubar ();
529         void build_menu_bar ();
530         void build_control_surface_menu ();
531
532         Gtk::Label   wall_clock_label;
533         Gtk::EventBox wall_clock_box;
534         gint update_wall_clock ();
535
536         Gtk::Label   disk_space_label;
537         Gtk::EventBox disk_space_box;
538         void update_disk_space ();
539
540         Gtk::Label   cpu_load_label;
541         Gtk::EventBox cpu_load_box;
542         void update_cpu_load ();
543
544         Gtk::Label   buffer_load_label;
545         Gtk::EventBox buffer_load_box;
546         void update_buffer_load ();
547
548         Gtk::Label   sample_rate_label;
549         Gtk::EventBox sample_rate_box;
550         void update_sample_rate (nframes_t);
551
552         gint every_second ();
553         gint every_point_one_seconds ();
554         gint every_point_zero_one_seconds ();
555
556         sigc::connection second_connection;
557         sigc::connection point_one_second_connection;
558         sigc::connection point_oh_five_second_connection;
559         sigc::connection point_zero_one_second_connection;
560
561         gint session_menu (GdkEventButton *);
562
563         bool _will_create_new_session_automatically;
564
565         NewSessionDialog* new_session_dialog;
566
567         void open_session ();
568         void open_recent_session ();
569         void save_template ();
570         
571         void edit_metadata ();
572         void import_metadata ();
573
574         void session_add_audio_route (bool disk, int32_t input_channels, int32_t output_channels, ARDOUR::TrackMode mode, uint32_t how_many);
575         void session_add_midi_route (bool disk, uint32_t how_many);
576
577         void set_transport_sensitivity (bool);
578
579         void remove_last_capture ();
580
581         void transport_goto_zero ();
582         void transport_goto_start ();
583         void transport_goto_end ();
584         void transport_goto_wallclock ();
585         void transport_stop ();
586         void transport_stop_and_forget_capture ();
587         void transport_record (bool roll);
588         void transport_roll ();
589         void transport_play_selection();
590         void transport_forward (int option);
591         void transport_rewind (int option);
592         void transport_loop ();
593
594         void transport_rolling ();
595         void transport_rewinding ();
596         void transport_forwarding ();
597         void transport_stopped ();
598
599         bool _session_is_new;
600         void connect_to_session (ARDOUR::Session *);
601         void connect_dependents_to_session (ARDOUR::Session *);
602         void we_have_dependents ();
603
604         void setup_session_options ();
605
606         guint32  last_key_press_time;
607
608         void snapshot_session ();
609
610         Mixer_UI   *mixer;
611         int         create_mixer ();
612
613         PublicEditor     *editor;
614         int         create_editor ();
615
616         RouteParams_UI *route_params;
617         int             create_route_params ();
618
619         BundleManager *bundle_manager;
620         void create_bundle_manager ();
621
622         ConnectionEditor *connection_editor;
623         int               create_connection_editor ();
624
625         LocationUI *location_ui;
626         int         create_location_ui ();
627         void        handle_locations_change (ARDOUR::Location*);
628
629         static UIConfiguration *ui_config;
630         ThemeManager *theme_manager;
631
632         /* Key bindings editor */
633
634         KeyEditor *key_editor;
635
636         /* Options window */
637
638         OptionEditor *option_editor;
639
640         /* route dialog */
641
642         AddRouteDialog *add_route_dialog;
643
644         /* Keyboard Handling */
645
646         Keyboard* keyboard;
647
648         /* Keymap handling */
649
650         void install_actions ();
651
652         void toggle_record_enable (uint32_t);
653
654         uint32_t rec_enabled_streams;
655         void count_recenabled_streams (ARDOUR::Route&);
656
657         About* about;
658         Splash* splash;
659         void pop_back_splash ();
660         bool shown_flag;
661
662         /* cleanup */
663
664         Gtk::MenuItem *cleanup_item;
665
666         void display_cleanup_results (ARDOUR::Session::cleanup_report& rep, const gchar* list_title, const string & msg);
667         void cleanup ();
668         void flush_trash ();
669
670         bool have_configure_timeout;
671         ARDOUR::microseconds_t last_configure_time;
672         gint configure_timeout ();
673
674         ARDOUR::microseconds_t last_peak_grab;
675         ARDOUR::microseconds_t last_shuttle_request;
676
677         bool have_disk_speed_dialog_displayed;
678         void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
679         void disk_overrun_handler ();
680         void disk_underrun_handler ();
681
682         void session_dialog (std::string);
683         int pending_state_dialog ();
684         int sr_mismatch_dialog (nframes_t, nframes_t);
685
686         void disconnect_from_jack ();
687         void reconnect_to_jack ();
688         void set_jack_buffer_size (nframes_t);
689
690         Gtk::MenuItem* jack_disconnect_item;
691         Gtk::MenuItem* jack_reconnect_item;
692         Gtk::Menu*     jack_bufsize_menu;
693
694         Glib::RefPtr<Gtk::ActionGroup> common_actions;
695
696         void editor_realized ();
697
698         std::vector<std::string> positional_sync_strings;
699
700         void toggle_send_midi_feedback ();
701         void toggle_use_mmc ();
702         void toggle_send_mmc ();
703         void toggle_send_mtc ();
704         void toggle_send_midi_clock ();
705
706         void toggle_use_osc ();
707
708         void toggle_denormal_protection ();
709
710         void set_input_auto_connect (ARDOUR::AutoConnectOption);
711         void set_output_auto_connect (ARDOUR::AutoConnectOption);
712         void set_solo_model (ARDOUR::SoloModel);
713         void set_monitor_model (ARDOUR::MonitorModel);
714         void set_remote_model (ARDOUR::RemoteModel);
715         void set_denormal_model (ARDOUR::DenormalModel);
716
717         void toggle_sync_order_keys ();
718         void toggle_StopPluginsWithTransport();
719         void toggle_DoNotRunPluginsWhileRecording();
720         void toggle_VerifyRemoveLastCapture();
721         void toggle_PeriodicSafetyBackups();
722         void toggle_StopRecordingOnXrun();
723         void toggle_CreateXrunMarker();
724         void toggle_StopTransportAtEndOfSession();
725         void toggle_GainReduceFastTransport();
726         void toggle_LatchedSolo();
727         void toggle_ShowSoloMutes();
728         void toggle_LatchedRecordEnable ();
729         void toggle_RegionEquivalentsOverlap ();
730         void toggle_PrimaryClockDeltaEditCursor ();
731         void toggle_SecondaryClockDeltaEditCursor ();
732         void toggle_ShowTrackMeters ();
733         void toggle_only_copy_imported_files ();
734         void toggle_use_narrow_ms();
735         void toggle_NameNewMarkers ();
736         void toggle_rubberbanding_snaps_to_grid ();
737         void toggle_auto_analyse_audio ();
738         void toggle_TapeMachineMode();
739
740         void mtc_port_changed ();
741         void map_solo_model ();
742         void map_monitor_model ();
743         void map_denormal_model ();
744         void map_denormal_protection ();
745         void map_remote_model ();
746         void map_file_header_format ();
747         void map_file_data_format ();
748         void map_input_auto_connect ();
749         void map_output_auto_connect ();
750         void map_only_copy_imported_files ();
751         void parameter_changed (const char*);
752
753         void set_meter_hold (ARDOUR::MeterHold);
754         void set_meter_falloff (ARDOUR::MeterFalloff);
755         void map_meter_hold ();
756         void map_meter_falloff ();
757
758         void toggle_control_protocol (ARDOUR::ControlProtocolInfo*);
759         void toggle_control_protocol_feedback (ARDOUR::ControlProtocolInfo*, const char* group_name, std::string action_name);
760
761         bool first_idle ();
762
763         void no_memory_warning ();
764         void check_memory_locking ();
765
766         bool check_audioengine();
767         void audioengine_setup ();
768
769         void display_message (const char *prefix, gint prefix_len,
770                               Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag, const char *msg);
771         Gtk::Label status_bar_label;
772         Gtk::ToggleButton error_log_button;
773
774         void loading_message (const std::string& msg);
775         void end_loading_messages ();
776
777         void platform_specific ();
778         void platform_setup ();
779         void fontconfig_dialog ();
780 };
781
782 #endif /* __ardour_gui_h__ */
783