2012-01-23 20:31:42 -05:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2010-2012 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2010-2017 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2011 David Robillard <d@drobilla.net>
|
|
|
|
*
|
|
|
|
* 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.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2012-01-23 20:31:42 -05:00
|
|
|
|
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
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
void set_context (const std::string &, ARDOUR::Session *, TimeAxisView *, std::shared_ptr<ARDOUR::Playlist>, Temporal::timepos_t const &);
|
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:
|
2020-09-29 19:53:43 -04:00
|
|
|
Temporal::timepos_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__ */
|