2009-07-03 18:42:22 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
|
|
|
|
* Copyright (C) 2009-2011 David Robillard <d@drobilla.net>
|
|
|
|
* Copyright (C) 2009-2018 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2018 Ben Loftis <ben@harrisonconsoles.com>
|
2022-01-17 20:55:43 -05:00
|
|
|
* Copyright (C) 2021 Robin Gareus <robin@gareus.org>
|
2019-08-02 17:26:43 -04:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2009-11-12 00:47:05 -05:00
|
|
|
#ifndef __gtk_ardour_editor_regions_h__
|
|
|
|
#define __gtk_ardour_editor_regions_h__
|
2009-07-03 18:42:22 -04:00
|
|
|
|
2017-07-16 21:48:18 -04:00
|
|
|
#include "editor_component.h"
|
2022-01-17 20:55:43 -05:00
|
|
|
#include "region_list_base.h"
|
|
|
|
#include "region_selection.h"
|
2017-07-16 21:48:18 -04:00
|
|
|
|
2022-01-17 20:55:43 -05:00
|
|
|
class EditorRegions : public EditorComponent, public RegionListBase
|
2009-07-03 18:42:22 -04:00
|
|
|
{
|
|
|
|
public:
|
2022-01-17 20:55:43 -05:00
|
|
|
EditorRegions (Editor*);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2022-01-17 20:55:43 -05:00
|
|
|
void set_selected (RegionSelection&);
|
2023-02-16 18:33:28 -05:00
|
|
|
void selection_mapover (sigc::slot<void, std::shared_ptr<ARDOUR::Region>>);
|
2022-01-17 20:55:43 -05:00
|
|
|
void remove_unused_regions ();
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::Region> get_single_selection ();
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2022-01-17 20:55:43 -05:00
|
|
|
void unselect_all ()
|
|
|
|
{
|
|
|
|
_display.get_selection ()->unselect_all ();
|
2009-07-03 18:42:22 -04:00
|
|
|
}
|
|
|
|
|
2022-01-17 20:55:43 -05:00
|
|
|
protected:
|
2023-02-16 18:33:28 -05:00
|
|
|
void regions_changed (std::shared_ptr<ARDOUR::RegionList>, PBD::PropertyChange const&);
|
2010-09-18 22:18:59 -04:00
|
|
|
|
2009-07-03 18:42:22 -04:00
|
|
|
private:
|
2022-01-17 20:55:43 -05:00
|
|
|
void init ();
|
2009-07-03 18:42:22 -04:00
|
|
|
void selection_changed ();
|
2022-01-17 20:55:43 -05:00
|
|
|
bool button_press (GdkEventButton*);
|
2009-07-03 18:42:22 -04:00
|
|
|
void show_context_menu (int button, int time);
|
|
|
|
};
|
|
|
|
|
2009-11-12 00:47:05 -05:00
|
|
|
#endif /* __gtk_ardour_editor_regions_h__ */
|