Remove erroneous assert which I added earlier.
[ardour2.git] / gtk2_ardour / region_layering_order_editor.h
blob783d05804cfb9b6a8c5b1108abda5dfa68dfb799
1 #ifndef __gtk2_ardour_region_layering_order_editor_h__
2 #define __gtk2_ardour_region_layering_order_editor_h__
4 #include <gtkmm/dialog.h>
5 #include <gtkmm/liststore.h>
6 #include <gtkmm/treeview.h>
7 #include <gtkmm/scrolledwindow.h>
9 #include "ardour/region.h"
10 #include "ardour/playlist.h"
12 #include "ardour_dialog.h"
13 #include "audio_clock.h"
15 class PublicEditor;
17 namespace ARDOUR {
18 class Session;
21 class RegionLayeringOrderEditor : public ArdourDialog
23 public:
24 RegionLayeringOrderEditor (PublicEditor&);
25 virtual ~RegionLayeringOrderEditor ();
27 void set_context(const std::string& name, ARDOUR::Session* s, const boost::shared_ptr<ARDOUR::Playlist> & pl, ARDOUR::framepos_t position);
28 void maybe_present ();
30 protected:
31 virtual bool on_key_press_event (GdkEventKey* event);
33 private:
34 boost::shared_ptr<ARDOUR::Playlist> playlist;
35 framepos_t position;
36 bool in_row_change;
37 uint32_t regions_at_position;
39 PBD::ScopedConnection playlist_modified_connection;
41 struct LayeringOrderColumns : public Gtk::TreeModel::ColumnRecord {
42 LayeringOrderColumns () {
43 add (name);
44 add (region);
46 Gtk::TreeModelColumn<std::string> name;
47 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region;
49 LayeringOrderColumns layering_order_columns;
50 Glib::RefPtr<Gtk::ListStore> layering_order_model;
51 Gtk::TreeView layering_order_display;
52 AudioClock clock;
53 Gtk::Label track_label;
54 Gtk::Label track_name_label;
55 Gtk::Label clock_label;
56 Gtk::ScrolledWindow scroller; // Available layers
57 PublicEditor& editor;
59 void row_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
60 void refill ();
61 void playlist_modified ();
64 #endif /* __gtk2_ardour_region_layering_order_editor_h__ */