2012-01-23 20:31:42 -05:00
|
|
|
/*
|
|
|
|
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.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2010-08-25 15:37:54 -04:00
|
|
|
#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>
|
|
|
|
|
2010-10-04 20:25:57 -04:00
|
|
|
#include "ardour/region.h"
|
|
|
|
#include "ardour/playlist.h"
|
2010-08-25 15:37:54 -04:00
|
|
|
|
2011-11-18 19:56:35 -05:00
|
|
|
#include "ardour_window.h"
|
2010-08-25 15:37:54 -04:00
|
|
|
#include "audio_clock.h"
|
|
|
|
|
|
|
|
class PublicEditor;
|
|
|
|
|
|
|
|
namespace ARDOUR {
|
|
|
|
class Session;
|
|
|
|
}
|
|
|
|
|
2011-11-18 19:56:35 -05:00
|
|
|
class RegionLayeringOrderEditor : public ArdourWindow
|
2010-08-25 15:37:54 -04:00
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2010-08-25 15:37:54 -04:00
|
|
|
RegionLayeringOrderEditor (PublicEditor&);
|
|
|
|
virtual ~RegionLayeringOrderEditor ();
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2012-01-23 20:31:42 -05:00
|
|
|
void set_context (const std::string &, ARDOUR::Session *, TimeAxisView *, boost::shared_ptr<ARDOUR::Playlist>, ARDOUR::framepos_t);
|
2010-08-25 15:37:54 -04:00
|
|
|
void maybe_present ();
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
protected:
|
2010-08-25 15:37:54 -04:00
|
|
|
virtual bool on_key_press_event (GdkEventKey* event);
|
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2010-09-17 14:20:37 -04:00
|
|
|
framepos_t position;
|
2010-08-25 15:37:54 -04:00
|
|
|
bool in_row_change;
|
|
|
|
uint32_t regions_at_position;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2017-07-01 12:42:24 -04:00
|
|
|
PBD::ScopedConnection playlist_modified_connection;
|
2010-08-25 15:37:54 -04:00
|
|
|
|
|
|
|
struct LayeringOrderColumns : public Gtk::TreeModel::ColumnRecord {
|
|
|
|
LayeringOrderColumns () {
|
|
|
|
add (name);
|
2012-01-23 20:31:42 -05:00
|
|
|
add (region_view);
|
2010-08-25 15:37:54 -04:00
|
|
|
}
|
|
|
|
Gtk::TreeModelColumn<std::string> name;
|
2012-01-23 20:31:42 -05:00
|
|
|
Gtk::TreeModelColumn<RegionView *> region_view;
|
2010-08-25 15:37:54 -04:00
|
|
|
};
|
|
|
|
LayeringOrderColumns layering_order_columns;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> layering_order_model;
|
|
|
|
Gtk::TreeView layering_order_display;
|
|
|
|
AudioClock clock;
|
|
|
|
Gtk::Label track_label;
|
|
|
|
Gtk::Label track_name_label;
|
|
|
|
Gtk::Label clock_label;
|
|
|
|
Gtk::ScrolledWindow scroller; // Available layers
|
|
|
|
PublicEditor& editor;
|
2012-01-23 20:31:42 -05:00
|
|
|
TimeAxisView* _time_axis_view;
|
2010-08-25 15:37:54 -04:00
|
|
|
|
2017-07-01 12:42:24 -04:00
|
|
|
void row_selected ();
|
2010-08-25 15:37:54 -04:00
|
|
|
void refill ();
|
|
|
|
void playlist_modified ();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __gtk2_ardour_region_layering_order_editor_h__ */
|