X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Flxvst_plugin_ui.h;h=115db625958db8d5ec218b6134597af714b49b9d;hb=474d68c05132291fd8eb200006e7e63aebefdc8d;hp=fc46ede8a3adb91bdd4a954828e1dfa69d3c4066;hpb=d4433b9ab384196bb5b8876890863d7939339ee2;p=ardour.git diff --git a/gtk2_ardour/lxvst_plugin_ui.h b/gtk2_ardour/lxvst_plugin_ui.h old mode 100755 new mode 100644 index fc46ede8a3..115db62595 --- a/gtk2_ardour/lxvst_plugin_ui.h +++ b/gtk2_ardour/lxvst_plugin_ui.h @@ -1,16 +1,27 @@ -#ifndef __lxvst_plugin_ui_h__ -#define __lxvst_plugin_ui_h__ +/* + Copyright (C) 2012 Paul Davis + + 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., 675 Mass Ave, Cambridge, MA 02139, USA. -#include -#include -#include +*/ -#include -#include +#ifndef __lxvst_plugin_ui_h__ +#define __lxvst_plugin_ui_h__ -#include -#include -#include "plugin_ui.h" +#include "pbd/signals.h" +#include "vst_plugin_ui.h" #ifdef LXVST_SUPPORT @@ -19,49 +30,26 @@ namespace ARDOUR { class LXVSTPlugin; } -class LXVSTPluginUI : public PlugUIBase, public Gtk::VBox +class LXVSTPluginUI : public VSTPluginUI { - public: - LXVSTPluginUI (boost::shared_ptr, boost::shared_ptr); +public: + LXVSTPluginUI (boost::shared_ptr, boost::shared_ptr); ~LXVSTPluginUI (); - gint get_preferred_height (); - gint get_preferred_width (); - bool start_updating(GdkEventAny*); - bool stop_updating(GdkEventAny*); + int get_preferred_height (); + + bool start_updating (GdkEventAny*) { return false; } + bool stop_updating (GdkEventAny*) { return false; } int package (Gtk::Window&); void forward_key_event (GdkEventKey *); - bool non_gtk_gui() const { return true; } - - private: - boost::shared_ptr lxvst; - Gtk::Socket socket; - Gtk::HBox preset_box; - Gtk::VBox vpacker; - - sigc::connection _screen_update_connection; - - bool configure_handler (GdkEventConfigure*, Gtk::Socket*); - void save_plugin_setting (); - - struct PresetModelColumns : public Gtk::TreeModel::ColumnRecord { - PresetModelColumns() { - add (name); - add (number); - } - Gtk::TreeModelColumn name; - Gtk::TreeModelColumn number; - }; - - PresetModelColumns preset_columns; - Glib::RefPtr preset_model; - Gtk::ComboBox lxvst_preset_combo; - - void create_preset_store (); - void preset_chosen (); - void preset_selected (); - void resize_callback(); + bool non_gtk_gui () const { return true; } + +private: + void resize_callback (); + int get_XID (); + + PBD::ScopedConnection _resize_connection; }; #endif //LXVST_SUPPORT