2018-11-15 10:21:55 -05:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2018-2019 Ben Loftis <ben@harrisonconsoles.com>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2024-09-25 20:38:59 -04:00
|
|
|
#pragma once
|
2018-11-15 10:21:55 -05:00
|
|
|
|
|
|
|
#include "editor_component.h"
|
2022-01-18 19:59:05 -05:00
|
|
|
#include "source_list_base.h"
|
2018-11-15 10:21:55 -05:00
|
|
|
|
2022-01-18 19:59:05 -05:00
|
|
|
class EditorSources : public EditorComponent, public SourceListBase
|
2018-11-15 10:21:55 -05:00
|
|
|
{
|
|
|
|
public:
|
2022-01-18 19:59:05 -05:00
|
|
|
EditorSources (Editor*);
|
2020-02-25 09:42:01 -05:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::Region> get_single_selection ();
|
2018-11-15 10:21:55 -05:00
|
|
|
|
2020-02-25 10:16:20 -05:00
|
|
|
/* user actions */
|
2019-05-31 14:36:46 -04:00
|
|
|
void remove_selected_sources ();
|
2022-01-18 19:59:05 -05:00
|
|
|
void recover_selected_sources ();
|
2018-11-15 10:21:55 -05:00
|
|
|
|
|
|
|
private:
|
2022-01-18 19:59:05 -05:00
|
|
|
void init ();
|
|
|
|
bool key_press (GdkEventKey*);
|
|
|
|
bool button_press (GdkEventButton*);
|
2018-11-15 10:21:55 -05:00
|
|
|
void show_context_menu (int button, int time);
|
|
|
|
|
2022-01-18 19:59:05 -05:00
|
|
|
void selection_changed ();
|
2018-11-15 10:21:55 -05:00
|
|
|
|
2022-01-18 19:59:05 -05:00
|
|
|
void drag_data_received (Glib::RefPtr<Gdk::DragContext> const&, gint, gint, Gtk::SelectionData const&, guint, guint);
|
2018-11-15 10:21:55 -05:00
|
|
|
};
|
|
|
|
|