Remove idiocy.
[ardour2.git] / gtk2_ardour / editor_snapshots.h
blob1a17e6de3016931a8379e9e578f330bb16f0399e
1 /*
2 Copyright (C) 2000-2009 Paul Davis
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.
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.
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.
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"
26 class EditorSnapshots : public EditorComponent
28 public:
29 EditorSnapshots (Editor *);
31 void connect_to_session (ARDOUR::Session *);
33 Gtk::Widget& widget () {
34 return _scroller;
37 void redisplay ();
39 private:
41 Gtk::ScrolledWindow _scroller;
43 struct Columns : public Gtk::TreeModel::ColumnRecord {
44 Columns () {
45 add (visible_name);
46 add (real_name);
48 Gtk::TreeModelColumn<Glib::ustring> visible_name;
49 Gtk::TreeModelColumn<Glib::ustring> real_name;
52 Columns _columns;
53 Glib::RefPtr<Gtk::ListStore> _model;
54 Gtk::TreeView _display;
55 Gtk::Menu _menu;
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);