#include "ardour/plugin.h"
#include "ardour/plugin_insert.h"
#include "ardour/ladspa_plugin.h"
-#ifdef VST_SUPPORT
-#include "ardour/vst_plugin.h"
-#include "vst_pluginui.h"
+#ifdef WINDOWS_VST_SUPPORT
+#include "ardour/windows_vst_plugin.h"
+#include "windows_vst_plugin_ui.h"
#endif
#ifdef LXVST_SUPPORT
#include "ardour/lxvst_plugin.h"
#include <lrdf.h>
-#include "ardour_dialog.h"
+#include "ardour_window.h"
#include "ardour_ui.h"
#include "prompter.h"
#include "plugin_ui.h"
<< " editor: " << editor << std::endl;
if (editor && insert->plugin()->has_editor()) {
switch (insert->type()) {
- case ARDOUR::VST:
- have_gui = create_vst_editor (insert);
+ case ARDOUR::Windows_VST:
+ have_gui = create_windows_vst_editor (insert);
break;
case ARDOUR::LXVST:
break;
default:
-#ifndef VST_SUPPORT
+#ifndef WINDOWS_VST_SUPPORT
error << _("unknown type of editor-supplying plugin (note: no VST support in this version of ardour)")
<< endmsg;
#else
if (scrollable) {
if (h > 600) h = 600;
- if (w > 600) w = 600;
-
- if (w < 0) {
- w = 450;
- }
}
set_default_size (w, h);
+ set_resizable (_pluginui->resizable());
}
PluginUIWindow::~PluginUIWindow ()
}
bool
-#ifdef VST_SUPPORT
-PluginUIWindow::create_vst_editor(boost::shared_ptr<PluginInsert> insert)
+#ifdef WINDOWS_VST_SUPPORT
+PluginUIWindow::create_windows_vst_editor(boost::shared_ptr<PluginInsert> insert)
#else
-PluginUIWindow::create_vst_editor(boost::shared_ptr<PluginInsert>)
+PluginUIWindow::create_windows_vst_editor(boost::shared_ptr<PluginInsert>)
#endif
{
-#ifndef VST_SUPPORT
+#ifndef WINDOWS_VST_SUPPORT
return false;
#else
- boost::shared_ptr<VSTPlugin> vp;
+ boost::shared_ptr<WindowsVSTPlugin> vp;
- if ((vp = boost::dynamic_pointer_cast<VSTPlugin> (insert->plugin())) == 0) {
+ if ((vp = boost::dynamic_pointer_cast<WindowsVSTPlugin> (insert->plugin())) == 0) {
error << _("unknown type of editor-supplying plugin (note: no VST support in this version of ardour)")
<< endmsg;
throw failed_constructor ();
} else {
- VSTPluginUI* vpu = new VSTPluginUI (insert, vp);
+ WindowsVSTPluginUI* vpu = new WindowsVSTPluginUI (insert, vp);
_pluginui = vpu;
_pluginui->KeyboardFocused.connect (sigc::mem_fun (*this, &PluginUIWindow::keyboard_focused));
}
bool
-#ifdef GTKOSX
+#ifdef AUDIOUNIT_SUPPORT
PluginUIWindow::create_audiounit_editor (boost::shared_ptr<PluginInsert> insert)
#else
PluginUIWindow::create_audiounit_editor (boost::shared_ptr<PluginInsert>)
#endif
{
-#ifndef GTKOSX
+#ifndef AUDIOUNIT_SUPPORT
return false;
#else
VBox* box;
PluginUIWindow::app_activated (bool)
#endif
{
-#ifdef GTKOSX
+#ifdef AUDIOUNIT_SUPPORT
if (_pluginui) {
if (yn) {
if (was_visible) {
bool
PluginUIWindow::create_lv2_editor(boost::shared_ptr<PluginInsert> insert)
{
-#if defined(HAVE_SLV2) || defined(HAVE_SUIL)
+#ifdef HAVE_SUIL
boost::shared_ptr<LV2Plugin> vp;
if ((vp = boost::dynamic_pointer_cast<LV2Plugin> (insert->plugin())) == 0) {
, add_button (_("Add"))
, save_button (_("Save"))
, delete_button (_("Delete"))
- , bypass_button (_("Bypass"))
+ , bypass_button (ArdourButton::led_default_elements)
+ , plugin_analysis_expander (_("Plugin analysis"))
, latency_gui (0)
, latency_dialog (0)
- , plugin_analysis_expander (_("Plugin analysis"))
, eqgui (0)
{
- _preset_combo.set_size_request (100, -1);
_preset_modified.set_size_request (16, -1);
_preset_combo.signal_changed().connect(sigc::mem_fun(*this, &PlugUIBase::preset_selected));
+ ARDOUR_UI::instance()->set_tip (_preset_combo, _("Presets (if any) for this plugin\n(Both factory and user-created)"));
+ ARDOUR_UI::instance()->set_tip (add_button, _("Save a new preset"));
+ ARDOUR_UI::instance()->set_tip (save_button, _("Save the current preset"));
+ ARDOUR_UI::instance()->set_tip (delete_button, _("Delete the current preset"));
+ ARDOUR_UI::instance()->set_tip (bypass_button, _("Disable signal processing by the plugin"));
_no_load_preset = 0;
- _preset_box.pack_start (_preset_combo);
- _preset_box.pack_start (_preset_modified);
-
update_preset_list ();
update_preset ();
insert->ActiveChanged.connect (active_connection, invalidator (*this), boost::bind (&PlugUIBase::processor_active_changed, this, boost::weak_ptr<Processor>(insert)), gui_context());
+ bypass_button.set_name ("plugin bypass button");
+ bypass_button.set_text (_("Bypass"));
bypass_button.set_active (!pi->active());
-
- bypass_button.set_name ("PluginBypassButton");
- bypass_button.signal_toggled().connect (sigc::mem_fun(*this, &PlugUIBase::bypass_toggled));
+ bypass_button.signal_button_release_event().connect (sigc::mem_fun(*this, &PlugUIBase::bypass_button_release));
focus_button.add_events (Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK);
focus_button.signal_button_release_event().connect (sigc::mem_fun(*this, &PlugUIBase::focus_toggled));
{
if (!latency_gui) {
latency_gui = new LatencyGUI (*(insert.get()), insert->session().frame_rate(), insert->session().get_block_size());
- latency_dialog = new ArdourDialog (_("Edit Latency"), false, false);
- latency_dialog->get_vbox()->pack_start (*latency_gui);
+ latency_dialog = new ArdourWindow (_("Edit Latency"));
+ latency_dialog->add (*latency_gui);
latency_dialog->signal_hide().connect (sigc::mem_fun (*this, &PlugUIBase::set_latency_label));
}
void
PlugUIBase::processor_active_changed (boost::weak_ptr<Processor> weak_p)
{
- ENSURE_GUI_THREAD (*this, &PlugUIBase::processor_active_changed, weak_p)
- boost::shared_ptr<Processor> p (weak_p);
+ ENSURE_GUI_THREAD (*this, &PlugUIBase::processor_active_changed, weak_p);
+ boost::shared_ptr<Processor> p (weak_p.lock());
+
if (p) {
bypass_button.set_active (!p->active());
}
plugin->remove_preset (_preset_combo.get_active_text ());
}
-void
-PlugUIBase::bypass_toggled ()
+bool
+PlugUIBase::bypass_button_release (GdkEventButton*)
{
- bool x;
-
- if ((x = bypass_button.get_active()) == insert->active()) {
- if (x) {
- insert->deactivate ();
- } else {
+ bool view_says_bypassed = (bypass_button.active_state() != 0);
+
+ if (view_says_bypassed != insert->active()) {
+ if (view_says_bypassed) {
insert->activate ();
+ } else {
+ insert->deactivate ();
}
}
+
+ return false;
}
bool