quick checks on empty control lists, to avoid unnecessary work
[ardour.git] / gtk2_ardour / export_channel_selector.h
index dda449d931442e2607216558ecbee705693855ee..6dd770cbb3a424772938905e1f4700b1e4ca24e9 100644 (file)
 #include <list>
 
 #include "ardour/export_profile_manager.h"
-#include "ardour/export_channel.h"
+
+#ifdef interface
+#undef interface
+#endif
 
 #include <gtkmm.h>
 #include <sigc++/signal.h>
@@ -123,14 +126,14 @@ class PortExportChannelSelector : public ExportChannelSelector
                typedef Gtk::TreeModelColumn<Glib::RefPtr<Gtk::ListStore> > ComboCol;
                ComboCol                             port_list_col;
 
-               /* Channel struct, that represents the selected port and it's name */
+               /* Channel struct, that represents the selected port and its name */
 
                struct Channel {
                  public:
                        Channel (RouteCols & cols) { cols.add (port); cols.add (label); }
 
-                       Gtk::TreeModelColumn<ARDOUR::AudioPort *>  port;
-                       Gtk::TreeModelColumn<std::string>        label;
+                       Gtk::TreeModelColumn<boost::weak_ptr<ARDOUR::AudioPort> > port;
+                       Gtk::TreeModelColumn<std::string> label;
                };
                std::list<Channel> channels;
 
@@ -144,11 +147,11 @@ class PortExportChannelSelector : public ExportChannelSelector
                class PortCols : public Gtk::TreeModel::ColumnRecord
                {
                  public:
-                       PortCols () { add (selected); add(port); add(label); }
+                       PortCols () { add(selected); add(port); add(label); }
 
-                       Gtk::TreeModelColumn<bool>                  selected;  // not used ATM
-                       Gtk::TreeModelColumn<ARDOUR::AudioPort *>   port;
-                       Gtk::TreeModelColumn<std::string>         label;
+                       Gtk::TreeModelColumn<bool> selected;  // not used ATM
+                       Gtk::TreeModelColumn<boost::weak_ptr<ARDOUR::AudioPort> > port;
+                       Gtk::TreeModelColumn<std::string> label;
                };
                PortCols port_cols;
        };
@@ -236,19 +239,21 @@ class TrackExportChannelSelector : public ExportChannelSelector
   private:
 
        void fill_list();
-       void add_track(ARDOUR::Route * route);
+       void add_track (boost::shared_ptr<ARDOUR::Route> route);
        void update_config();
-
        ChannelConfigList configs;
 
+       Gtk::VBox main_layout;
+
        struct TrackCols : public Gtk::TreeModelColumnRecord
        {
          public:
-               Gtk::TreeModelColumn<ARDOUR::Route *> track;
+               Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
                Gtk::TreeModelColumn<std::string>     label;
                Gtk::TreeModelColumn<bool>            selected;
+               Gtk::TreeModelColumn<uint32_t>        order_key;
 
-               TrackCols () { add (track); add(label); add(selected); }
+               TrackCols () { add (route); add(label); add(selected); add(order_key); }
        };
        TrackCols                    track_cols;
 
@@ -257,6 +262,16 @@ class TrackExportChannelSelector : public ExportChannelSelector
 
        Gtk::ScrolledWindow          track_scroller;
 
+       Gtk::HBox                    options_box;
+       Gtk::CheckButton             track_output_button;
+       Gtk::Button                  select_tracks_button;
+       Gtk::Button                  select_busses_button;
+       Gtk::Button                  select_none_button;
+       void select_tracks ();
+       void select_busses ();
+       void select_none ();
+
+       void track_outputs_selected ();
 };
 
 #endif /* __export_channel_selector_h__ */