#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"
<< " 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) {
, save_button (_("Save"))
, delete_button (_("Delete"))
, bypass_button (ArdourButton::led_default_elements)
+ , description_expander (_("Description"))
+ , 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 (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 ();
bypass_button.set_name ("plugin bypass button");
bypass_button.set_text (_("Bypass"));
-
- if (!pi->active()) {
- bypass_button.set_active_state (Gtkmm2ext::Active);
- } else {
- bypass_button.unset_active_state ();
- }
-
+ bypass_button.set_active (!pi->active());
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);
ARDOUR_UI::instance()->set_tip (focus_button, string_compose (_("Click to allow the plugin to receive keyboard events that %1 would normally use as a shortcut"), PROGRAM_NAME));
ARDOUR_UI::instance()->set_tip (bypass_button, _("Click to enable/disable this plugin"));
+ description_expander.property_expanded().signal_changed().connect( sigc::mem_fun(*this, &PlugUIBase::toggle_description));
+ description_expander.set_expanded(false);
+
plugin_analysis_expander.property_expanded().signal_changed().connect( sigc::mem_fun(*this, &PlugUIBase::toggle_plugin_analysis));
plugin_analysis_expander.set_expanded(false);
boost::shared_ptr<Processor> p (weak_p.lock());
if (p) {
- if (!p->active()) {
- bypass_button.set_active_state (Gtkmm2ext::Active);
- } else {
- bypass_button.unset_active_state ();
- }
+ bypass_button.set_active (!p->active());
}
}
return true;
}
+void
+PlugUIBase::toggle_description()
+{
+ if (description_expander.get_expanded() &&
+ !description_expander.get_child()) {
+ const std::string text = plugin->get_docs();
+ if (text.empty()) {
+ return;
+ }
+
+ Gtk::Label* label = manage(new Gtk::Label(text));
+ label->set_line_wrap(true);
+ label->set_line_wrap_mode(Pango::WRAP_WORD);
+ description_expander.add(*label);
+ description_expander.show_all();
+ }
+
+ if (!description_expander.get_expanded()) {
+ description_expander.remove();
+ }
+}
+
+
void
PlugUIBase::toggle_plugin_analysis()
{
if (plugin_analysis_expander.get_expanded() &&
- !plugin_analysis_expander.get_child()) {
+ !plugin_analysis_expander.get_child()) {
// Create the GUI
if (eqgui == 0) {
eqgui = new PluginEqGui (insert);
}
if (!plugin_analysis_expander.get_expanded()) {
-
// Hide & remove from expander
eqgui->hide ();