fix typo in ce7d18bc16
[ardour.git] / gtk2_ardour / ardour_ui.h
index 00d31d9c0c7be9a08a4f4884625ffed7ebdc5208..d08dd9aeef71da04e164823573a69abd71aa08ac 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;
 class AudioClock;
 class ButtonJoiner;
 class ConnectionEditor;
+class DuplicateRouteDialog;
 class MainClock;
 class Mixer_UI;
+class ArdourPrompter;
 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;
@@ -126,16 +143,14 @@ namespace Gtkmm2ext {
        class TearOff;
 }
 
+namespace Gtk {
+       class ProgressBar;
+}
+
 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);
+       ARDOUR_UI (int *argcp, char **argvp[], const char* localedir);
        ~ARDOUR_UI();
 
        bool run_startup (bool should_be_new, std::string load_template);
@@ -147,6 +162,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void launch_manual ();
        void launch_reference ();
        void launch_tracker ();
+       void launch_subscribe ();
        void launch_cheat_sheet ();
        void launch_website ();
        void launch_website_dev ();
@@ -166,7 +182,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        ARDOUR::Session* the_session() { return _session; }
 
        bool get_smart_mode () const;
-       
+
        int get_session_parameters (bool quit_on_cancel, bool should_be_new = false, std::string load_template = "");
         int  build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path);
        bool ask_about_loading_existing_session (const std::string& session_path);
@@ -179,20 +195,17 @@ 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; }
-       
-       PublicEditor&     the_editor(){return *editor;}
+
+       PublicEditor&     the_editor() { return *editor;}
        Mixer_UI* the_mixer() { return mixer; }
 
        void new_midi_tracer_window ();
        void toggle_editing_space();
        void toggle_mixer_space();
+       void toggle_mixer_list();
+       void toggle_monitor_section_visibility ();
        void toggle_keep_tearoffs();
 
-       Gtk::Tooltips& tooltips() { return _tooltips; }
-
-       Gtk::HBox& editor_transport_box() { return _editor_transport_box; }
-
        static PublicEditor* _instance;
 
        /** Emitted frequently with the audible frame, false, and the edit point as
@@ -218,7 +231,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void create_xrun_marker (framepos_t);
 
        GUIObjectState* gui_object_state;
-       
+
        MainClock* primary_clock;
        MainClock* secondary_clock;
        void focus_on_clock ();
@@ -238,6 +251,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
         void add_routes_part_two ();
         void add_routes_thread ();
 
+       void start_duplicate_routes ();
+
        void add_video (Gtk::Window* float_window);
        void remove_video ();
        void start_video_server_menu (Gtk::Window* float_window);
@@ -285,6 +300,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 ();
@@ -301,8 +318,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
         const std::string& announce_string() const { return _announce_string; }
 
-        int disconnect_from_engine ();
-        int reconnect_to_engine ();
+       void hide_application ();
 
   protected:
        friend class PublicEditor;
@@ -326,10 +342,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 ();
@@ -343,6 +359,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void setup_clock ();
 
        static ARDOUR_UI *theArdourUI;
+       SessionDialog *_session_dialog;
 
         int starting ();
 
@@ -388,7 +405,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        Gtkmm2ext::TearOff*      transport_tearoff;
        Gtk::Frame               transport_frame;
        Gtk::HBox                transport_tearoff_hbox;
-       Gtk::HBox               _editor_transport_box;
        Gtk::HBox                transport_hbox;
        Gtk::Fixed               transport_base;
        Gtk::Fixed               transport_button_base;
@@ -414,7 +430,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
            };
 
            TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
-           void set_value (double);
+           void set_value (double, PBD::Controllable::GroupControlDisposition group_override);
            double get_value (void) const;
 
            ARDOUR_UI& ui;
@@ -469,18 +485,19 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void blink_handler (bool);
        sigc::connection blink_connection;
 
+       void cancel_solo ();
        void solo_blink (bool);
        void sync_blink (bool);
        void audition_blink (bool);
        void feedback_blink (bool);
        void error_blink (bool);
-       
+
        void set_flat_buttons();
 
        void soloing_changed (bool);
        void auditioning_changed (bool);
        void _auditioning_changed (bool);
-       
+
        bool solo_alert_press (GdkEventButton* ev);
        bool audition_alert_press (GdkEventButton* ev);
        bool feedback_alert_press (GdkEventButton *);
@@ -496,34 +513,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;
@@ -545,6 +534,12 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        Gtk::Label   cpu_load_label;
        void update_cpu_load ();
 
+       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 ();
 
@@ -553,7 +548,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        Gtk::Label    format_label;
        void update_format ();
-       
+
        void every_second ();
        void every_point_one_seconds ();
        void every_point_zero_something_seconds ();
@@ -567,6 +562,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        void open_session ();
        void open_recent_session ();
+       bool process_save_template_prompter (ArdourPrompter& prompter);
        void save_template ();
 
        void edit_metadata ();
@@ -594,7 +590,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void transport_record (bool roll);
        void transport_roll ();
        void transport_play_selection();
-       void transport_play_preroll(); 
+       void transport_play_preroll();
        void transport_forward (int option);
        void transport_rewind (int option);
        void transport_loop ();
@@ -610,7 +606,13 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        guint32  last_key_press_time;
 
+       bool process_snapshot_session_prompter (ArdourPrompter& prompter, bool switch_to_it);
        void snapshot_session (bool switch_to_it);
+
+       SaveAsDialog* save_as_dialog;
+
+       bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
+       void save_session_as ();
        void rename_session ();
        void setup_order_hint (AddRouteDialog::InsertAt);
 
@@ -645,7 +647,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
         SessionOptionEditor*    create_session_option_editor ();
         BundleManager*          create_bundle_manager ();
         AddVideoDialog*         create_add_video_dialog ();
-        BigClockWindow*         create_big_clock_window(); 
+        BigClockWindow*         create_big_clock_window();
         GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
 
        ARDOUR::SystemExec *video_server_process;
@@ -675,6 +677,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;
@@ -726,7 +729,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,
@@ -738,7 +740,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void loading_message (const std::string& msg);
 
        PBD::ScopedConnectionList forever_connections;
-        PBD::ScopedConnection halt_connection; 
+        PBD::ScopedConnection halt_connection;
 
         void step_edit_status_change (bool);
 
@@ -782,11 +784,15 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        void resize_text_widgets ();
 
+       bool xrun_button_release (GdkEventButton* ev);
+
         std::string _announce_string;
         void check_announcements ();
 
         int do_audio_midi_setup (uint32_t);
+       void audioengine_became_silent ();
+
+       DuplicateRouteDialog* duplicate_routes_dialog;
 };
 
 #endif /* __ardour_gui_h__ */
-