ardour
editor_snapshots.h
Go to the documentation of this file.
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 
27 {
28 public:
30 
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<std::string> visible_name;
49  Gtk::TreeModelColumn<std::string> real_name;
50  };
51 
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, std::string);
60  void remove (std::string);
61  void rename (std::string);
62 };
Gtk::TreeView _display
void rename(std::string)
void popup_context_menu(int, int32_t, std::string)
Gtk::TreeModelColumn< std::string > real_name
Glib::RefPtr< Gtk::ListStore > _model
Definition: editor.h:134
EditorSnapshots(Editor *)
Gtk::Widget & widget()
Gtk::ScrolledWindow _scroller
void set_session(ARDOUR::Session *)
bool button_press(GdkEventButton *)
Gtk::TreeModelColumn< std::string > visible_name