X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gtk2_ardour%2Fsfdb_ui.h;h=769e4ff02d9e4c587e735570f140b0ff49a4ff45;hb=ce6c41c060c700489a9ac9fc5080bf2920c17ae2;hp=6be971ca735a21ec0eb246514fe7dbe300b522f7;hpb=6039331bea9afb0ce8888659832a04b39ff6be7a;p=ardour.git diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h index 6be971ca73..769e4ff02d 100644 --- a/gtk2_ardour/sfdb_ui.h +++ b/gtk2_ardour/sfdb_ui.h @@ -25,8 +25,6 @@ #include #include -#include - #include #include @@ -35,24 +33,31 @@ #include #include #include +#include #include #include #include #include #include +#include #include "ardour_dialog.h" +#include "editing.h" class SoundFileBox : public Gtk::VBox { public: - SoundFileBox (ARDOUR::Session* session); + SoundFileBox (); virtual ~SoundFileBox () {}; - bool update (std::string filename); + void set_session (ARDOUR::Session* s); + bool setup_labels (std::string filename); protected: + ARDOUR::Session* _session; + std::string path; + struct LabelModelColumns : public Gtk::TreeModel::ColumnRecord { public: @@ -64,13 +69,10 @@ class SoundFileBox : public Gtk::VBox LabelModelColumns label_columns; - SF_INFO sf_info; + ARDOUR::SoundFileInfo sf_info; pid_t current_pid; - Gtk::Label label; - Gtk::Label path; - Gtk::Entry path_entry; Gtk::Label length; Gtk::Label format; Gtk::Label channels; @@ -92,14 +94,13 @@ class SoundFileBox : public Gtk::VBox Gtk::Button add_field_btn; Gtk::Button remove_field_btn; - // void fields_refiller (Gtk::CList &clist); - int setup_labels (std::string filename); void setup_fields (); void play_btn_clicked (); void stop_btn_clicked (); void add_field_clicked (); void remove_field_clicked (); + void delete_row (const Gtk::TreeModel::iterator& iter); void field_selected (); void audition_status_changed (bool state); @@ -108,9 +109,11 @@ class SoundFileBox : public Gtk::VBox class SoundFileBrowser : public ArdourDialog { public: - SoundFileBrowser (std::string title); + SoundFileBrowser (std::string title, ARDOUR::Session* _s = 0); virtual ~SoundFileBrowser () {}; + virtual void set_session (ARDOUR::Session*); + protected: Gtk::FileChooserWidget chooser; SoundFileBox preview; @@ -121,7 +124,7 @@ class SoundFileBrowser : public ArdourDialog class SoundFileChooser : public SoundFileBrowser { public: - SoundFileChooser (std::string title); + SoundFileChooser (std::string title, ARDOUR::Session* _s = 0); virtual ~SoundFileChooser () {}; std::string get_filename () {return chooser.get_filename();}; @@ -130,19 +133,30 @@ class SoundFileChooser : public SoundFileBrowser class SoundFileOmega : public SoundFileBrowser { public: - SoundFileOmega (std::string title); + SoundFileOmega (std::string title, ARDOUR::Session* _s); virtual ~SoundFileOmega () {}; - sigc::signal, bool> Embedded; - sigc::signal, bool> Imported; + /* these are returned by the Dialog::run() method. note + that builtin GTK responses are all negative, leaving + positive values for application-defined responses. + */ + + const static int ResponseImport = 1; + const static int ResponseEmbed = 2; + + std::vector get_paths (); + bool get_split (); + + void set_mode (Editing::ImportMode); + Editing::ImportMode get_mode (); protected: - Gtk::Button embed_btn; - Gtk::Button import_btn; - Gtk::CheckButton split_check; + Gtk::CheckButton split_check; + Gtk::ComboBoxText mode_combo; + + void mode_changed (); - void embed_clicked (); - void import_clicked (); + static std::vector mode_strings; }; #endif // __ardour_sfdb_ui_h__