X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fregion_layering_order_editor.h;h=acdb1e59a512843298884afecc3940f5e34c380c;hb=04416e2d1df3cc8d9f014765e5ca5ce818b7b4d7;hp=10bcd989b78ec93d8c71b2e6689bd2fae96bd455;hpb=1c7ac48d53a2ee4f0a9235a7093da8cbada6d626;p=ardour.git diff --git a/gtk2_ardour/region_layering_order_editor.h b/gtk2_ardour/region_layering_order_editor.h index 10bcd989b7..acdb1e59a5 100644 --- a/gtk2_ardour/region_layering_order_editor.h +++ b/gtk2_ardour/region_layering_order_editor.h @@ -1,3 +1,22 @@ +/* + Copyright (C) 2011-2012 Paul Davis + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + #ifndef __gtk2_ardour_region_layering_order_editor_h__ #define __gtk2_ardour_region_layering_order_editor_h__ @@ -6,10 +25,10 @@ #include #include -#include -#include +#include "ardour/region.h" +#include "ardour/playlist.h" -#include "ardour_dialog.h" +#include "ardour_window.h" #include "audio_clock.h" class PublicEditor; @@ -18,33 +37,32 @@ namespace ARDOUR { class Session; } -class RegionLayeringOrderEditor : public ArdourDialog +class RegionLayeringOrderEditor : public ArdourWindow { public: RegionLayeringOrderEditor (PublicEditor&); virtual ~RegionLayeringOrderEditor (); - - void set_context(const std::string& name, ARDOUR::Session* s, const boost::shared_ptr & pl, ARDOUR::framepos_t position); + + void set_context (const std::string &, ARDOUR::Session *, TimeAxisView *, boost::shared_ptr, ARDOUR::framepos_t); void maybe_present (); - + protected: virtual bool on_key_press_event (GdkEventKey* event); private: - boost::shared_ptr playlist; - nframes64_t position; + framepos_t position; bool in_row_change; uint32_t regions_at_position; - + PBD::ScopedConnection playlist_modified_connection; struct LayeringOrderColumns : public Gtk::TreeModel::ColumnRecord { LayeringOrderColumns () { add (name); - add (region); + add (region_view); } Gtk::TreeModelColumn name; - Gtk::TreeModelColumn > region; + Gtk::TreeModelColumn region_view; }; LayeringOrderColumns layering_order_columns; Glib::RefPtr layering_order_model; @@ -55,6 +73,7 @@ class RegionLayeringOrderEditor : public ArdourDialog Gtk::Label clock_label; Gtk::ScrolledWindow scroller; // Available layers PublicEditor& editor; + TimeAxisView* _time_axis_view; void row_activated (const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column); void refill ();