move theme manager into preferences window
[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 show_about ();
149         void hide_about ();
150
151         void idle_load (const std::string& path);
152         void finish();
153
154         int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string());
155         bool session_loaded;
156         int build_session (const std::string& path, const std::string& snapshot, ARDOUR::BusProfile&);
157         bool session_is_new() const { return _session_is_new; }
158
159         ARDOUR::Session* the_session() { return _session; }
160
161         bool get_smart_mode () const;
162         
163         int get_session_parameters (bool quit_on_cancel, bool should_be_new = false, std::string load_template = "");
164         int  build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path);
165         bool ask_about_loading_existing_session (const std::string& session_path);
166
167         /// @return true if session was successfully unloaded.
168         int unload_session (bool hide_stuff = false);
169         void close_session();
170
171         int  save_state_canfail (std::string state_name = "", bool switch_to_it = false);
172         void save_state (const std::string & state_name = "", bool switch_to_it = false);
173
174         static ARDOUR_UI *instance () { return theArdourUI; }
175         static UIConfiguration *config () { return theArdourUI->ui_config; }
176         
177         PublicEditor&     the_editor(){return *editor;}
178         Mixer_UI* the_mixer() { return mixer; }
179
180         void new_midi_tracer_window ();
181         void toggle_editing_space();
182         void toggle_mixer_space();
183         void toggle_keep_tearoffs();
184
185         Gtk::Tooltips& tooltips() { return _tooltips; }
186
187         Gtk::HBox& editor_transport_box() { return _editor_transport_box; }
188
189         static PublicEditor* _instance;
190         static sigc::signal<void,bool> Blink;
191
192         /** point_zero_one_seconds -- 10Hz ^= 100ms */
193         static sigc::signal<void>      RapidScreenUpdate;
194
195         /** point_zero_something_seconds -- currently 25Hz ^= 40ms */
196         static sigc::signal<void>      SuperRapidScreenUpdate;
197
198         /** every_fps -- see set_fps_timeout_connection() 25Hz < x < 120Hz */
199         static sigc::signal<void>      FPSUpdate;
200
201         /** Emitted frequently with the audible frame, false, and the edit point as
202          *  parameters respectively.
203          *
204          *  (either RapidScreenUpdate || SuperRapidScreenUpdate - user-config)
205          */
206         static sigc::signal<void, framepos_t, bool, framepos_t> Clock;
207
208         static void close_all_dialogs () { CloseAllDialogs(); }
209         static sigc::signal<void> CloseAllDialogs;
210
211         XMLNode* editor_settings() const;
212         XMLNode* mixer_settings () const;
213         XMLNode* keyboard_settings () const;
214         XMLNode* tearoff_settings (const char*) const;
215
216         void save_ardour_state ();
217         gboolean configure_handler (GdkEventConfigure* conf);
218
219         void halt_on_xrun_message ();
220         void xrun_handler (framepos_t);
221         void create_xrun_marker (framepos_t);
222
223         GUIObjectState* gui_object_state;
224         
225         MainClock* primary_clock;
226         MainClock* secondary_clock;
227         void focus_on_clock ();
228         AudioClock*   big_clock;
229
230         TimeInfoBox* time_info_box;
231
232         VideoTimeLine *video_timeline;
233
234         void store_clock_modes ();
235         void restore_clock_modes ();
236         void reset_main_clocks ();
237
238         void synchronize_sync_source_and_video_pullup ();
239
240         void add_route (Gtk::Window* float_window);
241         void add_routes_part_two ();
242         void add_routes_thread ();
243
244         void add_video (Gtk::Window* float_window);
245         void remove_video ();
246         void start_video_server_menu (Gtk::Window* float_window);
247         bool start_video_server (Gtk::Window* float_window, bool popup_msg);
248         void stop_video_server (bool ask_confirm=false);
249         void flush_videotimeline_cache (bool localcacheonly=false);
250
251         void session_add_audio_track (
252                 int input_channels,
253                 int32_t output_channels,
254                 ARDOUR::TrackMode mode,
255                 ARDOUR::RouteGroup* route_group,
256                 uint32_t how_many,
257                 std::string const & name_template
258                 ) {
259
260                 session_add_audio_route (true, input_channels, output_channels, mode, route_group, how_many, name_template);
261         }
262
263         void session_add_audio_bus (int input_channels, int32_t output_channels, ARDOUR::RouteGroup* route_group,
264                                     uint32_t how_many, std::string const & name_template) {
265                 session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, route_group, how_many, name_template);
266         }
267
268         void session_add_midi_track (ARDOUR::RouteGroup* route_group, uint32_t how_many, std::string const & name_template,
269                                      ARDOUR::PluginInfoPtr instrument) {
270                 session_add_midi_route (true, route_group, how_many, name_template, instrument);
271         }
272
273         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,
274                                       ARDOUR::PluginInfoPtr instrument);
275
276         /*void session_add_midi_bus () {
277                 session_add_midi_route (false);
278         }*/
279
280         void attach_to_engine ();
281         void post_engine ();
282
283         gint exit_on_main_window_close (GdkEventAny *);
284
285         void maximise_editing_space ();
286         void restore_editing_space ();
287
288         void show_ui_prefs ();
289
290         void update_tearoff_visibility ();
291
292         void setup_profile ();
293         void setup_tooltips ();
294
295         void set_shuttle_fract (double);
296
297         void get_process_buffers ();
298         void drop_process_buffers ();
299
300         void reset_peak_display ();
301         void reset_route_peak_display (ARDOUR::Route*);
302         void reset_group_peak_display (ARDOUR::RouteGroup*);
303
304         const std::string& announce_string() const { return _announce_string; }
305
306         int disconnect_from_engine ();
307         int reconnect_to_engine ();
308
309   protected:
310         friend class PublicEditor;
311
312         void toggle_auto_play ();
313         void toggle_auto_input ();
314         void toggle_punch ();
315         void unset_dual_punch ();
316         bool ignore_dual_punch;
317         void toggle_punch_in ();
318         void toggle_punch_out ();
319         void show_loop_punch_ruler_and_disallow_hide ();
320         void reenable_hide_loop_punch_ruler_if_appropriate ();
321         void toggle_auto_return ();
322         void toggle_click ();
323         void toggle_audio_midi_setup ();
324         void toggle_session_auto_loop ();
325         void toggle_rc_options_window ();
326         void toggle_session_options_window ();
327
328   private:
329         Gtk::Tooltips       _tooltips;
330         NSM_Client*          nsm;
331         bool                _was_dirty;
332         bool                _mixer_on_top;
333         bool first_time_engine_run;
334
335         void goto_editor_window ();
336         void goto_mixer_window ();
337         void toggle_mixer_window ();
338         void toggle_meterbridge ();
339         void toggle_editor_mixer ();
340
341         int  setup_windows ();
342         void setup_transport ();
343         void setup_clock ();
344
345         static ARDOUR_UI *theArdourUI;
346
347         int starting ();
348
349         int  ask_about_saving_session (const std::vector<std::string>& actions);
350
351         /* periodic safety backup, to be precise */
352         gint autosave_session();
353         void update_autosave();
354         sigc::connection _autosave_connection;
355
356         void map_transport_state ();
357         int32_t do_engine_start ();
358
359         void engine_halted (const char* reason, bool free_reason);
360         void engine_stopped ();
361         void engine_running ();
362
363         void use_config ();
364
365         static gint _blink  (void *);
366         void blink ();
367         gint blink_timeout_tag;
368         bool blink_on;
369         void start_blinking ();
370         void stop_blinking ();
371
372         void about_signal_response(int response);
373
374         Gtk::VBox     top_packer;
375
376         sigc::connection clock_signal_connection;
377         void         update_clocks ();
378         void         start_clocking ();
379         void         stop_clocking ();
380
381         bool main_window_state_event_handler (GdkEventWindowState*, bool window_was_editor);
382
383         void update_transport_clocks (framepos_t pos);
384         void record_state_changed ();
385
386         std::list<MidiTracer*> _midi_tracer_windows;
387
388         void detach_tearoff (Gtk::Box* parent, Gtk::Widget* contents);
389         void reattach_tearoff (Gtk::Box* parent, Gtk::Widget* contents, int32_t order);
390         void reattach_all_tearoffs ();
391
392         /* Transport Control */
393
394         Gtkmm2ext::TearOff*      transport_tearoff;
395         Gtk::Frame               transport_frame;
396         Gtk::HBox                transport_tearoff_hbox;
397         Gtk::HBox               _editor_transport_box;
398         Gtk::HBox                transport_hbox;
399         Gtk::Fixed               transport_base;
400         Gtk::Fixed               transport_button_base;
401         Gtk::Frame               transport_button_frame;
402         Gtk::HBox                transport_button_hbox;
403         Gtk::VBox                transport_button_vbox;
404         Gtk::HBox                transport_option_button_hbox;
405         Gtk::VBox                transport_option_button_vbox;
406         Gtk::HBox                transport_clock_hbox;
407         Gtk::VBox                transport_clock_vbox;
408         Gtk::HBox                primary_clock_hbox;
409         Gtk::HBox                secondary_clock_hbox;
410
411         struct TransportControllable : public PBD::Controllable {
412             enum ToggleType {
413                     Roll = 0,
414                     Stop,
415                     RecordEnable,
416                     GotoStart,
417                     GotoEnd,
418                     AutoLoop,
419                     PlaySelection,
420             };
421
422             TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
423             void set_value (double);
424             double get_value (void) const;
425
426             ARDOUR_UI& ui;
427             ToggleType type;
428         };
429
430         boost::shared_ptr<TransportControllable> roll_controllable;
431         boost::shared_ptr<TransportControllable> stop_controllable;
432         boost::shared_ptr<TransportControllable> goto_start_controllable;
433         boost::shared_ptr<TransportControllable> goto_end_controllable;
434         boost::shared_ptr<TransportControllable> auto_loop_controllable;
435         boost::shared_ptr<TransportControllable> play_selection_controllable;
436         boost::shared_ptr<TransportControllable> rec_controllable;
437
438         void toggle_follow_edits ();
439
440         void set_transport_controllable_state (const XMLNode&);
441         XMLNode& get_transport_controllable_state ();
442
443         ArdourButton roll_button;
444         ArdourButton stop_button;
445         ArdourButton goto_start_button;
446         ArdourButton goto_end_button;
447         ArdourButton auto_loop_button;
448         ArdourButton play_selection_button;
449         ArdourButton rec_button;
450
451         void toggle_external_sync ();
452         void toggle_time_master ();
453         void toggle_video_sync ();
454
455         ShuttleControl* shuttle_box;
456
457         ArdourButton auto_return_button;
458         ArdourButton follow_edits_button;
459         ArdourButton auto_input_button;
460         ArdourButton click_button;
461         ArdourButton sync_button;
462
463         ArdourButton auditioning_alert_button;
464         ArdourButton solo_alert_button;
465         ArdourButton feedback_alert_button;
466
467         Gtk::VBox alert_box;
468         Gtk::VBox meter_box;
469         LevelMeterHBox * editor_meter;
470         float            editor_meter_max_peak;
471         ArdourButton     editor_meter_peak_display;
472         bool             editor_meter_peak_button_release (GdkEventButton*);
473
474         void solo_blink (bool);
475         void sync_blink (bool);
476         void audition_blink (bool);
477         void feedback_blink (bool);
478         
479         void set_flat_buttons();
480
481         void soloing_changed (bool);
482         void auditioning_changed (bool);
483         void _auditioning_changed (bool);
484         
485         bool solo_alert_press (GdkEventButton* ev);
486         bool audition_alert_press (GdkEventButton* ev);
487         bool feedback_alert_press (GdkEventButton *);
488
489         void big_clock_value_changed ();
490         void primary_clock_value_changed ();
491         void secondary_clock_value_changed ();
492
493         /* called by Blink signal */
494
495         void transport_rec_enable_blink (bool onoff);
496
497         Gtk::Menu*        session_popup_menu;
498
499         struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
500             RecentSessionModelColumns() {
501                     add (visible_name);
502                     add (tip);
503                     add (fullpath);
504             }
505             Gtk::TreeModelColumn<std::string> visible_name;
506             Gtk::TreeModelColumn<std::string> tip;
507             Gtk::TreeModelColumn<std::string> fullpath;
508         };
509
510         RecentSessionModelColumns    recent_session_columns;
511         Gtk::TreeView                recent_session_display;
512         Glib::RefPtr<Gtk::TreeStore> recent_session_model;
513
514         ArdourDialog*     session_selector_window;
515         Gtk::FileChooserDialog* open_session_selector;
516
517         void build_session_selector();
518         void redisplay_recent_sessions();
519         void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
520
521         struct RecentSessionsSorter {
522                 bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const {
523                     return ARDOUR::cmp_nocase(a.first, b.first) == -1;
524             }
525         };
526
527         /* menu bar and associated stuff */
528
529         Gtk::MenuBar* menu_bar;
530         Gtk::EventBox menu_bar_base;
531         Gtk::HBox     menu_hbox;
532
533         void use_menubar_as_top_menubar ();
534         void build_menu_bar ();
535
536         Gtk::Label   wall_clock_label;
537         gint update_wall_clock ();
538
539         Gtk::Label   disk_space_label;
540         void update_disk_space ();
541
542         Gtk::Label   timecode_format_label;
543         void update_timecode_format ();
544
545         Gtk::Label   cpu_load_label;
546         void update_cpu_load ();
547
548         Gtk::Label   buffer_load_label;
549         void update_buffer_load ();
550
551         Gtk::Label   sample_rate_label;
552         void update_sample_rate (ARDOUR::framecnt_t);
553
554         Gtk::Label    format_label;
555         void update_format ();
556         
557         gint every_second ();
558         gint every_point_one_seconds ();
559         gint every_point_zero_something_seconds ();
560         gint every_fps ();
561
562         sigc::connection second_connection;
563         sigc::connection point_one_second_connection;
564         sigc::connection point_zero_something_second_connection;
565         sigc::connection fps_connection;
566
567         void set_fps_timeout_connection ();
568
569         void open_session ();
570         void open_recent_session ();
571         void save_template ();
572
573         void edit_metadata ();
574         void import_metadata ();
575
576         void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &);
577         void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, ARDOUR::PluginInfoPtr);
578
579         void set_transport_sensitivity (bool);
580
581         //stuff for ProTools-style numpad
582         void transport_numpad_event (int num);
583         void transport_numpad_decimal ();
584         bool _numpad_locate_happening;
585         int _pending_locate_num;
586         gint transport_numpad_timeout ();
587         sigc::connection _numpad_timeout_connection;
588
589         void transport_goto_nth_marker (int nth);
590         void transport_goto_zero ();
591         void transport_goto_start ();
592         void transport_goto_end ();
593         void transport_goto_wallclock ();
594         void transport_stop ();
595         void transport_record (bool roll);
596         void transport_roll ();
597         void transport_play_selection();
598         void transport_play_preroll(); 
599         void transport_forward (int option);
600         void transport_rewind (int option);
601         void transport_loop ();
602         void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
603         bool trx_record_enable_all_tracks ();
604
605         bool _session_is_new;
606         void set_session (ARDOUR::Session *);
607         void connect_dependents_to_session (ARDOUR::Session *);
608         void we_have_dependents ();
609
610         void setup_session_options ();
611
612         guint32  last_key_press_time;
613
614         void snapshot_session (bool switch_to_it);
615         void rename_session ();
616         void setup_order_hint ();
617
618         Mixer_UI   *mixer;
619         int         create_mixer ();
620
621         PublicEditor     *editor;
622         int         create_editor ();
623
624         Meterbridge  *meterbridge;
625         int         create_meterbridge ();
626         /* Dialogs that can be created via new<T> */
627
628         WM::Proxy<SpeakerDialog> speaker_config_window;
629         WM::Proxy<KeyEditor> key_editor;
630         WM::Proxy<RCOptionEditor> rc_option_editor;
631         WM::Proxy<AddRouteDialog> add_route_dialog;
632         WM::Proxy<About> about;
633         WM::Proxy<LocationUIWindow> location_ui;
634         WM::Proxy<RouteParams_UI> route_params;
635         WM::Proxy<EngineControl> audio_midi_setup;
636
637         /* Windows/Dialogs that require a creator method */
638
639         WM::ProxyWithConstructor<SessionOptionEditor> session_option_editor;
640         WM::ProxyWithConstructor<AddVideoDialog> add_video_dialog;
641         WM::ProxyWithConstructor<BundleManager> bundle_manager;
642         WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
643         WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
644         WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
645
646         /* creator methods */
647
648         SessionOptionEditor*    create_session_option_editor ();
649         BundleManager*          create_bundle_manager ();
650         AddVideoDialog*         create_add_video_dialog ();
651         BigClockWindow*         create_big_clock_window(); 
652         GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
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