2 Copyright (C) 2005 Paul Davis
3 Written by Taybin Rutkin
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #ifndef __ardour_sfdb_ui_h__
23 #define __ardour_sfdb_ui_h__
30 #include <sigc++/signal.h>
32 #include <gtkmm/box.h>
33 #include <gtkmm/button.h>
34 #include <gtkmm/checkbutton.h>
35 #include <gtkmm/dialog.h>
36 #include <gtkmm/entry.h>
37 #include <gtkmm/filechooserwidget.h>
38 #include <gtkmm/frame.h>
39 #include <gtkmm/label.h>
40 #include <gtkmm/liststore.h>
41 #include <gtkmm/treeview.h>
43 #include <ardour/session.h>
45 #include "ardour_dialog.h"
47 class SoundFileBox : public Gtk::VBox
50 SoundFileBox (ARDOUR::Session* session);
51 virtual ~SoundFileBox () {};
53 bool update (std::string filename);
56 struct LabelModelColumns : public Gtk::TreeModel::ColumnRecord
59 Gtk::TreeModelColumn<std::string> field;
60 Gtk::TreeModelColumn<std::string> data;
62 LabelModelColumns() { add(field); add(data); }
65 LabelModelColumns label_columns;
73 Gtk::Entry path_entry;
77 Gtk::Label samplerate;
79 Gtk::TreeView field_view;
80 Glib::RefPtr<Gtk::ListStore> fields;
81 std::string selected_field;
83 Gtk::Frame border_frame;
92 Gtk::Button add_field_btn;
93 Gtk::Button remove_field_btn;
95 // void fields_refiller (Gtk::CList &clist);
96 int setup_labels (std::string filename);
99 void play_btn_clicked ();
100 void stop_btn_clicked ();
101 void add_field_clicked ();
102 void remove_field_clicked ();
104 void field_selected ();
105 void audition_status_changed (bool state);
108 class SoundFileBrowser : public ArdourDialog
111 SoundFileBrowser (std::string title);
112 virtual ~SoundFileBrowser () {};
115 Gtk::FileChooserWidget chooser;
116 SoundFileBox preview;
118 void update_preview ();
121 class SoundFileChooser : public SoundFileBrowser
124 SoundFileChooser (std::string title);
125 virtual ~SoundFileChooser () {};
127 std::string get_filename () {return chooser.get_filename();};
130 class SoundFileOmega : public SoundFileBrowser
133 SoundFileOmega (std::string title);
134 virtual ~SoundFileOmega () {};
136 sigc::signal<void, std::vector<std::string>, bool> Embedded;
137 sigc::signal<void, std::vector<std::string>, bool> Imported;
140 Gtk::Button embed_btn;
141 Gtk::Button import_btn;
142 Gtk::CheckButton split_check;
144 void embed_clicked ();
145 void import_clicked ();
148 #endif // __ardour_sfdb_ui_h__