Missing files.
[ardour.git] / gtk2_ardour / editor_snapshots.h
1 /*
2     Copyright (C) 2000-2009 Paul Davis 
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #include <gtkmm/widget.h>
21 #include <gtkmm/scrolledwindow.h>
22 #include <gtkmm/treemodel.h>
23 #include <gtkmm/treeview.h>
24 #include "editor_component.h"
25
26 class EditorSnapshots : public EditorComponent
27 {
28 public:
29         EditorSnapshots (Editor *);
30
31         void connect_to_session (ARDOUR::Session *);
32
33         Gtk::Widget& widget () {
34                 return _scroller;
35         }
36
37         void redisplay ();
38
39 private:
40         
41         Gtk::ScrolledWindow _scroller;
42         
43         struct Columns : public Gtk::TreeModel::ColumnRecord {
44                 Columns () { 
45                         add (visible_name);
46                         add (real_name);
47                 }
48                 Gtk::TreeModelColumn<Glib::ustring> visible_name;
49                 Gtk::TreeModelColumn<Glib::ustring> real_name;
50         };
51
52         Columns _columns;
53         Glib::RefPtr<Gtk::ListStore> _model;
54         Gtk::TreeView _display;
55         Gtk::Menu _menu;
56
57         bool button_press (GdkEventButton *);
58         void selection_changed ();
59         void popup_context_menu (int, int32_t, Glib::ustring);
60         void remove (Glib::ustring);
61         void rename (Glib::ustring);
62 };