2020-08-09 19:25:10 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Robin Gareus <robin@gareus.org>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ardour_vst3_plugin_ui_h__
|
|
|
|
#define __ardour_vst3_plugin_ui_h__
|
|
|
|
|
|
|
|
#ifdef VST3_SUPPORT
|
|
|
|
|
|
|
|
#include "plugin_ui.h"
|
|
|
|
|
|
|
|
namespace ARDOUR {
|
2022-04-04 14:48:56 -04:00
|
|
|
class PlugInsertBase;
|
2020-08-09 19:25:10 -04:00
|
|
|
class VST3Plugin;
|
|
|
|
}
|
|
|
|
|
|
|
|
class VST3PluginUI : public PlugUIBase, public Gtk::VBox
|
|
|
|
{
|
|
|
|
public:
|
2023-02-16 18:33:28 -05:00
|
|
|
VST3PluginUI (std::shared_ptr<ARDOUR::PlugInsertBase>, std::shared_ptr<ARDOUR::VST3Plugin>);
|
2020-08-09 19:25:10 -04:00
|
|
|
virtual ~VST3PluginUI ();
|
|
|
|
|
|
|
|
gint get_preferred_height ();
|
|
|
|
gint get_preferred_width ();
|
|
|
|
bool resizable ();
|
|
|
|
void forward_key_event (GdkEventKey*);
|
|
|
|
bool non_gtk_gui() const;
|
|
|
|
|
|
|
|
int package (Gtk::Window&);
|
|
|
|
bool start_updating (GdkEventAny*);
|
|
|
|
bool stop_updating (GdkEventAny*);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void resize_callback (int, int) = 0;
|
|
|
|
|
|
|
|
bool forward_scroll_event (GdkEventScroll*);
|
|
|
|
|
2023-02-16 18:33:28 -05:00
|
|
|
std::shared_ptr<ARDOUR::VST3Plugin> _vst3;
|
2020-08-09 19:25:10 -04:00
|
|
|
|
|
|
|
Gtk::HBox _ardour_buttons_box;
|
|
|
|
|
|
|
|
int _req_width;
|
|
|
|
int _req_height;
|
|
|
|
|
2020-09-17 20:11:25 -04:00
|
|
|
bool _resize_in_progress;
|
2020-11-19 17:11:01 -05:00
|
|
|
bool _view_realized;
|
2020-09-17 20:11:25 -04:00
|
|
|
|
2020-08-09 19:25:10 -04:00
|
|
|
private:
|
|
|
|
void parameter_update ();
|
|
|
|
|
|
|
|
PBD::ScopedConnection _resize_connection;
|
|
|
|
sigc::connection _update_connection;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // VST3_SUPPORT
|
|
|
|
#endif
|