X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fexport_timespan_selector.h;h=1e1460db6cc3cdb62aa383351974daf3212c59a5;hb=7b0c5a0def2b1de8dd968a24c73bd835103fc353;hp=5556f5f676eb4dae77abfa03a16b0e628b592d69;hpb=3020b224fa2d6e1b6b8a576e8e8e211e0585f2a2;p=ardour.git diff --git a/gtk2_ardour/export_timespan_selector.h b/gtk2_ardour/export_timespan_selector.h index 5556f5f676..1e1460db6c 100644 --- a/gtk2_ardour/export_timespan_selector.h +++ b/gtk2_ardour/export_timespan_selector.h @@ -29,9 +29,17 @@ #undef interface #endif -#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "ardour/types.h" #include "ardour/session_handle.h" @@ -49,7 +57,7 @@ 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; @@ -58,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 (); @@ -89,11 +101,13 @@ 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 */ @@ -101,7 +115,7 @@ class ExportTimespanSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr struct TimeFormatCols : public Gtk::TreeModelColumnRecord { - public: + public: Gtk::TreeModelColumn format; Gtk::TreeModelColumn label; @@ -115,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; @@ -132,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 (); @@ -150,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;