X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gtk2_ardour%2Fsfdb_ui.h;h=15affab5706db414ec8cbc9340f803116615c4c3;hb=129ace60e24aa7b5297563d389edbae1d70a3a80;hp=52676c2d4bfe03e0cefe2a595ebc3161ce26b7be;hpb=e0aaed6d65f160c328cb8b56d7c6552ee15d65e2;p=ardour.git diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h index 52676c2d4b..15affab570 100644 --- a/gtk2_ardour/sfdb_ui.h +++ b/gtk2_ardour/sfdb_ui.h @@ -36,12 +36,14 @@ #include #include #include +#include -#include "ardour/session.h" #include "ardour/audiofilesource.h" +#include "ardour/session_handle.h" #include "ardour_dialog.h" #include "editing.h" +#include "audio_clock.h" namespace ARDOUR { class Session; @@ -49,12 +51,12 @@ namespace ARDOUR { class GainMeter; -class SoundFileBox : public Gtk::VBox +class SoundFileBox : public Gtk::VBox, public ARDOUR::SessionHandlePtr { public: SoundFileBox (bool persistent); virtual ~SoundFileBox () {}; - + void set_session (ARDOUR::Session* s); bool setup_labels (const Glib::ustring& filename); @@ -63,13 +65,12 @@ class SoundFileBox : public Gtk::VBox bool autoplay () const; protected: - ARDOUR::Session* _session; Glib::ustring path; - + ARDOUR::SoundFileInfo sf_info; - + Gtk::Table table; - + Gtk::Label length; Gtk::Label format; Gtk::Label channels; @@ -78,7 +79,7 @@ class SoundFileBox : public Gtk::VBox Gtk::Label channels_value; Gtk::Label samplerate_value; - + Gtk::Label format_text; AudioClock length_clock; AudioClock timecode_clock; @@ -87,11 +88,11 @@ class SoundFileBox : public Gtk::VBox Gtk::Label preview_label; Gtk::TextView tags_entry; - + Gtk::VBox main_box; Gtk::VBox path_box; Gtk::HBox bottom_box; - + Gtk::Button play_btn; Gtk::Button stop_btn; Gtk::CheckButton autoplay_btn; @@ -110,10 +111,10 @@ class SoundFileBrowser : public ArdourDialog { public: Gtk::TreeModelColumn pathname; - + FoundTagColumns() { add(pathname); } }; - + FoundTagColumns found_list_columns; Glib::RefPtr found_list; @@ -123,10 +124,10 @@ class SoundFileBrowser : public ArdourDialog public: SoundFileBrowser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, bool persistent); virtual ~SoundFileBrowser (); - + virtual void set_session (ARDOUR::Session*); std::vector get_paths (); - + void clear_selection (); Gtk::FileChooserWidget chooser; @@ -147,7 +148,7 @@ class SoundFileBrowser : public ArdourDialog protected: bool resetting_ourselves; - + Gtk::FileFilter audio_filter; Gtk::FileFilter midi_filter; Gtk::FileFilter custom_filter; @@ -176,9 +177,9 @@ class SoundFileBrowser : public ArdourDialog 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_audio_filter (const Gtk::FileFilter::Info& filter_info); bool on_midi_filter (const Gtk::FileFilter::Info& filter_info); @@ -194,7 +195,7 @@ class SoundFileChooser : public SoundFileBrowser public: SoundFileChooser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s = 0); virtual ~SoundFileChooser () {}; - + Glib::ustring get_filename (); protected: @@ -205,11 +206,11 @@ class SoundFileOmega : public SoundFileBrowser { public: - SoundFileOmega (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, int selected_tracks, bool persistent, + SoundFileOmega (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, int selected_tracks, bool persistent, Editing::ImportMode mode_hint = Editing::ImportAsTrack); - + void reset (int selected_tracks); - + Gtk::ComboBoxText action_combo; Gtk::ComboBoxText where_combo; Gtk::ComboBoxText channel_combo; @@ -237,10 +238,10 @@ class SoundFileOmega : public SoundFileBrowser Gtk::VBox block_three; Gtk::VBox block_four; - bool check_info (const std::vector& paths, + bool check_info (const std::vector& paths, bool& same_size, bool& src_needed, bool& multichannel); - static bool check_link_status (const ARDOUR::Session&, const std::vector& paths); + static bool check_link_status (const ARDOUR::Session*, const std::vector& paths); void file_selection_changed (); bool reset_options ();