fix crash when copy'ing latent plugins
[ardour.git] / gtk2_ardour / ardour_ui.h
index 2d20500171e09d7b27637273604b750fa4a0f018..59a3c963e5f417062b3e07c2e5da9e72c7da08a8 100644 (file)
@@ -202,6 +202,12 @@ public:
 
        static ARDOUR_UI *instance () { return theArdourUI; }
 
+       /* signal emitted when escape key is pressed. All UI components that
+          need to respond to Escape in some way (e.g. break drag, clear
+          selection, etc) should connect to and handle this.
+       */
+       PBD::Signal0<void> Escape;
+
        PublicEditor&     the_editor() { return *editor;}
        Mixer_UI* the_mixer() { return mixer; }
 
@@ -226,6 +232,7 @@ public:
 
        XMLNode* main_window_settings() const;
        XMLNode* editor_settings() const;
+       XMLNode* preferences_settings() const;
        XMLNode* mixer_settings () const;
        XMLNode* keyboard_settings () const;
        XMLNode* tearoff_settings (const char*) const;
@@ -255,6 +262,8 @@ public:
        void synchronize_sync_source_and_video_pullup ();
 
        void add_route ();
+       void add_route_dialog_finished (int);
+
        void add_routes_part_two ();
        void add_routes_thread ();
 
@@ -271,6 +280,9 @@ public:
        void flush_videotimeline_cache (bool localcacheonly=false);
        void export_video (bool range = false);
 
+       void session_add_vca (std::string const &, uint32_t);
+
+       void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &, bool, ARDOUR::PresentationInfo::order_t order);
        void session_add_audio_track (
                int input_channels,
                int32_t output_channels,
@@ -278,9 +290,10 @@ public:
                ARDOUR::RouteGroup* route_group,
                uint32_t how_many,
                std::string const & name_template,
-               bool strict_io
+               bool strict_io,
+               ARDOUR::PresentationInfo::order_t order
                ) {
-               session_add_audio_route (true, input_channels, output_channels, mode, route_group, how_many, name_template, strict_io);
+               session_add_audio_route (true, input_channels, output_channels, mode, route_group, how_many, name_template, strict_io, order);
        }
 
        void session_add_audio_bus (
@@ -289,9 +302,10 @@ public:
                        ARDOUR::RouteGroup* route_group,
                        uint32_t how_many,
                        std::string const & name_template,
-                       bool strict_io
+                       bool strict_io,
+                       ARDOUR::PresentationInfo::order_t order
                        ) {
-               session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, route_group, how_many, name_template, strict_io);
+               session_add_audio_route (false, input_channels, output_channels, ARDOUR::Normal, route_group, how_many, name_template, strict_io, order);
        }
 
        void session_add_midi_track (
@@ -300,15 +314,20 @@ public:
                        std::string const & name_template,
                        bool strict_io,
                        ARDOUR::PluginInfoPtr instrument,
-                       ARDOUR::Plugin::PresetRecord* preset = NULL) {
-               session_add_midi_route (true, route_group, how_many, name_template, strict_io, instrument, preset);
+                       ARDOUR::Plugin::PresetRecord* preset,
+                       ARDOUR::PresentationInfo::order_t order
+               ) {
+               session_add_midi_route (true, route_group, how_many, name_template, strict_io, instrument, preset, order);
        }
 
-       void session_add_mixed_track (const ARDOUR::ChanCount&, const ARDOUR::ChanCount&, ARDOUR::RouteGroup*, uint32_t, std::string const &, bool, ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*);
-       void session_add_midi_bus (ARDOUR::RouteGroup*, uint32_t, std::string const &, bool, ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*);
-       void session_add_audio_route (bool, int32_t, int32_t, ARDOUR::TrackMode, ARDOUR::RouteGroup *, uint32_t, std::string const &, bool);
-       void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, bool, ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*);
-
+       void session_add_mixed_track (const ARDOUR::ChanCount&, const ARDOUR::ChanCount&, ARDOUR::RouteGroup*, uint32_t, std::string const &, bool,
+                                     ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
+                                     ARDOUR::PresentationInfo::order_t order);
+       void session_add_midi_bus (ARDOUR::RouteGroup*, uint32_t, std::string const &, bool, ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord* pset,
+                                  ARDOUR::PresentationInfo::order_t order);
+       void session_add_midi_route (bool, ARDOUR::RouteGroup *, uint32_t, std::string const &, bool,
+                                    ARDOUR::PluginInfoPtr, ARDOUR::Plugin::PresetRecord*,
+                                    ARDOUR::PresentationInfo::order_t order);
        void display_insufficient_ports_message ();
 
        void attach_to_engine ();
@@ -398,7 +417,7 @@ private:
        void button_change_tabbable_visibility (Gtkmm2ext::Tabbable*);
        void key_change_tabbable_visibility (Gtkmm2ext::Tabbable*);
        void toggle_editor_and_mixer ();
-       
+
        void tabbable_state_change (Gtkmm2ext::Tabbable&);
 
        void toggle_meterbridge ();
@@ -661,7 +680,7 @@ private:
        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);
+       ARDOUR::PresentationInfo::order_t translate_order (AddRouteDialog::InsertAt);
 
        int         create_mixer ();
        int         create_editor ();
@@ -717,7 +736,7 @@ private:
 
        void install_actions ();
 
-       void toggle_record_enable (uint32_t);
+       void toggle_record_enable (uint16_t);
 
        uint32_t rec_enabled_streams;
        void count_recenabled_streams (ARDOUR::Route&);
@@ -866,6 +885,9 @@ private:
 
        void step_up_through_tabs ();
        void step_down_through_tabs ();
+
+       void escape ();
+       void pre_release_dialog ();
 };
 
 #endif /* __ardour_gui_h__ */