Ardour  9.0-pre0-822-g12e3bc5c20
editor_route_groups.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2009-2012 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2017 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 <ytkmm/box.h>
24 #include <ytkmm/colorselection.h>
25 #include <ytkmm/liststore.h>
26 #include <ytkmm/scrolledwindow.h>
27 #include <ytkmm/treemodel.h>
28 #include <ytkmm/treeview.h>
29 
30 #include "editor_component.h"
31 
32 #include "ardour/route_group.h"
33 #include "ardour/session_handle.h"
34 
36 {
37 public:
39 
41 
42  Gtk::Widget& widget () {
43  return _display_packer;
44  }
45 
46  void clear ();
47 
48 private:
49 
50  struct Columns : public Gtk::TreeModel::ColumnRecord {
51 
52  Columns () {
53  add (gdkcolor);
54  add (text);
55  add (is_visible);
56  add (gain);
58  add (mute);
59  add (solo);
60  add (record);
61  add (monitoring);
62  add (select);
64  add (active_state);
65  add (routegroup);
66  }
67 
68  Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
69  Gtk::TreeModelColumn<std::string> text;
70  Gtk::TreeModelColumn<bool> is_visible;
71  Gtk::TreeModelColumn<bool> gain;
72  Gtk::TreeModelColumn<bool> gain_relative;
73  Gtk::TreeModelColumn<bool> mute;
74  Gtk::TreeModelColumn<bool> solo;
75  Gtk::TreeModelColumn<bool> record;
76  Gtk::TreeModelColumn<bool> monitoring;
77  Gtk::TreeModelColumn<bool> select;
78  Gtk::TreeModelColumn<bool> active_shared;
79  Gtk::TreeModelColumn<bool> active_state;
80  Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
81  };
82 
84 
86  void row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
87  void name_edit (const std::string&, const std::string&);
88  void button_clicked ();
89  bool button_press_event (GdkEventButton* ev);
90  void groups_changed ();
92  void remove_selected ();
94  void row_deleted (Gtk::TreeModel::Path const &);
95 
96  Glib::RefPtr<Gtk::ListStore> _model;
97  Glib::RefPtr<Gtk::TreeSelection> _selection;
98  Gtk::TreeView _display;
99  Gtk::ScrolledWindow _scroller;
100  Gtk::VBox _display_packer;
105  Gtk::ColorSelectionDialog color_dialog;
106 };
107 
PBD::ScopedConnection all_route_groups_changed_connection
void add(ARDOUR::RouteGroup *)
Gtk::ScrolledWindow _scroller
void row_deleted(Gtk::TreeModel::Path const &)
void run_new_group_dialog()
EditorRouteGroups(Editor *)
Glib::RefPtr< Gtk::ListStore > _model
void property_changed(ARDOUR::RouteGroup *, const PBD::PropertyChange &)
PBD::ScopedConnectionList _property_changed_connections
Glib::RefPtr< Gtk::TreeSelection > _selection
Gtk::ColorSelectionDialog color_dialog
Gtk::TreeView _display
void name_edit(const std::string &, const std::string &)
Gtk::Widget & widget()
void row_change(const Gtk::TreeModel::Path &, const Gtk::TreeModel::iterator &)
void set_session(ARDOUR::Session *)
bool button_press_event(GdkEventButton *ev)
Definition: editor.h:159
Gtk::TreeModelColumn< bool > gain
Gtk::TreeModelColumn< bool > gain_relative
Gtk::TreeModelColumn< std::string > text
Gtk::TreeModelColumn< bool > record
Gtk::TreeModelColumn< bool > active_state
Gtk::TreeModelColumn< Gdk::Color > gdkcolor
Gtk::TreeModelColumn< bool > solo
Gtk::TreeModelColumn< bool > active_shared
Gtk::TreeModelColumn< bool > select
Gtk::TreeModelColumn< ARDOUR::RouteGroup * > routegroup
Gtk::TreeModelColumn< bool > mute
Gtk::TreeModelColumn< bool > is_visible
Gtk::TreeModelColumn< bool > monitoring