2 * Copyright (C) 2010-2012 Carl Hetherington <carl@carlh.net>
3 * Copyright (C) 2010-2017 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2011 David Robillard <d@drobilla.net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __gtk2_ardour_region_layering_order_editor_h__
22 #define __gtk2_ardour_region_layering_order_editor_h__
24 #include <gtkmm/dialog.h>
25 #include <gtkmm/liststore.h>
26 #include <gtkmm/treeview.h>
27 #include <gtkmm/scrolledwindow.h>
29 #include "ardour/region.h"
30 #include "ardour/playlist.h"
32 #include "ardour_window.h"
33 #include "audio_clock.h"
41 class RegionLayeringOrderEditor : public ArdourWindow
44 RegionLayeringOrderEditor (PublicEditor&);
45 virtual ~RegionLayeringOrderEditor ();
47 void set_context (const std::string &, ARDOUR::Session *, TimeAxisView *, boost::shared_ptr<ARDOUR::Playlist>, ARDOUR::samplepos_t);
48 void maybe_present ();
51 virtual bool on_key_press_event (GdkEventKey* event);
56 uint32_t regions_at_position;
58 PBD::ScopedConnection playlist_modified_connection;
60 struct LayeringOrderColumns : public Gtk::TreeModel::ColumnRecord {
61 LayeringOrderColumns () {
65 Gtk::TreeModelColumn<std::string> name;
66 Gtk::TreeModelColumn<RegionView *> region_view;
68 LayeringOrderColumns layering_order_columns;
69 Glib::RefPtr<Gtk::ListStore> layering_order_model;
70 Gtk::TreeView layering_order_display;
72 Gtk::Label track_label;
73 Gtk::Label track_name_label;
74 Gtk::Label clock_label;
75 Gtk::ScrolledWindow scroller; // Available layers
77 TimeAxisView* _time_axis_view;
81 void playlist_modified ();
84 #endif /* __gtk2_ardour_region_layering_order_editor_h__ */