X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fsfdb_ui.h;h=d1725ce8f3cc6909e503513c44814216398ce9ed;hb=9ab70fb55284537228577d575f15aa03949bd678;hp=d948d006b3255bc2d2eebaf2e48aae897e597a3c;hpb=6772e21f09ba65f479d525d8a64e910b9cc6a6d6;p=ardour.git diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h index d948d006b3..d1725ce8f3 100644 --- a/gtk2_ardour/sfdb_ui.h +++ b/gtk2_ardour/sfdb_ui.h @@ -25,22 +25,98 @@ #include #include +#include + #include #include #include #include #include +#include #include +#include +#include +#include +#include + +#include + +#include "ardour_dialog.h" -class SoundFileBrowser : public Gtk::Dialog +class SoundFileBox : public Gtk::VBox +{ + public: + SoundFileBox (); + virtual ~SoundFileBox () {}; + + 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: + Gtk::TreeModelColumn field; + Gtk::TreeModelColumn data; + + LabelModelColumns() { add(field); add(data); } + }; + + LabelModelColumns label_columns; + + SF_INFO sf_info; + + pid_t current_pid; + + Gtk::Label length; + Gtk::Label format; + Gtk::Label channels; + Gtk::Label samplerate; + + Gtk::TreeView field_view; + Glib::RefPtr fields; + std::string selected_field; + + Gtk::Frame border_frame; + + Gtk::VBox main_box; + Gtk::VBox path_box; + Gtk::HBox top_box; + Gtk::HBox bottom_box; + + Gtk::Button play_btn; + Gtk::Button stop_btn; + Gtk::Button add_field_btn; + Gtk::Button remove_field_btn; + + 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); - virtual ~SoundFileBrowser () {} + virtual ~SoundFileBrowser () {}; + virtual void set_session (ARDOUR::Session*); protected: Gtk::FileChooserWidget chooser; + SoundFileBox preview; + + void update_preview (); }; class SoundFileChooser : public SoundFileBrowser