Fix a couple of minor typos.
[ardour2.git] / gtk2_ardour / editor_snapshots.h
blob132c2f090cad211087700f4f4b88d291797c3f91
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, public ARDOUR::SessionHandlePtr
28 public:
29 EditorSnapshots (Editor *);
31 void set_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<std::string> visible_name;
49 Gtk::TreeModelColumn<std::string> 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, std::string);
60 void remove (std::string);
61 void rename (std::string);