- ExportModelColumns exp_cols;
-
- // These methods are intended to be used in constructors of subclasses
- void do_not_allow_track_and_master_selection();
- void do_not_allow_channel_count_selection();
- void do_not_allow_export_cd_markers();
-
- // Checks the given filename for validity when export gets started.
- // Export will interrupt when this method returns 'false'.
- // Method is responsible for informing user.
- virtual bool is_filepath_valid(string &filepath);
-
- // Gets called from within do_export. Is responsible for exporting the
- // audio data. spec has already been filled with user input before calling
- // this method. The dialog will be closed after this function exited.
- virtual void export_audio_data() = 0;
-
- virtual bool wants_dir() { return false; }
-
- // reads the user input and fills spec with the according values
- // filepath: complete path to the target file, including filename
- void initSpec(string &filepath);
-
- void set_progress_fraction(double progress) {
- progress_bar.set_fraction (progress); }
-
- ARDOUR::Session& getSession() { return *session; };
- string get_selected_header_format() {
- return header_format_combo.get_active_text(); };
- string get_selected_file_name() { return file_entry.get_text(); };
-
+ protected:
+
+ typedef boost::shared_ptr<ARDOUR::ExportHandler> HandlerPtr;
+ typedef boost::shared_ptr<ARDOUR::ExportProfileManager> ManagerPtr;
+
+ std::string xml_node_name;
+ HandlerPtr handler;
+ ManagerPtr profile_manager;
+
+ // initializes GUI layout
+ virtual void init_gui ();
+
+ // Must initialize all the shared_ptrs below
+ virtual void init_components ();
+
+ // Override if the channel selector should not be grown
+ virtual bool channel_selector_is_expandable() { return true; }
+
+ boost::scoped_ptr<ExportPresetSelector> preset_selector;
+ boost::scoped_ptr<ExportTimespanSelector> timespan_selector;
+ boost::scoped_ptr<ExportChannelSelector> channel_selector;
+ boost::scoped_ptr<ExportFileNotebook> file_notebook;
+
+ Gtk::VBox warning_widget;
+ Gtk::VBox progress_widget;
+
+ Gtk::Label * timespan_label;
+ Gtk::Label * channels_label;
+
+ private:
+
+ void init ();
+
+ void expanded_changed();
+
+ void notify_errors ();
+ void close_dialog ();
+
+ void sync_with_manager ();
+ void update_warnings_and_example_filename ();
+ void show_conflicting_files ();
+
+ void export_rt ();
+ void export_fw ();
+
+ void show_progress ();
+ gint progress_timeout ();
+
+ typedef boost::shared_ptr<ARDOUR::ExportStatus> StatusPtr;
+
+ PublicEditor & editor;
+ StatusPtr status;
+ PBD::ScopedConnection abort_connection;
+
+ /*** GUI components ***/
+
+ Glib::RefPtr<Gtk::SizeGroup> advanced_sizegroup;
+ Gtk::Expander * advanced;
+
+ /* Warning area */
+
+ Gtk::HBox warn_hbox;
+ Gtk::Label warn_label;
+ std::string warn_string;
+
+ Gtk::HBox list_files_hbox;
+ Gtk::Label list_files_label;
+ Gtk::Button list_files_button;
+ std::string list_files_string;
+
+ void add_error (std::string const & text);
+ void add_warning (std::string const & text);
+
+ /* Progress bar */
+
+ Gtk::ProgressBar progress_bar;
+ sigc::connection progress_connection;
+
+ float previous_progress; // Needed for gtk bug workaround
+
+ /* Buttons */
+
+ Gtk::Button * cancel_button;
+ Gtk::Button * rt_export_button;
+ Gtk::Button * fast_export_button;
+
+};
+
+class ExportRangeDialog : public ExportDialog
+{
+ public:
+ ExportRangeDialog (PublicEditor & editor, std::string range_id);
+
+ private:
+ void init_components ();
+
+ std::string range_id;
+};
+
+class ExportSelectionDialog : public ExportDialog
+{
+ public:
+ ExportSelectionDialog (PublicEditor & editor);
+
+ private:
+ void init_components ();
+};
+
+class ExportRegionDialog : public ExportDialog
+{
+ public:
+ ExportRegionDialog (PublicEditor & editor, ARDOUR::AudioRegion const & region, ARDOUR::AudioTrack & track);
+
+ protected:
+ virtual bool channel_selector_is_expandable() { return false; }
+
+ private:
+ void init_gui ();
+ void init_components ();
+
+ ARDOUR::AudioRegion const & region;
+ ARDOUR::AudioTrack & track;
+};
+
+class StemExportDialog : public ExportDialog
+{
+ public:
+ StemExportDialog (PublicEditor & editor);
+