Ardour  9.0-pre0-582-g084a23a80d
export_format_selector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2010 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2009 David Robillard <d@drobilla.net>
4  * Copyright (C) 2017-2018 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 <memory>
24 #include <string>
25 
26 #include <sigc++/signal.h>
27 
28 #include <gtkmm/box.h>
29 #include <gtkmm/button.h>
30 #include <gtkmm/combobox.h>
31 #include <gtkmm/liststore.h>
32 #include <gtkmm/treemodel.h>
33 
35 #include "ardour/session_handle.h"
36 
37 namespace ARDOUR {
38  class ExportFormatSpecification;
39  class ExportProfileManager;
40 }
41 
43 {
44 private:
45 
46  typedef std::shared_ptr<ARDOUR::ExportFormatSpecification> FormatPtr;
47  typedef std::list<FormatPtr> FormatList;
48 
49 public:
50 
53 
56 
57  sigc::signal<void, FormatPtr> FormatEdited;
58  sigc::signal<void, FormatPtr> FormatRemoved;
59  sigc::signal<FormatPtr, FormatPtr> NewFormat;
60  sigc::signal<void, FormatPtr> FormatReverted;
61 
62  /* Compatibility with other elements */
63 
64  sigc::signal<void> CriticalSelectionChanged;
65 
66 private:
67 
69  void add_new_format ();
70  void remove_format (bool called_from_button = false);
71  int open_edit_dialog (bool new_dialog = false);
74 
76 
77  /*** GUI components ***/
78 
80  {
81  public:
84 
85  FormatCols () { add (format); add (label); }
86  };
88  Glib::RefPtr<Gtk::ListStore> format_list;
90 
94 };
95 
std::shared_ptr< FormatState > FormatStatePtr
std::list< FormatPtr > FormatList
void update_format_description()
int open_edit_dialog(bool new_dialog=false)
ARDOUR::ExportProfileManager::FormatStatePtr state
std::shared_ptr< ARDOUR::ExportFormatSpecification > FormatPtr
Glib::RefPtr< Gtk::ListStore > format_list
sigc::signal< void, FormatPtr > FormatRemoved
sigc::signal< void, FormatPtr > FormatEdited
void remove_format(bool called_from_button=false)
void select_format(FormatPtr f)
sigc::signal< void > CriticalSelectionChanged
void set_state(ARDOUR::ExportProfileManager::FormatStatePtr state_, ARDOUR::Session *session_)
sigc::signal< void, FormatPtr > FormatReverted
sigc::signal< FormatPtr, FormatPtr > NewFormat
void add(TreeModelColumnBase &column)
Gtk::TreeModelColumn< std::string > label
Gtk::TreeModelColumn< FormatPtr > format