X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fexport_timespan_selector.h;h=5d299e1e52cd25a4eb1f93bc4a02159b5f5fbc67;hb=dab0dacc66dcc190b4408ba75e3807973582cbd6;hp=e2291faf5a26be6a7cb5948c90b63f96125473f3;hpb=ab47be7b5a99e34b7f125b16556d2295e480553b;p=ardour.git diff --git a/gtk2_ardour/export_timespan_selector.h b/gtk2_ardour/export_timespan_selector.h index e2291faf5a..5d299e1e52 100644 --- a/gtk2_ardour/export_timespan_selector.h +++ b/gtk2_ardour/export_timespan_selector.h @@ -30,19 +30,20 @@ #include #include "ardour/types.h" +#include "ardour/session_handle.h" #include "ardour/export_profile_manager.h" namespace ARDOUR { class Location; class ExportTimespan; class ExportHandler; - class Session; } using ARDOUR::CDMarkerFormat; /// Timespan Selector base -class ExportTimespanSelector : public Gtk::VBox { +class ExportTimespanSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr +{ protected: typedef std::list LocationList; typedef boost::shared_ptr HandlerPtr; @@ -56,56 +57,55 @@ class ExportTimespanSelector : public Gtk::VBox { public: ExportTimespanSelector (ARDOUR::Session * session, ProfileManagerPtr manager); - + virtual ~ExportTimespanSelector (); void sync_with_manager (); - + sigc::signal CriticalSelectionChanged; protected: - ARDOUR::Session * session; ProfileManagerPtr manager; TimespanStatePtr state; virtual void fill_range_list () = 0; - + void add_range_to_selection (ARDOUR::Location const * loc); void set_time_format_from_state (); - + void change_time_format (); - + 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 timecode_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); /*** GUI components ***/ - + Gtk::HBox option_hbox; Gtk::Label time_format_label; - + /* Time format */ - + typedef ARDOUR::ExportProfileManager::TimeFormat TimeFormat; - + struct TimeFormatCols : public Gtk::TreeModelColumnRecord { public: Gtk::TreeModelColumn format; Gtk::TreeModelColumn label; - + TimeFormatCols () { add(format); add(label); } }; TimeFormatCols time_format_cols; Glib::RefPtr time_format_list; Gtk::ComboBox time_format_combo; - + /* View */ - + struct RangeCols : public Gtk::TreeModelColumnRecord { public: @@ -113,14 +113,14 @@ class ExportTimespanSelector : public Gtk::VBox { Gtk::TreeModelColumn label; Gtk::TreeModelColumn selected; Gtk::TreeModelColumn name; - + RangeCols () { add (location); add(label); add(selected); add(name); } }; RangeCols range_cols; - + Glib::RefPtr range_list; Gtk::TreeView range_view; - + Gtk::ScrolledWindow range_scroller; }; @@ -148,7 +148,7 @@ class ExportTimespanSelectorSingle : public ExportTimespanSelector private: virtual void fill_range_list (); - + Glib::ustring range_id; };