X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fexport_timespan_selector.h;h=1e1460db6cc3cdb62aa383351974daf3212c59a5;hb=38e94875647782fa6c28e25be471f0cff6c97d2a;hp=8b06b2ee8d04cedc835a9d6c1b691672f9d8d781;hpb=7468fdb9ca9892cec9b298690bf0edf3655d6453;p=ardour.git diff --git a/gtk2_ardour/export_timespan_selector.h b/gtk2_ardour/export_timespan_selector.h index 8b06b2ee8d..1e1460db6c 100644 --- a/gtk2_ardour/export_timespan_selector.h +++ b/gtk2_ardour/export_timespan_selector.h @@ -21,14 +21,26 @@ #ifndef __export_timespan_selector_h__ #define __export_timespan_selector_h__ -#include "public_editor.h" #include "audio_clock.h" #include -#include +#ifdef interface +#undef interface +#endif + #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + #include "ardour/types.h" #include "ardour/session_handle.h" #include "ardour/export_profile_manager.h" @@ -40,11 +52,12 @@ namespace ARDOUR { } using ARDOUR::CDMarkerFormat; +using ARDOUR::framecnt_t; /// Timespan Selector base class ExportTimespanSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr { - protected: +protected: typedef std::list LocationList; typedef boost::shared_ptr HandlerPtr; typedef boost::shared_ptr ProfileManagerPtr; @@ -53,25 +66,29 @@ class ExportTimespanSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr typedef boost::shared_ptr TimespanListPtr; typedef ARDOUR::ExportProfileManager::TimespanStatePtr TimespanStatePtr; - public: +public: - ExportTimespanSelector (ARDOUR::Session * session, ProfileManagerPtr manager); + ExportTimespanSelector (ARDOUR::Session * session, ProfileManagerPtr manager, bool multi); virtual ~ExportTimespanSelector (); void sync_with_manager (); + virtual void allow_realtime_export (bool); sigc::signal CriticalSelectionChanged; - protected: +protected: ProfileManagerPtr manager; TimespanStatePtr state; + bool _realtime_available; virtual void fill_range_list () = 0; + virtual void update_timespans () = 0; - void add_range_to_selection (ARDOUR::Location const * loc); + void add_range_to_selection (ARDOUR::Location const * loc, bool rt); void set_time_format_from_state (); + void toggle_realtime (); void change_time_format (); @@ -83,10 +100,14 @@ class ExportTimespanSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr void update_range_name (std::string const & path, std::string const & new_text); + void set_selection_state_of_all_timespans (bool); + int location_sorter(Gtk::TreeModel::iterator a, Gtk::TreeModel::iterator b); + /*** GUI components ***/ - Gtk::HBox option_hbox; - Gtk::Label time_format_label; + Gtk::HBox option_hbox; + Gtk::Label time_format_label; + Gtk::CheckButton realtime_checkbutton; /* Time format */ @@ -94,7 +115,7 @@ class ExportTimespanSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr struct TimeFormatCols : public Gtk::TreeModelColumnRecord { - public: + public: Gtk::TreeModelColumn format; Gtk::TreeModelColumn label; @@ -108,14 +129,15 @@ class ExportTimespanSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr struct RangeCols : public Gtk::TreeModelColumnRecord { - public: + public: Gtk::TreeModelColumn location; Gtk::TreeModelColumn label; Gtk::TreeModelColumn selected; + Gtk::TreeModelColumn realtime; Gtk::TreeModelColumn name; Gtk::TreeModelColumn length; - RangeCols () { add (location); add(label); add(selected); add(name); add(length); } + RangeCols () { add (location); add(label); add(selected); add(realtime); add(name); add(length); } }; RangeCols range_cols; @@ -125,13 +147,15 @@ class ExportTimespanSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr Gtk::ScrolledWindow range_scroller; }; -/// Allows seleting multiple timespans +/// Allows selecting multiple timespans class ExportTimespanSelectorMultiple : public ExportTimespanSelector { - public: +public: ExportTimespanSelectorMultiple (ARDOUR::Session * session, ProfileManagerPtr manager); - private: + void allow_realtime_export (bool); + +private: virtual void fill_range_list (); @@ -143,12 +167,15 @@ class ExportTimespanSelectorMultiple : public ExportTimespanSelector /// Displays one timespan class ExportTimespanSelectorSingle : public ExportTimespanSelector { - public: +public: ExportTimespanSelectorSingle (ARDOUR::Session * session, ProfileManagerPtr manager, std::string range_id); - private: + void allow_realtime_export (bool); + +private: virtual void fill_range_list (); + void update_timespans (); std::string range_id;