2009-07-03 14:39:25 -04:00
|
|
|
/*
|
2009-10-14 12:10:01 -04:00
|
|
|
Copyright (C) 2000-2009 Paul Davis
|
2009-07-03 14:39:25 -04: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.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
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 ();
|
2010-08-26 19:25:44 -04:00
|
|
|
Gtk::ToggleButton& all_group_active_button() { return _all_group_active_button; }
|
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
|
|
|
|
2009-07-03 14:37:15 -04:00
|
|
|
struct Columns : public Gtk::TreeModel::ColumnRecord {
|
|
|
|
|
|
|
|
Columns () {
|
|
|
|
add (is_visible);
|
|
|
|
add (gain);
|
|
|
|
add (record);
|
|
|
|
add (mute);
|
|
|
|
add (solo);
|
|
|
|
add (select);
|
|
|
|
add (edits);
|
|
|
|
add (text);
|
|
|
|
add (routegroup);
|
|
|
|
}
|
|
|
|
|
|
|
|
Gtk::TreeModelColumn<bool> is_visible;
|
|
|
|
Gtk::TreeModelColumn<bool> gain;
|
|
|
|
Gtk::TreeModelColumn<bool> record;
|
|
|
|
Gtk::TreeModelColumn<bool> mute;
|
|
|
|
Gtk::TreeModelColumn<bool> solo;
|
|
|
|
Gtk::TreeModelColumn<bool> select;
|
|
|
|
Gtk::TreeModelColumn<bool> edits;
|
|
|
|
Gtk::TreeModelColumn<std::string> text;
|
|
|
|
Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
|
|
|
|
};
|
|
|
|
|
|
|
|
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&);
|
|
|
|
void name_edit (const Glib::ustring&, const Glib::ustring&);
|
|
|
|
void button_clicked ();
|
|
|
|
gint button_press_event (GdkEventButton* ev);
|
|
|
|
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 ();
|
2010-08-30 13:34:12 -04:00
|
|
|
void all_group_toggled();
|
2010-08-30 14:08:41 -04:00
|
|
|
void all_group_changed (const PBD::PropertyChange&);
|
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;
|
|
|
|
Gtk::ToggleButton _all_group_active_button;
|
2009-07-03 14:37:15 -04:00
|
|
|
bool _in_row_change;
|
2010-04-01 20:21:08 -04:00
|
|
|
PBD::ScopedConnection property_changed_connection;
|
2009-07-03 14:37:15 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|