summaryrefslogtreecommitdiff
path: root/gtk2_ardour/export_timespan_selector.h
diff options
context:
space:
mode:
authorSakari Bergen <sakari.bergen@beatwaves.net>2008-09-29 17:01:52 +0000
committerSakari Bergen <sakari.bergen@beatwaves.net>2008-09-29 17:01:52 +0000
commitef9beb3f60b5499d4db48b771627b6facfe872d3 (patch)
treeda164d4da8e7812cbc1865e544d659e4f4ddbd3c /gtk2_ardour/export_timespan_selector.h
parent8807d0f748b424115393707f031d59b760080e8e (diff)
* Fixed const correctness error in Location
* Reworked ExportMainDialog in preparation for the creation of CD and region export dialogs: * Separated ExportPresetSelector and ExportFileNotebook from ExportMainDialog * Made ExportTimespanSelector polymorphic regarding single/multiple timespan mode * renamed ExportMainDialog to ExportDialog and made it easily customizable * created ExportRangeDialog and ExportSelectionDialog, these can be later customized more if necessary git-svn-id: svn://localhost/ardour2/branches/3.0@3834 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/export_timespan_selector.h')
-rw-r--r--gtk2_ardour/export_timespan_selector.h77
1 files changed, 48 insertions, 29 deletions
diff --git a/gtk2_ardour/export_timespan_selector.h b/gtk2_ardour/export_timespan_selector.h
index 757b2caad2..e8a97326bc 100644
--- a/gtk2_ardour/export_timespan_selector.h
+++ b/gtk2_ardour/export_timespan_selector.h
@@ -41,52 +41,43 @@ namespace ARDOUR {
using ARDOUR::CDMarkerFormat;
-///
+/// Timespan Selector base
class ExportTimespanSelector : public Gtk::VBox {
- private:
-
- typedef std::list<ARDOUR::Location *> LocationList;
- typedef boost::shared_ptr<ARDOUR::ExportHandler> HandlerPtr;
-
- typedef boost::shared_ptr<ARDOUR::ExportTimespan> TimespanPtr;
- typedef std::list<TimespanPtr> TimespanList;
- typedef boost::shared_ptr<TimespanList> TimespanListPtr;
-
public:
ExportTimespanSelector ();
- ~ExportTimespanSelector ();
+ virtual ~ExportTimespanSelector ();
void set_state (ARDOUR::ExportProfileManager::TimespanStatePtr const state_, ARDOUR::Session * session_);
- void select_one_range (Glib::ustring id);
-
- /* Compatibility with other elements */
-
sigc::signal<void> CriticalSelectionChanged;
- private:
+ protected:
- void fill_range_list ();
- void set_selection_from_state ();
+ typedef std::list<ARDOUR::Location *> LocationList;
+ typedef boost::shared_ptr<ARDOUR::ExportHandler> HandlerPtr;
- void update_selection ();
- void update_timespans ();
+ typedef boost::shared_ptr<ARDOUR::ExportTimespan> TimespanPtr;
+ typedef std::list<TimespanPtr> TimespanList;
+ typedef boost::shared_ptr<TimespanList> TimespanListPtr;
+
+ ARDOUR::Session * session;
+ ARDOUR::ExportProfileManager::TimespanStatePtr state;
+
+ virtual void fill_range_list () = 0;
- void change_time_format ();
+ void add_range_to_selection (ARDOUR::Location const * loc);
+ void set_time_format_from_state ();
- Glib::ustring construct_label (ARDOUR::Location const * location);
+ void change_time_format ();
- Glib::ustring bbt_str (nframes_t frames);
- Glib::ustring smpte_str (nframes_t frames);
- Glib::ustring ms_str (nframes_t frames);
+ Glib::ustring construct_label (ARDOUR::Location const * location) const;
+ Glib::ustring bbt_str (nframes_t frames) const;
+ Glib::ustring smpte_str (nframes_t frames) const;
+ Glib::ustring ms_str (nframes_t frames) const;
void update_range_name (Glib::ustring const & path, Glib::ustring const & new_text);
- ARDOUR::Session * session;
-
- ARDOUR::ExportProfileManager::TimespanStatePtr state;
-
/*** GUI components ***/
Gtk::HBox option_hbox;
@@ -126,6 +117,34 @@ class ExportTimespanSelector : public Gtk::VBox {
Gtk::TreeView range_view;
Gtk::ScrolledWindow range_scroller;
+};
+
+/// Allows seleting multiple timespans
+class ExportTimespanSelectorMultiple : public ExportTimespanSelector
+{
+ public:
+ ExportTimespanSelectorMultiple ();
+
+ private:
+
+ virtual void fill_range_list ();
+
+ void set_selection_from_state ();
+ void update_selection ();
+ void update_timespans ();
+};
+
+/// Displays one timespan
+class ExportTimespanSelectorSingle : public ExportTimespanSelector
+{
+ public:
+ ExportTimespanSelectorSingle (Glib::ustring range_id);
+
+ private:
+
+ virtual void fill_range_list ();
+
+ Glib::ustring range_id;
};