Add parent window argument to ARDOUR_UI::check_audioengine
[ardour.git] / gtk2_ardour / ardour_ui.h
index 9a3e7e945b9e7bb98b146da692b10eae0da1620e..4f572157b1de33cfb27e2df317abc5cd8ecf47d7 100644 (file)
 
 #include "video_timeline.h"
 
-#include "about.h"
+#include "add_route_dialog.h"
 #include "ardour_button.h"
 #include "ardour_dialog.h"
 #include "ardour_window.h"
 #include "editing.h"
-#include "engine_dialog.h"
-#include "export_video_dialog.h"
-#include "meterbridge.h"
-#include "ui_config.h"
 #include "enums.h"
 #include "visibility_group.h"
 #include "window_manager.h"
 
-#include "add_route_dialog.h"
+#ifdef COMPILER_MSVC
+#include "about.h"
 #include "add_video_dialog.h"
 #include "big_clock_window.h"
 #include "bundle_manager.h"
+#include "engine_dialog.h"
+#include "export_video_dialog.h"
 #include "global_port_matrix.h"
 #include "keyeditor.h"
 #include "location_ui.h"
 #include "route_params_ui.h"
 #include "session_option_editor.h"
 #include "speaker_dialog.h"
+#else
+class About;
+class AddRouteDialog;
+class AddVideoDialog;
+class BigClockWindow;
+class BundleManager;
+class EngineControl;
+class ExportVideoDialog;
+class KeyEditor;
+class LocationUIWindow;
+class RCOptionEditor;
+class RouteParams_UI;
+class SessionOptionEditor;
+class SpeakerDialog;
+class GlobalPortMatrixWindow;
+#endif
 
 class VideoTimeLine;
 class ArdourKeyboard;
@@ -100,14 +115,13 @@ class ConnectionEditor;
 class MainClock;
 class Mixer_UI;
 class PublicEditor;
-class RCOptionEditor;
-class RouteParams_UI;
 class SaveAsDialog;
 class SessionDialog;
 class SessionOptionEditor;
 class ShuttleControl;
 class Splash;
 class TimeInfoBox;
+class Meterbridge;
 class MidiTracer;
 class NSM_Client;
 class LevelMeterHBox;
@@ -133,14 +147,8 @@ namespace Gtk {
 
 class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 {
-    private:
-       /* This must be the first data element because constructor ordering
-          relies on it.
-       */
-       UIConfiguration*     ui_config;
-
     public:
-       ARDOUR_UI (int *argcp, char **argvp[], const char* localedir, UIConfiguration*);
+       ARDOUR_UI (int *argcp, char **argvp[], const char* localedir);
        ~ARDOUR_UI();
 
        bool run_startup (bool should_be_new, std::string load_template);
@@ -185,8 +193,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void save_state (const std::string & state_name = "", bool switch_to_it = false);
 
        static ARDOUR_UI *instance () { return theArdourUI; }
-       static UIConfiguration *config () { return theArdourUI->ui_config; }
-       static float ui_scale;
        
        PublicEditor&     the_editor() { return *editor;}
        Mixer_UI* the_mixer() { return mixer; }
@@ -196,8 +202,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void toggle_mixer_space();
        void toggle_keep_tearoffs();
 
-       Gtk::Tooltips& tooltips() { return _tooltips; }
-
        static PublicEditor* _instance;
 
        /** Emitted frequently with the audible frame, false, and the edit point as
@@ -290,6 +294,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        void show_ui_prefs ();
 
+       bool check_audioengine(Gtk::Window&);
+
        void update_tearoff_visibility ();
 
        void setup_profile ();
@@ -308,6 +314,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
         int disconnect_from_engine ();
         int reconnect_to_engine ();
+       void hide_application ();
 
   protected:
        friend class PublicEditor;
@@ -331,10 +338,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
   private:
        PublicEditor*        editor;
        Mixer_UI*            mixer;
-       Gtk::Tooltips       _tooltips;
        NSM_Client*          nsm;
        bool                _was_dirty;
         bool                _mixer_on_top;
+        bool                _initial_verbose_plugin_scan;
         bool first_time_engine_run;
 
        void goto_editor_window ();
@@ -500,34 +507,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        Gtk::Menu*        session_popup_menu;
 
-       struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
-           RecentSessionModelColumns() {
-                   add (visible_name);
-                   add (tip);
-                   add (fullpath);
-           }
-           Gtk::TreeModelColumn<std::string> visible_name;
-           Gtk::TreeModelColumn<std::string> tip;
-           Gtk::TreeModelColumn<std::string> fullpath;
-       };
-
-       RecentSessionModelColumns    recent_session_columns;
-       Gtk::TreeView                recent_session_display;
-       Glib::RefPtr<Gtk::TreeStore> recent_session_model;
-
-       ArdourDialog*     session_selector_window;
-       Gtk::FileChooserDialog* open_session_selector;
-
-       void build_session_selector();
-       void redisplay_recent_sessions();
-       void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
-
-       struct RecentSessionsSorter {
-               bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const {
-                   return ARDOUR::cmp_nocase(a.first, b.first) == -1;
-           }
-       };
-
        /* menu bar and associated stuff */
 
        Gtk::MenuBar* menu_bar;
@@ -552,6 +531,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        Gtk::Label   xrun_label;
        void update_xrun_count ();
 
+       Gtk::Label   peak_thread_work_label;
+       void update_peak_thread_work ();
+
        Gtk::Label   buffer_load_label;
        void update_buffer_load ();
 
@@ -687,6 +669,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        void display_cleanup_results (ARDOUR::CleanupReport& rep, const gchar* list_title, const bool msg_delete);
        void cleanup ();
+       void cleanup_peakfiles ();
        void flush_trash ();
 
        bool have_configure_timeout;
@@ -738,7 +721,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        void check_memory_locking ();
 
-       bool check_audioengine();
        void audioengine_setup ();
 
        void display_message (const char *prefix, gint prefix_len,