2009-07-03 14:39:25 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2009-2012 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2017 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.
|
|
|
|
*/
|
2009-07-03 14:39:25 -04:00
|
|
|
|
2015-12-07 17:08:19 -05:00
|
|
|
#ifndef __gtk_ardour_editor_route_groups_h__
|
|
|
|
#define __gtk_ardour_editor_route_groups_h__
|
|
|
|
|
2017-07-16 21:48:18 -04:00
|
|
|
#include <gtkmm/liststore.h>
|
|
|
|
#include <gtkmm/scrolledwindow.h>
|
|
|
|
#include <gtkmm/treemodel.h>
|
|
|
|
#include <gtkmm/treeview.h>
|
|
|
|
|
2009-07-03 14:37:15 -04:00
|
|
|
#include "editor_component.h"
|
|
|
|
|
2010-07-19 17:47:07 -04:00
|
|
|
class EditorRouteGroups : public EditorComponent, public ARDOUR::SessionHandlePtr
|
2009-07-03 14:37:15 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
EditorRouteGroups (Editor *);
|
|
|
|
|
2009-12-17 13:24:23 -05:00
|
|
|
void set_session (ARDOUR::Session *);
|
2009-07-03 14:37:15 -04:00
|
|
|
|
|
|
|
Gtk::Widget& widget () {
|
2010-08-26 19:25:44 -04:00
|
|
|
return _display_packer;
|
2009-07-03 14:37:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void clear ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-07-03 14:37:15 -04:00
|
|
|
private:
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2017-07-01 12:42:24 -04:00
|
|
|
struct Columns : public Gtk::TreeModel::ColumnRecord {
|
2009-07-03 14:37:15 -04:00
|
|
|
|
2017-07-01 12:42:24 -04:00
|
|
|
Columns () {
|
2011-12-06 21:04:36 -05:00
|
|
|
add (gdkcolor);
|
2011-07-12 19:41:19 -04:00
|
|
|
add (text);
|
2011-12-06 21:04:36 -05:00
|
|
|
add (is_visible);
|
2009-07-03 14:37:15 -04:00
|
|
|
add (gain);
|
2011-07-12 19:41:19 -04:00
|
|
|
add (gain_relative);
|
2009-07-03 14:37:15 -04:00
|
|
|
add (mute);
|
|
|
|
add (solo);
|
2011-07-12 19:41:19 -04:00
|
|
|
add (record);
|
2011-12-06 11:46:50 -05:00
|
|
|
add (monitoring);
|
2009-07-03 14:37:15 -04:00
|
|
|
add (select);
|
2011-12-06 22:22:35 -05:00
|
|
|
add (active_shared);
|
2011-07-12 19:41:19 -04:00
|
|
|
add (active_state);
|
2009-07-03 14:37:15 -04:00
|
|
|
add (routegroup);
|
2017-07-01 12:42:24 -04:00
|
|
|
}
|
2009-07-03 14:37:15 -04:00
|
|
|
|
2017-07-01 12:42:24 -04:00
|
|
|
Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
|
|
|
|
Gtk::TreeModelColumn<std::string> text;
|
|
|
|
Gtk::TreeModelColumn<bool> is_visible;
|
2009-07-03 14:37:15 -04:00
|
|
|
Gtk::TreeModelColumn<bool> gain;
|
2011-07-12 19:41:19 -04:00
|
|
|
Gtk::TreeModelColumn<bool> gain_relative;
|
2009-07-03 14:37:15 -04:00
|
|
|
Gtk::TreeModelColumn<bool> mute;
|
|
|
|
Gtk::TreeModelColumn<bool> solo;
|
2011-07-12 19:41:19 -04:00
|
|
|
Gtk::TreeModelColumn<bool> record;
|
2011-12-06 11:46:50 -05:00
|
|
|
Gtk::TreeModelColumn<bool> monitoring;
|
2009-07-03 14:37:15 -04:00
|
|
|
Gtk::TreeModelColumn<bool> select;
|
2011-12-06 22:22:35 -05:00
|
|
|
Gtk::TreeModelColumn<bool> active_shared;
|
2011-07-12 19:41:19 -04:00
|
|
|
Gtk::TreeModelColumn<bool> active_state;
|
2017-07-01 12:42:24 -04:00
|
|
|
Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
|
2009-07-03 14:37:15 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
Columns _columns;
|
|
|
|
|
2010-07-19 17:47:07 -04:00
|
|
|
void add (ARDOUR::RouteGroup *);
|
2009-07-03 14:37:15 -04:00
|
|
|
void row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
|
2010-09-14 12:51:02 -04:00
|
|
|
void name_edit (const std::string&, const std::string&);
|
2009-07-03 14:37:15 -04:00
|
|
|
void button_clicked ();
|
2011-12-06 11:46:50 -05:00
|
|
|
bool button_press_event (GdkEventButton* ev);
|
2009-07-03 14:37:15 -04:00
|
|
|
void groups_changed ();
|
2010-04-01 20:21:08 -04:00
|
|
|
void property_changed (ARDOUR::RouteGroup*, const PBD::PropertyChange &);
|
2009-07-03 14:37:15 -04:00
|
|
|
void remove_selected ();
|
2010-07-19 17:47:07 -04:00
|
|
|
void run_new_group_dialog ();
|
2011-04-19 11:46:47 -04:00
|
|
|
void row_deleted (Gtk::TreeModel::Path const &);
|
2009-07-03 14:37:15 -04:00
|
|
|
|
|
|
|
Glib::RefPtr<Gtk::ListStore> _model;
|
|
|
|
Glib::RefPtr<Gtk::TreeSelection> _selection;
|
|
|
|
Gtk::TreeView _display;
|
|
|
|
Gtk::ScrolledWindow _scroller;
|
2010-08-26 19:25:44 -04:00
|
|
|
Gtk::VBox _display_packer;
|
2009-07-03 14:37:15 -04:00
|
|
|
bool _in_row_change;
|
2011-04-19 11:46:47 -04:00
|
|
|
bool _in_rebuild;
|
2011-04-05 20:36:36 -04:00
|
|
|
PBD::ScopedConnectionList _property_changed_connections;
|
|
|
|
PBD::ScopedConnection all_route_groups_changed_connection;
|
2011-12-06 16:43:57 -05:00
|
|
|
Gtk::ColorSelectionDialog color_dialog;
|
2009-07-03 14:37:15 -04:00
|
|
|
};
|
|
|
|
|
2015-12-07 17:08:19 -05:00
|
|
|
#endif // __gtk_ardour_editor_route_groups_h__
|