waf build works on OS X ; new bindings file and processing system in place for mnemon...
[ardour.git] / gtk2_ardour / sfdb_ui.h
index 43f76a9ea24402028eee6785ff3d139c9dba90d6..d9d03225323f96e6878ada6f1223a28745c4f21e 100644 (file)
 #include <gtkmm/filechooserwidget.h>
 #include <gtkmm/frame.h>
 #include <gtkmm/label.h>
+#include <gtkmm/textview.h>
 
-#include <ardour/session.h>
-#include <ardour/audiofilesource.h>
+#include "ardour/session.h"
+#include "ardour/audiofilesource.h"
 
 #include "ardour_dialog.h"
 #include "editing.h"
+#include "audio_clock.h"
 
 namespace ARDOUR {
        class Session;
@@ -117,6 +119,9 @@ class SoundFileBrowser : public ArdourDialog
        FoundTagColumns found_list_columns;
        Glib::RefPtr<Gtk::ListStore> found_list;
 
+       FoundTagColumns freesound_list_columns;
+       Glib::RefPtr<Gtk::ListStore> freesound_list;
+
   public:
        SoundFileBrowser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, bool persistent);
        virtual ~SoundFileBrowser ();
@@ -127,20 +132,32 @@ class SoundFileBrowser : public ArdourDialog
        void clear_selection ();
 
        Gtk::FileChooserWidget chooser;
+
+       SoundFileBox preview;
+
+       Gtk::Entry found_entry;
+       Gtk::Button found_search_btn;
        Gtk::TreeView found_list_view;
 
+       Gtk::Entry freesound_name_entry;
+       Gtk::Entry freesound_pass_entry;
+       Gtk::Entry freesound_entry;
+       Gtk::Button freesound_search_btn;
+       Gtk::TreeView freesound_list_view;
+
+       void freesound_search_thread();
+
   protected:
        bool resetting_ourselves;
        
+       Gtk::FileFilter audio_filter;
+       Gtk::FileFilter midi_filter;
        Gtk::FileFilter custom_filter;
        Gtk::FileFilter matchall_filter;
-       SoundFileBox preview;
        Gtk::HBox hpacker;
 
        static Glib::ustring persistent_folder;
 
-       Gtk::Entry found_entry;
-       Gtk::Button found_search_btn;
        Gtk::Notebook notebook;
 
        GainMeter* gm;
@@ -153,13 +170,19 @@ class SoundFileBrowser : public ArdourDialog
        sigc::connection metering_connection;
 
        void update_preview ();
+
        void found_list_view_selected ();
        void found_list_view_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn*);
        void found_search_clicked ();
 
+       void freesound_list_view_selected ();
+       void freesound_list_view_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn*);
+       void freesound_search_clicked ();
+       
        void chooser_file_activated ();
        
-       bool on_custom (const Gtk::FileFilter::Info& filter_info);
+       bool on_audio_filter (const Gtk::FileFilter::Info& filter_info);
+       bool on_midi_filter (const Gtk::FileFilter::Info& filter_info);
 
        virtual bool reset_options() { return true; }