diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-11-12 01:14:21 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-11-12 01:14:21 +0000 |
commit | 72d9f9df468981dc06536a51db8f92b79d429c58 (patch) | |
tree | 3bd92133a8b3cecfed8729022baf8b779e60f6b6 /gtk2_ardour/region_layering_order_editor.h | |
parent | e19ff50c2c37a0a68b0e3a99a5ff7c894d601a5f (diff) |
JAG's new region layer editor, tweaked by me to (a) hide editor if we click in a location with just 1 region under the mouse (b) automatically update to reflect playlist modification outside of the layering editor (c) add a clock and a track name to give a bit more context to the editor
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6067 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/region_layering_order_editor.h')
-rw-r--r-- | gtk2_ardour/region_layering_order_editor.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/gtk2_ardour/region_layering_order_editor.h b/gtk2_ardour/region_layering_order_editor.h new file mode 100644 index 0000000000..d8b76e951e --- /dev/null +++ b/gtk2_ardour/region_layering_order_editor.h @@ -0,0 +1,62 @@ +#ifndef __gtk2_ardour_region_layering_order_editor_h__ +#define __gtk2_ardour_region_layering_order_editor_h__ + +#include <gtkmm/dialog.h> +#include <gtkmm/liststore.h> +#include <gtkmm/treeview.h> +#include <gtkmm/scrolledwindow.h> + +#include <ardour/region.h> +#include <ardour/playlist.h> + +#include "ardour_dialog.h" +#include "audio_clock.h" + +class PublicEditor; + +namespace ARDOUR { + class Session; +} + +class RegionLayeringOrderEditor : public ArdourDialog +{ + public: + RegionLayeringOrderEditor (PublicEditor&); + virtual ~RegionLayeringOrderEditor (); + + void set_context(const std::string& name, ARDOUR::Session* s, const boost::shared_ptr<ARDOUR::Playlist> & pl, nframes64_t position); + void maybe_present (); + + protected: + virtual bool on_key_press_event (GdkEventKey* event); + + private: + boost::shared_ptr<ARDOUR::Playlist> playlist; + nframes64_t position; + bool in_row_change; + uint32_t regions_at_position; + + sigc::connection playlist_modified_connection; + + struct LayeringOrderColumns : public Gtk::TreeModel::ColumnRecord { + LayeringOrderColumns () { + add (name); + add (region); + } + Gtk::TreeModelColumn<std::string> name; + Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region; + }; + LayeringOrderColumns layering_order_columns; + Glib::RefPtr<Gtk::ListStore> layering_order_model; + Gtk::TreeView layering_order_display; + AudioClock clock; + Gtk::Label label; + Gtk::ScrolledWindow scroller; // Available layers + PublicEditor& the_editor; + + void row_clicked(); + void refill (); + void playlist_modified (); +}; + +#endif /* __gtk2_ardour_region_layering_order_editor_h__ */ |