fix #1637 (needs merging to 2.0.1 branch); remove debug printf
[ardour.git] / gtk2_ardour / mixer_ui.h
index 853304095f1b50aebea5304e51372470e6c6b3b3..bf9c9cbd18c6b63bedaa42776ea6d05ef4030503 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__
 #include <gtkmm/menu.h>
 #include <gtkmm/treeview.h>
 
+#include <pbd/stateful.h>
+
 #include <ardour/ardour.h>
-#include <ardour/stateful.h>
 #include <ardour/io.h>
 
-#include "keyboard_target.h"
 #include "route_redirect_selection.h"
 #include "enums.h"
 
@@ -45,8 +44,7 @@ namespace ARDOUR {
        class Route;
        class RouteGroup;
        class Session;
-       class DiskStream;
-       class AudioEngine;
+       class AudioDiskstream;
 };
 
 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 *);
@@ -72,6 +70,7 @@ class Mixer_UI : public Gtk::Window
        int set_state (const XMLNode& );
 
        void show_window ();
+       bool hide_window (GdkEventAny *ev);
        void show_strip (MixerStrip *);
        void hide_strip (MixerStrip *);
 
@@ -80,8 +79,9 @@ class Mixer_UI : public Gtk::Window
        RouteRedirectSelection& selection() { return _selection; }
        
   private:
-       ARDOUR::AudioEngine&     engine;
        ARDOUR::Session         *session;
+
+       bool _visible;
        
        Gtk::HBox                global_hpacker;
        Gtk::VBox                global_vpacker;
@@ -110,7 +110,7 @@ class Mixer_UI : public Gtk::Window
 
        bool strip_scroller_button_release (GdkEventButton*);
 
-       void add_strip (ARDOUR::Route*);
+       void add_strip (ARDOUR::Session::RouteList&);
        void remove_strip (MixerStrip *);
 
        void hide_all_strips (bool with_select);
@@ -131,8 +131,6 @@ class Mixer_UI : public Gtk::Window
 
        void disconnect_from_session ();
        
-       sigc::connection screen_update_connection;
-       void update_strips ();
        sigc::connection fast_screen_update_connection;
        void fast_update_strips ();
 
@@ -195,7 +193,7 @@ class Mixer_UI : public Gtk::Window
            }
            Gtk::TreeModelColumn<bool>           visible;
            Gtk::TreeModelColumn<Glib::ustring>  text;
-           Gtk::TreeModelColumn<ARDOUR::Route*> route;
+           Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
            Gtk::TreeModelColumn<MixerStrip*>    strip;
        };
 
@@ -230,7 +228,7 @@ class Mixer_UI : public Gtk::Window
 
        Width _strip_width;
 
-       static const int32_t default_width = -1;
+       static const int32_t default_width = 478;
        static const int32_t default_height = 765;
 };