summaryrefslogtreecommitdiff
path: root/gtk2_ardour/export_channel_selector.h
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2008-10-11 10:14:51 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2008-10-11 10:14:51 +0000
commit98389f7da420ee205f6827b7df4db3ea0802f751 (patch)
tree28a28cf591b3d90a7eb60f422eee95e5ebfed6dc /gtk2_ardour/export_channel_selector.h
parent01b1790c98f9ee6739681f1dc8fe529c3ca7160a (diff)
Region export dialog: Make export channel and -selector polymorphic, add the region related classes and a dialog specialization
git-svn-id: svn://localhost/ardour2/branches/3.0@3915 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/export_channel_selector.h')
-rw-r--r--gtk2_ardour/export_channel_selector.h61
1 files changed, 49 insertions, 12 deletions
diff --git a/gtk2_ardour/export_channel_selector.h b/gtk2_ardour/export_channel_selector.h
index 0faf652bd8..c2e99940aa 100644
--- a/gtk2_ardour/export_channel_selector.h
+++ b/gtk2_ardour/export_channel_selector.h
@@ -24,6 +24,7 @@
#include <list>
#include <ardour/export_profile_manager.h>
+#include <ardour/export_channel.h>
#include <gtkmm.h>
#include <sigc++/signal.h>
@@ -31,31 +32,39 @@
namespace ARDOUR {
class Session;
- class ExportChannel;
class ExportChannelConfiguration;
+ class RegionExportChannelFactory;
class ExportHandler;
class AudioPort;
class IO;
+ class AudioRegion;
+ class AudioTrack;
}
class XMLNode;
-///
-class ExportChannelSelector : public Gtk::HBox {
- private:
-
+class ExportChannelSelector : public Gtk::HBox
+{
+ protected:
typedef boost::shared_ptr<ARDOUR::ExportChannelConfiguration> ChannelConfigPtr;
-
typedef boost::shared_ptr<ARDOUR::ExportHandler> HandlerPtr;
public:
+ virtual ~ExportChannelSelector () {}
+
+ virtual void set_state (ARDOUR::ExportProfileManager::ChannelConfigStatePtr const state_, ARDOUR::Session * session_) = 0;
+ sigc::signal<void> CriticalSelectionChanged;
+};
+
+class PortExportChannelSelector : public ExportChannelSelector
+{
- ExportChannelSelector ();
- ~ExportChannelSelector ();
+ public:
+
+ PortExportChannelSelector ();
+ ~PortExportChannelSelector ();
void set_state (ARDOUR::ExportProfileManager::ChannelConfigStatePtr const state_, ARDOUR::Session * session_);
-
- sigc::signal<void> CriticalSelectionChanged;
private:
@@ -63,8 +72,7 @@ class ExportChannelSelector : public Gtk::HBox {
void update_channel_count ();
void update_split_state ();
- typedef boost::shared_ptr<ARDOUR::ExportChannel> ChannelPtr;
- typedef std::list<ChannelPtr> CahnnelList;
+ typedef std::list<ARDOUR::ExportChannelPtr> CahnnelList;
ARDOUR::Session * session;
ARDOUR::ExportProfileManager::ChannelConfigStatePtr state;
@@ -178,4 +186,33 @@ class ExportChannelSelector : public Gtk::HBox {
};
+class RegionExportChannelSelector : public ExportChannelSelector
+{
+ public:
+ RegionExportChannelSelector (ARDOUR::AudioRegion const & region, ARDOUR::AudioTrack & track);
+
+ virtual void set_state (ARDOUR::ExportProfileManager::ChannelConfigStatePtr const state_, ARDOUR::Session * session_);
+
+ private:
+
+ void handle_selection ();
+
+ ARDOUR::Session * session;
+ ARDOUR::ExportProfileManager::ChannelConfigStatePtr state;
+ boost::shared_ptr<ARDOUR::RegionExportChannelFactory> factory;
+ ARDOUR::AudioRegion const & region;
+ ARDOUR::AudioTrack & track;
+
+ uint32_t region_chans;
+ uint32_t track_chans;
+
+ /*** GUI components ***/
+
+ Gtk::VBox vbox;
+
+ Gtk::RadioButtonGroup type_group;
+ Gtk::RadioButton raw_button;
+ Gtk::RadioButton processed_button;
+};
+
#endif /* __export_channel_selector_h__ */