2 Copyright (C) 2000-2010 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __gtk_ardour_search_path_option_h__
21 #define __gtk_ardour_search_path_option_h__
25 #include <gtkmm/filechooserbutton.h>
26 #include <gtkmm/entry.h>
27 #include <gtkmm/button.h>
28 #include <gtkmm/box.h>
30 #include "option_editor.h"
32 class SearchPathOption : public Option
35 SearchPathOption (const std::string& pathname, const std::string& label,
36 const std::string& default_path,
37 sigc::slot<std::string>, sigc::slot<bool, std::string>);
40 void set_state_from_config ();
41 void add_to_page (OptionEditorPage*);
44 Gtk::Widget& tip_widget() { return add_chooser; }
47 sigc::slot<std::string> _get; ///< slot to get the configuration variable's value
48 sigc::slot<bool, std::string> _set; ///< slot to set the configuration variable's value
51 PathEntry (const std::string& path, bool removable=true);
54 Gtk::Button remove_button;
60 std::list<PathEntry*> paths;
61 Gtk::FileChooserButton add_chooser;
64 Gtk::Label session_label;
66 void add_path (const std::string& path, bool removable=true);
67 void remove_path (PathEntry*);
72 #endif /* __gtk_ardour_search_path_option_h__ */