2 Copyright (C) 2011-2012 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 #ifndef __gtk2_ardour_region_layering_order_editor_h__
21 #define __gtk2_ardour_region_layering_order_editor_h__
23 #include <gtkmm/dialog.h>
24 #include <gtkmm/liststore.h>
25 #include <gtkmm/treeview.h>
26 #include <gtkmm/scrolledwindow.h>
28 #include "ardour/region.h"
29 #include "ardour/playlist.h"
31 #include "ardour_window.h"
32 #include "audio_clock.h"
40 class RegionLayeringOrderEditor : public ArdourWindow
43 RegionLayeringOrderEditor (PublicEditor&);
44 virtual ~RegionLayeringOrderEditor ();
46 void set_context (const std::string &, ARDOUR::Session *, TimeAxisView *, boost::shared_ptr<ARDOUR::Playlist>, ARDOUR::framepos_t);
47 void maybe_present ();
50 virtual bool on_key_press_event (GdkEventKey* event);
55 uint32_t regions_at_position;
57 PBD::ScopedConnection playlist_modified_connection;
59 struct LayeringOrderColumns : public Gtk::TreeModel::ColumnRecord {
60 LayeringOrderColumns () {
64 Gtk::TreeModelColumn<std::string> name;
65 Gtk::TreeModelColumn<RegionView *> region_view;
67 LayeringOrderColumns layering_order_columns;
68 Glib::RefPtr<Gtk::ListStore> layering_order_model;
69 Gtk::TreeView layering_order_display;
71 Gtk::Label track_label;
72 Gtk::Label track_name_label;
73 Gtk::Label clock_label;
74 Gtk::ScrolledWindow scroller; // Available layers
76 TimeAxisView* _time_axis_view;
78 void row_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
80 void playlist_modified ();
83 #endif /* __gtk2_ardour_region_layering_order_editor_h__ */