2008-09-17 08:56:00 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2008-2010 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2009 David Robillard <d@drobilla.net>
|
|
|
|
* Copyright (C) 2017-2018 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2008-09-17 08:56:00 -04:00
|
|
|
|
|
|
|
#ifndef __export_format_selector_h__
|
|
|
|
#define __export_format_selector_h__
|
|
|
|
|
2023-02-16 12:59:41 -05:00
|
|
|
#include <memory>
|
2010-09-14 11:45:21 -04:00
|
|
|
#include <string>
|
2023-02-16 12:59:41 -05:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
#include <sigc++/signal.h>
|
|
|
|
|
2017-07-16 21:48:18 -04:00
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/button.h>
|
|
|
|
#include <gtkmm/combobox.h>
|
|
|
|
#include <gtkmm/liststore.h>
|
|
|
|
#include <gtkmm/treemodel.h>
|
|
|
|
|
2010-09-14 11:45:21 -04:00
|
|
|
#include "ardour/export_profile_manager.h"
|
2009-12-17 13:24:23 -05:00
|
|
|
#include "ardour/session_handle.h"
|
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
namespace ARDOUR {
|
|
|
|
class ExportFormatSpecification;
|
|
|
|
class ExportProfileManager;
|
|
|
|
}
|
|
|
|
|
2009-12-17 13:24:23 -05:00
|
|
|
class ExportFormatSelector : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2008-09-17 08:56:00 -04:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
typedef std::shared_ptr<ARDOUR::ExportFormatSpecification> FormatPtr;
|
2008-09-17 08:56:00 -04:00
|
|
|
typedef std::list<FormatPtr> FormatList;
|
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2008-09-17 08:56:00 -04:00
|
|
|
|
|
|
|
ExportFormatSelector ();
|
|
|
|
~ExportFormatSelector ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
void set_state (ARDOUR::ExportProfileManager::FormatStatePtr state_, ARDOUR::Session * session_);
|
|
|
|
void update_format_list ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
sigc::signal<void, FormatPtr> FormatEdited;
|
|
|
|
sigc::signal<void, FormatPtr> FormatRemoved;
|
|
|
|
sigc::signal<FormatPtr, FormatPtr> NewFormat;
|
2018-11-21 17:21:13 -05:00
|
|
|
sigc::signal<void, FormatPtr> FormatReverted;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
/* Compatibility with other elements */
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
sigc::signal<void> CriticalSelectionChanged;
|
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2008-09-17 08:56:00 -04:00
|
|
|
|
|
|
|
void select_format (FormatPtr f);
|
|
|
|
void add_new_format ();
|
2013-06-19 12:52:06 -04:00
|
|
|
void remove_format (bool called_from_button = false);
|
2008-09-17 08:56:00 -04:00
|
|
|
int open_edit_dialog (bool new_dialog = false);
|
|
|
|
void update_format_combo ();
|
|
|
|
void update_format_description ();
|
|
|
|
|
|
|
|
ARDOUR::ExportProfileManager::FormatStatePtr state;
|
|
|
|
|
Fix typos in gtk2_ardour/ directory
Found via `codespell -q 3 -S *.po,./share/patchfiles,./libs -L ba,buss,busses,doubleclick,hsi,ontop,ro,seh,siz,sur,te,trough,ue`
2022-01-26 12:35:38 -05:00
|
|
|
/*** GUI components ***/
|
2008-09-17 08:56:00 -04:00
|
|
|
|
|
|
|
struct FormatCols : public Gtk::TreeModelColumnRecord
|
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2008-09-17 08:56:00 -04:00
|
|
|
Gtk::TreeModelColumn<FormatPtr> format;
|
2010-09-14 11:45:21 -04:00
|
|
|
Gtk::TreeModelColumn<std::string> label;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
FormatCols () { add (format); add (label); }
|
|
|
|
};
|
|
|
|
FormatCols format_cols;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> format_list;
|
|
|
|
Gtk::ComboBox format_combo;
|
|
|
|
|
|
|
|
Gtk::Button edit_button;
|
|
|
|
Gtk::Button remove_button;
|
|
|
|
Gtk::Button new_button;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __export_format_selector_h__ */
|