#include <string>
#include <vector>
-#include <sndfile.h>
-
#include <sigc++/signal.h>
#include <gtkmm/box.h>
#include <gtkmm/dialog.h>
#include <gtkmm/entry.h>
#include <gtkmm/filechooserwidget.h>
+#include <gtkmm/comboboxtext.h>
#include <gtkmm/frame.h>
#include <gtkmm/label.h>
#include <gtkmm/liststore.h>
#include <gtkmm/treeview.h>
#include <ardour/session.h>
+#include <ardour/externalsource.h>
#include "ardour_dialog.h"
+#include "editing.h"
class SoundFileBox : public Gtk::VBox
{
SoundFileBox ();
virtual ~SoundFileBox () {};
- bool update (std::string filename);
- void set_session (ARDOUR::Session* s);
+ 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
{
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;
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);
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*);
+ virtual void set_session (ARDOUR::Session*);
+
protected:
Gtk::FileChooserWidget chooser;
SoundFileBox preview;
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();};
class SoundFileOmega : public SoundFileBrowser
{
public:
- SoundFileOmega (std::string title);
+ SoundFileOmega (std::string title, ARDOUR::Session* _s);
virtual ~SoundFileOmega () {};
- sigc::signal<void, std::vector<std::string>, bool> Embedded;
- sigc::signal<void, std::vector<std::string>, 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<Glib::ustring> 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<std::string> mode_strings;
};
#endif // __ardour_sfdb_ui_h__