Ardour  9.0-pre0-582-g084a23a80d
vst3_plugin_ui.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __ardour_vst3_plugin_ui_h__
20 #define __ardour_vst3_plugin_ui_h__
21 
22 #ifdef VST3_SUPPORT
23 
24 #include "plugin_ui.h"
25 
26 namespace ARDOUR {
27  class PlugInsertBase;
28  class VST3Plugin;
29 }
30 
31 class VST3PluginUI : public PlugUIBase, public Gtk::VBox
32 {
33 public:
34  VST3PluginUI (std::shared_ptr<ARDOUR::PlugInsertBase>, std::shared_ptr<ARDOUR::VST3Plugin>);
35  virtual ~VST3PluginUI ();
36 
37  gint get_preferred_height ();
38  gint get_preferred_width ();
39  bool resizable ();
41  bool non_gtk_gui() const;
42 
43  int package (Gtk::Window&);
45  bool stop_updating (GdkEventAny*);
46 
47 protected:
48  virtual void resize_callback (int, int) = 0;
49 
50  bool forward_scroll_event (GdkEventScroll*);
51 
52  std::shared_ptr<ARDOUR::VST3Plugin> _vst3;
53 
54  Gtk::HBox _ardour_buttons_box;
55 
56  int _req_width;
57  int _req_height;
58 
59  bool _resize_in_progress;
60  bool _view_realized;
61 
62 private:
63  void parameter_update ();
64 
65  PBD::ScopedConnection _resize_connection;
66  sigc::connection _update_connection;
67 };
68 
69 #endif // VST3_SUPPORT
70 #endif
virtual bool stop_updating(GdkEventAny *)=0
virtual void forward_key_event(GdkEventKey *)
Definition: plugin_ui.h:116
virtual gint get_preferred_width()=0
virtual bool non_gtk_gui() const
Definition: plugin_ui.h:118
virtual gint get_preferred_height()=0
virtual bool start_updating(GdkEventAny *)=0
virtual bool resizable()
Definition: plugin_ui.h:97