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