red-border selection for tracks, regions, and processors. requesting comments
[ardour.git] / gtk2_ardour / ardour_ui.h
index ea03c8590f7a6e3caf4a06a7e14a6bd8cefc31e6..3a4ffe60858dc55258f135ef8a1ead3a9f63ca79 100644 (file)
@@ -35,7 +35,6 @@
 #include <list>
 #include <cmath>
 
-#include <libgnomecanvasmm/canvas.h>
 
 #include "pbd/xml++.h"
 #include "pbd/controllable.h"
 #include "ardour/utils.h"
 #include "ardour/plugin.h"
 #include "ardour/session_handle.h"
+#include "ardour/system_exec.h"
 
 #include "video_timeline.h"
 
+#include "about.h"
 #include "ardour_button.h"
 #include "ardour_dialog.h"
 #include "ardour_window.h"
 #include "editing.h"
+#include "engine_dialog.h"
 #include "meterbridge.h"
-#include "nsm.h"
 #include "ui_config.h"
 #include "enums.h"
 #include "visibility_group.h"
 #include "window_manager.h"
 
-class About;
-class AddRouteDialog;
-class AddVideoDialog;
+#include "add_route_dialog.h"
+#include "add_video_dialog.h"
+#include "big_clock_window.h"
+#include "bundle_manager.h"
+#include "global_port_matrix.h"
+#include "keyeditor.h"
+#include "location_ui.h"
+#include "rc_option_editor.h"
+#include "route_params_ui.h"
+#include "session_option_editor.h"
+#include "speaker_dialog.h"
+#include "theme_manager.h"
+
 class VideoTimeLine;
-class SystemExec;
-class ArdourStartup;
 class ArdourKeyboard;
 class AudioClock;
-class BigClockWindow;
-class BundleManager;
 class ButtonJoiner;
 class ConnectionEditor;
-class EngineControl;
-class KeyEditor;
-class LocationUIWindow;
 class MainClock;
 class Mixer_UI;
 class PublicEditor;
 class RCOptionEditor;
 class RouteParams_UI;
+class SessionDialog;
 class SessionOptionEditor;
 class ShuttleControl;
 class Splash;
-class SpeakerDialog;
-class ThemeManager;
 class TimeInfoBox;
 class MidiTracer;
+class NSM_Client;
 class LevelMeterHBox;
-class GlobalPortMatrixWindow;
 class GUIObjectState;
 
 namespace Gtkmm2ext {
@@ -153,7 +156,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        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_nsd (const std::string& session_name, const std::string& session_path);
+        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);
 
        /// @return true if session was successfully unloaded.
@@ -171,6 +174,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        void new_midi_tracer_window ();
        void toggle_editing_space();
+       void toggle_mixer_space();
        void toggle_keep_tearoffs();
 
        Gtk::Tooltips& tooltips() { return _tooltips; }
@@ -273,6 +277,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void maximise_editing_space ();
        void restore_editing_space ();
 
+       void show_ui_prefs ();
+
        void update_tearoff_visibility ();
 
        void setup_profile ();
@@ -312,11 +318,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void toggle_session_options_window ();
 
   private:
-       ArdourStartup*      _startup;
-       Gtk::Tooltips        _tooltips;
+       Gtk::Tooltips       _tooltips;
        NSM_Client          *nsm;
-       bool                 _was_dirty;
-        bool                 _mixer_on_top;
+       bool                _was_dirty;
+        bool                _mixer_on_top;
         bool first_time_engine_run;
 
        void goto_editor_window ();
@@ -331,8 +336,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        static ARDOUR_UI *theArdourUI;
 
-       void startup ();
-       void shutdown ();
+        int starting ();
 
        int  ask_about_saving_session (const std::vector<std::string>& actions);
 
@@ -422,7 +426,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        boost::shared_ptr<TransportControllable> play_selection_controllable;
        boost::shared_ptr<TransportControllable> rec_controllable;
 
-       void toggle_always_play_range ();
+       void toggle_follow_edits ();
 
        void set_transport_controllable_state (const XMLNode&);
        XMLNode& get_transport_controllable_state ();
@@ -462,6 +466,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void sync_blink (bool);
        void audition_blink (bool);
        void feedback_blink (bool);
+       
+       void set_flat_buttons();
 
        void soloing_changed (bool);
        void auditioning_changed (bool);
@@ -505,7 +511,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        struct RecentSessionsSorter {
                bool operator() (std::pair<std::string,std::string> a, std::pair<std::string,std::string> b) const {
-                   return cmp_nocase(a.first, b.first) == -1;
+                   return ARDOUR::cmp_nocase(a.first, b.first) == -1;
            }
        };
 
@@ -559,6 +565,15 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        void set_transport_sensitivity (bool);
 
+       //stuff for ProTools-style numpad
+       void transport_numpad_event (int num);
+       void transport_numpad_decimal ();
+       bool _numpad_locate_happening;
+       int _pending_locate_num;
+       gint transport_numpad_timeout ();
+       sigc::connection _numpad_timeout_connection;
+
+       void transport_goto_nth_marker (int nth);
        void transport_goto_zero ();
        void transport_goto_start ();
        void transport_goto_end ();
@@ -572,6 +587,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void transport_rewind (int option);
        void transport_loop ();
        void toggle_roll (bool with_abort, bool roll_out_of_bounded_mode);
+       bool trx_record_enable_all_tracks ();
 
        bool _session_is_new;
        void set_session (ARDOUR::Session *);
@@ -584,6 +600,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        void snapshot_session (bool switch_to_it);
        void rename_session ();
+       void setup_order_hint ();
 
        Mixer_UI   *mixer;
        int         create_mixer ();
@@ -603,6 +620,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
         WM::Proxy<About> about;
         WM::Proxy<LocationUIWindow> location_ui;
         WM::Proxy<RouteParams_UI> route_params;
+        WM::Proxy<EngineControl> audio_midi_setup;
 
         /* Windows/Dialogs that require a creator method */
 
@@ -623,7 +641,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        static UIConfiguration *ui_config;
 
-       SystemExec *video_server_process;
+       ARDOUR::SystemExec *video_server_process;
 
        void handle_locations_change (ARDOUR::Location*);
 
@@ -663,6 +681,12 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void disk_speed_dialog_gone (int ignored_response, Gtk::MessageDialog*);
        void disk_overrun_handler ();
        void disk_underrun_handler ();
+       void gui_idle_handler ();
+
+       void cancel_plugin_scan ();
+       void cancel_plugin_timeout ();
+       void plugin_scan_dialog (std::string type, std::string plugin, bool);
+       void plugin_scan_timeout (int);
 
         void session_format_mismatch (std::string, std::string);
 
@@ -693,7 +717,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
 
        bool first_idle ();
 
-       void no_memory_warning ();
        void check_memory_locking ();
 
        bool check_audioengine();
@@ -723,7 +746,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
        void fontconfig_dialog ();
 
         int missing_file (ARDOUR::Session*s, std::string str, ARDOUR::DataType type);
-        int ambiguous_file (std::string file, std::string path, std::vector<std::string> hits);
+        int ambiguous_file (std::string file, std::vector<std::string> hits);
 
        bool click_button_clicked (GdkEventButton *);
 
@@ -747,8 +770,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
         std::string _announce_string;
         void check_announcements ();
 
-        EngineControl* _audio_midi_setup;
-        void launch_audio_midi_setup ();
         int do_audio_midi_setup (uint32_t);
 };