#undef interface
#endif
-#include <gtkmm.h>
#include <boost/shared_ptr.hpp>
+#include <gtkmm/box.h>
+#include <gtkmm/checkbutton.h>
+#include <gtkmm/combobox.h>
+#include <gtkmm/label.h>
+#include <gtkmm/liststore.h>
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treestore.h>
+#include <gtkmm/treeview.h>
#include "ardour/types.h"
#include "ardour/session_handle.h"
}
using ARDOUR::CDMarkerFormat;
-using ARDOUR::framecnt_t;
+using ARDOUR::samplecnt_t;
/// Timespan Selector base
class ExportTimespanSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr
{
- protected:
+protected:
typedef std::list<ARDOUR::Location *> LocationList;
typedef boost::shared_ptr<ARDOUR::ExportHandler> HandlerPtr;
typedef boost::shared_ptr<ARDOUR::ExportProfileManager> ProfileManagerPtr;
typedef boost::shared_ptr<TimespanList> 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<void> 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 ();
std::string construct_label (ARDOUR::Location const * location) const;
std::string construct_length (ARDOUR::Location const * location) const;
- std::string bbt_str (framepos_t frames) const;
- std::string timecode_str (framecnt_t frames) const;
- std::string ms_str (framecnt_t frames) const;
+ std::string bbt_str (samplepos_t samples) const;
+ std::string timecode_str (samplecnt_t samples) const;
+ std::string ms_str (samplecnt_t samples) const;
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 */
struct TimeFormatCols : public Gtk::TreeModelColumnRecord
{
- public:
+ public:
Gtk::TreeModelColumn<TimeFormat> format;
Gtk::TreeModelColumn<std::string> label;
struct RangeCols : public Gtk::TreeModelColumnRecord
{
- public:
+ public:
Gtk::TreeModelColumn<ARDOUR::Location *> location;
Gtk::TreeModelColumn<std::string> label;
Gtk::TreeModelColumn<bool> selected;
+ Gtk::TreeModelColumn<bool> realtime;
Gtk::TreeModelColumn<std::string> name;
Gtk::TreeModelColumn<std::string> 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;
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 ();
/// 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;