add JAG to author list
[ardour.git] / gtk2_ardour / mixer_ui.h
index 3da4beb112d0cbed23c2cff40e07c97c9d3c0698..809e7a759c60fac1f3cd6ffaa5e556c9476891c6 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __ardour_mixer_ui_h__
@@ -46,7 +45,6 @@ namespace ARDOUR {
        class RouteGroup;
        class Session;
        class AudioDiskstream;
-       class AudioEngine;
 };
 
 class MixerStrip;
@@ -55,7 +53,7 @@ class PluginSelector;
 class Mixer_UI : public Gtk::Window
 {
   public:
-       Mixer_UI (ARDOUR::AudioEngine&);
+       Mixer_UI ();
        ~Mixer_UI();
 
        void connect_to_session (ARDOUR::Session *);
@@ -77,11 +75,14 @@ class Mixer_UI : public Gtk::Window
        void hide_strip (MixerStrip *);
 
        void ensure_float (Gtk::Window&);
+       void toggle_auto_rebinding ();
+       void set_auto_rebinding(bool);
 
        RouteRedirectSelection& selection() { return _selection; }
        
+       static const char* get_order_key();
+
   private:
-       ARDOUR::AudioEngine&     engine;
        ARDOUR::Session         *session;
 
        bool _visible;
@@ -105,13 +106,22 @@ class Mixer_UI : public Gtk::Window
        Gtk::HBox                out_packer;
        Gtk::HPaned              list_hpane;
 
+       // for restoring window geometry.
+       int m_root_x, m_root_y, m_width, m_height;
+       
+       void set_window_pos_and_size ();
+       void get_window_pos_and_size ();
+
        bool on_key_press_event (GdkEventKey*);
+       bool on_scroll_event (GdkEventScroll*);
 
        void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
        
        list<MixerStrip *> strips;
 
        bool strip_scroller_button_release (GdkEventButton*);
+       void scroll_left ();
+       void scroll_right ();
 
        void add_strip (ARDOUR::Session::RouteList&);
        void remove_strip (MixerStrip *);
@@ -124,6 +134,9 @@ class Mixer_UI : public Gtk::Window
        void unselect_all_audiobus_strips ();
        void select_all_audiobus_strips ();
 
+       void auto_rebind_midi_controls ();
+       bool auto_rebinding;
+
        void strip_select_op (bool audiotrack, bool select);
        void select_strip_op (MixerStrip*, bool select);
 
@@ -142,9 +155,13 @@ class Mixer_UI : public Gtk::Window
        void redisplay_track_list ();
        bool no_track_list_redisplay;
        bool track_display_button_press (GdkEventButton*);
+#ifdef GTKOSX
+       void queue_draw_all_strips ();
+#endif
        
        void track_list_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
        void track_list_delete (const Gtk::TreeModel::Path&);
+       void track_list_reorder (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* new_order);
 
        void initial_track_display ();
        void show_track_list_menu ();
@@ -170,6 +187,8 @@ class Mixer_UI : public Gtk::Window
        void build_mix_group_context_menu ();
        void activate_all_mix_groups ();
        void disable_all_mix_groups ();
+       void show_all_mix_groups ();
+       void hide_all_mix_groups ();
        void add_mix_group (ARDOUR::RouteGroup *);
        void mix_groups_changed ();
        void mix_group_name_edit (const Glib::ustring&, const Glib::ustring&);
@@ -231,6 +250,10 @@ class Mixer_UI : public Gtk::Window
 
        Width _strip_width;
 
+       void sync_order_keys (const char *src);
+       bool strip_redisplay_does_not_reset_order_keys;
+       bool strip_redisplay_does_not_sync_order_keys;
+
        static const int32_t default_width = 478;
        static const int32_t default_height = 765;
 };