Pass the type of plugin to editor
This commit is contained in:
parent
0a6457fd83
commit
77aff4b1df
6 changed files with 19 additions and 0 deletions
|
|
@ -136,6 +136,11 @@ SAboutDialog::SAboutDialog(const CRect& bounds)
|
|||
aboutView->setViewSize(aboutBounds);
|
||||
}
|
||||
|
||||
void SAboutDialog::setPluginFormat(const std::string& pluginFormat)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
CMouseEventResult SAboutDialog::onMouseDown(CPoint& where, const CButtonState& buttons)
|
||||
{
|
||||
CMouseEventResult result = CViewContainer::onMouseDown(where, buttons);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include "vstgui/lib/cviewcontainer.h"
|
||||
#include "vstgui/vstgui.h"
|
||||
#include "utility/vstgui_after.h"
|
||||
#include <string>
|
||||
|
||||
using namespace VSTGUI;
|
||||
|
||||
|
|
@ -25,6 +26,8 @@ class SAboutDialog : public CViewContainer, public IControlListener {
|
|||
public:
|
||||
explicit SAboutDialog(const CRect& bounds);
|
||||
|
||||
void setPluginFormat(const std::string& pluginFormat);
|
||||
|
||||
protected:
|
||||
CMouseEventResult onMouseDown(CPoint& where, const CButtonState& buttons) override;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ enum class EditId : int {
|
|||
//
|
||||
BackgroundImage,
|
||||
//
|
||||
PluginFormat,
|
||||
//
|
||||
#undef KEY_RANGE
|
||||
#undef CC_RANGE
|
||||
};
|
||||
|
|
|
|||
|
|
@ -403,6 +403,9 @@ void Editor::Impl::uiReceiveValue(EditId id, const EditValue& v)
|
|||
fallbackFilesDir_ = v.to_string();
|
||||
break;
|
||||
}
|
||||
case EditId::PluginFormat:
|
||||
aboutDialog_->setPluginFormat(v.to_string());
|
||||
break;
|
||||
case EditId::UINumCurves:
|
||||
{
|
||||
const int value = static_cast<int>(v.to_float());
|
||||
|
|
|
|||
|
|
@ -256,6 +256,9 @@ instantiate(const LV2UI_Descriptor *descriptor,
|
|||
self->editor.reset(editor);
|
||||
editor->open(*uiFrame);
|
||||
|
||||
// let the editor know about plugin format
|
||||
self->uiReceiveValue(EditId::PluginFormat, std::string("LV2"));
|
||||
|
||||
// user files dir is not relevant to LV2 (not yet?)
|
||||
// LV2 has its own path management mechanism
|
||||
self->uiReceiveValue(EditId::CanEditUserFilesDir, 0);
|
||||
|
|
|
|||
|
|
@ -97,6 +97,9 @@ bool PLUGIN_API SfizzVstEditor::open(void* parent, const VSTGUI::PlatformType& p
|
|||
for (FObject* update : continuousUpdates_)
|
||||
update->deferUpdate();
|
||||
|
||||
// let the editor know about plugin format
|
||||
uiReceiveValue(EditId::PluginFormat, std::string("VST3"));
|
||||
|
||||
absl::optional<fs::path> userFilesDir = SfizzPaths::getSfzConfigDefaultPath();
|
||||
uiReceiveValue(EditId::CanEditUserFilesDir, 1);
|
||||
uiReceiveValue(EditId::UserFilesDir, userFilesDir.value_or(fs::path()).u8string());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue