2 * Copyright (C) 2008-2011 Sakari Bergen <sakari.bergen@beatwaves.net>
3 * Copyright (C) 2009 David Robillard <d@drobilla.net>
4 * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __export_preset_selector_h__
22 #define __export_preset_selector_h__
24 #include <sigc++/signal.h>
26 #include <gtkmm/box.h>
27 #include <gtkmm/button.h>
28 #include <gtkmm/comboboxentry.h>
29 #include <gtkmm/label.h>
30 #include <gtkmm/liststore.h>
31 #include <gtkmm/treemodel.h>
33 #include "ardour/export_profile_manager.h"
35 class ExportPresetSelector : public Gtk::HBox
39 ExportPresetSelector ();
41 void set_manager (boost::shared_ptr<ARDOUR::ExportProfileManager> manager);
43 sigc::signal<void> CriticalSelectionChanged;
47 typedef boost::shared_ptr<ARDOUR::ExportProfileManager> ManagerPtr;
48 typedef ARDOUR::ExportPresetPtr PresetPtr;
49 typedef ARDOUR::ExportProfileManager::PresetList PresetList;
51 ManagerPtr profile_manager;
52 sigc::connection select_connection;
54 void sync_with_manager ();
55 void update_selection ();
58 void remove_current ();
60 struct PresetCols : public Gtk::TreeModelColumnRecord
63 Gtk::TreeModelColumn<PresetPtr> preset;
64 Gtk::TreeModelColumn<std::string> label;
66 PresetCols () { add (preset); add (label); }
69 Glib::RefPtr<Gtk::ListStore> list;
74 Gtk::ComboBoxEntry entry;
76 Gtk::Button save_button;
77 Gtk::Button remove_button;
78 Gtk::Button new_button;