2009-07-03 18:39:25 +00:00
|
|
|
/*
|
2009-10-14 16:10:01 +00:00
|
|
|
Copyright (C) 2000-2009 Paul Davis
|
2009-07-03 18:39:25 +00:00
|
|
|
|
|
|
|
|
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
2011-09-19 21:14:59 +00:00
|
|
|
#include "gtkmm2ext/stateful_button.h"
|
2009-07-03 18:37:15 +00:00
|
|
|
#include "editor_component.h"
|
|
|
|
|
|
2010-07-19 21:47:07 +00:00
|
|
|
class EditorRouteGroups : public EditorComponent, public ARDOUR::SessionHandlePtr
|
2009-07-03 18:37:15 +00:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
EditorRouteGroups (Editor *);
|
|
|
|
|
|
2009-12-17 18:24:23 +00:00
|
|
|
void set_session (ARDOUR::Session *);
|
2009-07-03 18:37:15 +00:00
|
|
|
|
|
|
|
|
Gtk::Widget& widget () {
|
2010-08-26 23:25:44 +00:00
|
|
|
return _display_packer;
|
2009-07-03 18:37:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void clear ();
|
2011-09-19 21:14:59 +00:00
|
|
|
Gtkmm2ext::StatefulToggleButton& all_group_active_button() { return _all_group_active_button; }
|
2009-10-14 16:10:01 +00:00
|
|
|
|
2009-07-03 18:37:15 +00:00
|
|
|
private:
|
2009-10-14 16:10:01 +00:00
|
|
|
|
2009-07-03 18:37:15 +00:00
|
|
|
struct Columns : public Gtk::TreeModel::ColumnRecord {
|
|
|
|
|
|
|
|
|
|
Columns () {
|
2011-12-07 02:04:36 +00:00
|
|
|
add (gdkcolor);
|
2011-07-12 23:41:19 +00:00
|
|
|
add (text);
|
2011-12-07 02:04:36 +00:00
|
|
|
add (is_visible);
|
2009-07-03 18:37:15 +00:00
|
|
|
add (gain);
|
2011-07-12 23:41:19 +00:00
|
|
|
add (gain_relative);
|
2009-07-03 18:37:15 +00:00
|
|
|
add (mute);
|
|
|
|
|
add (solo);
|
2011-07-12 23:41:19 +00:00
|
|
|
add (record);
|
2011-12-06 16:46:50 +00:00
|
|
|
add (monitoring);
|
2009-07-03 18:37:15 +00:00
|
|
|
add (select);
|
2011-12-07 03:22:35 +00:00
|
|
|
add (active_shared);
|
2011-07-12 23:41:19 +00:00
|
|
|
add (active_state);
|
2009-07-03 18:37:15 +00:00
|
|
|
add (routegroup);
|
|
|
|
|
}
|
|
|
|
|
|
2011-12-07 02:04:36 +00:00
|
|
|
Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
|
2011-07-12 23:41:19 +00:00
|
|
|
Gtk::TreeModelColumn<std::string> text;
|
2011-12-07 02:04:36 +00:00
|
|
|
Gtk::TreeModelColumn<bool> is_visible;
|
2009-07-03 18:37:15 +00:00
|
|
|
Gtk::TreeModelColumn<bool> gain;
|
2011-07-12 23:41:19 +00:00
|
|
|
Gtk::TreeModelColumn<bool> gain_relative;
|
2009-07-03 18:37:15 +00:00
|
|
|
Gtk::TreeModelColumn<bool> mute;
|
|
|
|
|
Gtk::TreeModelColumn<bool> solo;
|
2011-07-12 23:41:19 +00:00
|
|
|
Gtk::TreeModelColumn<bool> record;
|
2011-12-06 16:46:50 +00:00
|
|
|
Gtk::TreeModelColumn<bool> monitoring;
|
2009-07-03 18:37:15 +00:00
|
|
|
Gtk::TreeModelColumn<bool> select;
|
2011-12-07 03:22:35 +00:00
|
|
|
Gtk::TreeModelColumn<bool> active_shared;
|
2011-07-12 23:41:19 +00:00
|
|
|
Gtk::TreeModelColumn<bool> active_state;
|
2009-07-03 18:37:15 +00:00
|
|
|
Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Columns _columns;
|
|
|
|
|
|
2010-07-19 21:47:07 +00:00
|
|
|
void add (ARDOUR::RouteGroup *);
|
2009-07-03 18:37:15 +00:00
|
|
|
void row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
|
2010-09-14 16:51:02 +00:00
|
|
|
void name_edit (const std::string&, const std::string&);
|
2009-07-03 18:37:15 +00:00
|
|
|
void button_clicked ();
|
2011-12-06 16:46:50 +00:00
|
|
|
bool button_press_event (GdkEventButton* ev);
|
2009-07-03 18:37:15 +00:00
|
|
|
void groups_changed ();
|
2010-04-02 00:21:08 +00:00
|
|
|
void property_changed (ARDOUR::RouteGroup*, const PBD::PropertyChange &);
|
2009-07-03 18:37:15 +00:00
|
|
|
void remove_selected ();
|
2010-07-19 21:47:07 +00:00
|
|
|
void run_new_group_dialog ();
|
2010-08-30 17:34:12 +00:00
|
|
|
void all_group_toggled();
|
2010-08-30 18:08:41 +00:00
|
|
|
void all_group_changed (const PBD::PropertyChange&);
|
2011-04-19 15:46:47 +00:00
|
|
|
void row_deleted (Gtk::TreeModel::Path const &);
|
2009-07-03 18:37:15 +00:00
|
|
|
|
|
|
|
|
Glib::RefPtr<Gtk::ListStore> _model;
|
|
|
|
|
Glib::RefPtr<Gtk::TreeSelection> _selection;
|
|
|
|
|
Gtk::TreeView _display;
|
|
|
|
|
Gtk::ScrolledWindow _scroller;
|
2010-08-26 23:25:44 +00:00
|
|
|
Gtk::VBox _display_packer;
|
2011-09-19 21:14:59 +00:00
|
|
|
Gtkmm2ext::StatefulToggleButton _all_group_active_button;
|
2009-07-03 18:37:15 +00:00
|
|
|
bool _in_row_change;
|
2011-04-19 15:46:47 +00:00
|
|
|
bool _in_rebuild;
|
2011-04-06 00:36:36 +00:00
|
|
|
PBD::ScopedConnectionList _property_changed_connections;
|
|
|
|
|
PBD::ScopedConnection all_route_groups_changed_connection;
|
2011-12-06 21:43:57 +00:00
|
|
|
Gtk::ColorSelectionDialog color_dialog;
|
2009-07-03 18:37:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|