Connect Script Manager "Edit" -> Lua Scripting Window
[ardour.git] / gtk2_ardour / export_filename_selector.h
index faa508de412d6ed71fb5f3d42ec717236069fe90..a1a19b0bc7528b0609ec53c0dc695b212ef8d468 100644 (file)
 
 #include "ardour/export_profile_manager.h"
 #include "ardour/export_filename.h"
+#include "ardour/session_handle.h"
 
-namespace ARDOUR {
-       class Session;
-}
-
-/// 
-class ExportFilenameSelector : public Gtk::VBox {
+///
+class ExportFilenameSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr
+{
   public:
        typedef boost::shared_ptr<ARDOUR::ExportFilename> FilenamePtr;
 
@@ -39,9 +37,11 @@ class ExportFilenameSelector : public Gtk::VBox {
        ~ExportFilenameSelector ();
 
        void set_state (ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session * session_);
-       
+       void set_example_filename (std::string filename);
+       void require_timespan (bool);
+
        /* Compatibility with other elements */
-       
+
        sigc::signal<void> CriticalSelectionChanged;
 
   private:
@@ -50,71 +50,79 @@ class ExportFilenameSelector : public Gtk::VBox {
 
        void update_label ();
        void update_folder ();
+       void check_folder ();
 
        void change_date_format ();
        void change_time_format ();
-       
+
        void change_session_selection ();
+       void change_timespan_selection ();
        void change_revision_selection ();
        void change_revision_value ();
-       
+
        void open_browse_dialog ();
+       void open_folder ();
 
-       ARDOUR::Session * session;
        boost::shared_ptr<ARDOUR::ExportFilename> filename;
 
        Glib::RefPtr<Gtk::SizeGroup> label_sizegroup;
 
        Gtk::Label        include_label;
-       
+
        Gtk::HBox         include_hbox;
-       
+
        Gtk::Label        label_label;
        Gtk::Entry        label_entry;
-       
-       Gtk::CheckButton  session_checkbox;
-       
+
+       Gtk::ComboBoxText session_snap_name;
+       Gtk::CheckButton  timespan_checkbox;
+
        Gtk::CheckButton  revision_checkbox;
        Gtk::SpinButton   revision_spinbutton;
-       
+
        Gtk::HBox         path_hbox;
-       
+
        Gtk::Label        path_label;
        Gtk::Entry        path_entry;
        Gtk::Button       browse_button;
-       
+       Gtk::Button       open_button;
+       Gtk::Label        example_filename_label;
+
        /* Date combo */
-       
+
        typedef ARDOUR::ExportFilename::DateFormat DateFormat;
-       
+
        struct DateFormatCols : public Gtk::TreeModelColumnRecord
        {
          public:
                Gtk::TreeModelColumn<DateFormat>     format;
-               Gtk::TreeModelColumn<Glib::ustring>  label;
-       
+               Gtk::TreeModelColumn<std::string>  label;
+
                DateFormatCols () { add(format); add(label); }
        };
        DateFormatCols               date_format_cols;
        Glib::RefPtr<Gtk::ListStore> date_format_list;
        Gtk::ComboBox                date_format_combo;
-       
+
        /* Time combo */
-       
+
        typedef ARDOUR::ExportFilename::TimeFormat TimeFormat;
-       
+
        struct TimeFormatCols : public Gtk::TreeModelColumnRecord
        {
          public:
                Gtk::TreeModelColumn<TimeFormat>     format;
-               Gtk::TreeModelColumn<Glib::ustring>  label;
-       
+               Gtk::TreeModelColumn<std::string>  label;
+
                TimeFormatCols () { add(format); add(label); }
        };
        TimeFormatCols               time_format_cols;
        Glib::RefPtr<Gtk::ListStore> time_format_list;
        Gtk::ComboBox                time_format_combo;
 
+       /* timespan logic */
+       void update_timespan_sensitivity ();
+       bool _require_timespan;
 };
 
 #endif /* __export_filename_selector_h__ */