Ardour  9.0-pre0-582-g084a23a80d
export_preset_selector.h
Go to the documentation of this file.
1 /*
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>
5  *
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.
10  *
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.
15  *
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.
19  */
20 
21 #pragma once
22 
23 #include <sigc++/signal.h>
24 
25 #include <gtkmm/box.h>
26 #include <gtkmm/button.h>
27 #include <gtkmm/comboboxtext.h>
28 #include <gtkmm/label.h>
29 #include <gtkmm/liststore.h>
30 #include <gtkmm/treemodel.h>
31 
33 
35 {
36 public:
37  ExportPresetSelector (bool readonly = false);
38 
39  void set_manager (std::shared_ptr<ARDOUR::ExportProfileManager> manager);
40 
41  sigc::signal<void> CriticalSelectionChanged;
42 
43  Gtk::ComboBox& the_combo () { return combo; }
44 
45 private:
46  typedef std::shared_ptr<ARDOUR::ExportProfileManager> ManagerPtr;
49 
52  void create_new ();
53  void save_current ();
54  void remove_current ();
56 
58 
60  public:
63 
65  {
66  add (label);
67  add (preset);
68  }
69  };
70 
72  Glib::RefPtr<Gtk::ListStore> list;
75 
78 
82 
83  sigc::connection select_connection;
84 };
85 
std::list< ExportPresetPtr > PresetList
Glib::RefPtr< Gtk::ListStore > list
ARDOUR::ExportProfileManager::PresetList PresetList
ARDOUR::ExportPresetPtr PresetPtr
void set_manager(std::shared_ptr< ARDOUR::ExportProfileManager > manager)
ExportPresetSelector(bool readonly=false)
std::shared_ptr< ARDOUR::ExportProfileManager > ManagerPtr
sigc::signal< void > CriticalSelectionChanged
sigc::connection select_connection
Gtk::ComboBox & the_combo()
void add(TreeModelColumnBase &column)
std::shared_ptr< ExportPreset > ExportPresetPtr
Gtk::TreeModelColumn< PresetPtr > preset
Gtk::TreeModelColumn< std::string > label