Pass the name of the VST3 host program
This commit is contained in:
parent
77aff4b1df
commit
fafabe53fc
5 changed files with 16 additions and 0 deletions
|
|
@ -141,6 +141,11 @@ void SAboutDialog::setPluginFormat(const std::string& pluginFormat)
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SAboutDialog::setPluginHost(const std::string& pluginHost)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
CMouseEventResult SAboutDialog::onMouseDown(CPoint& where, const CButtonState& buttons)
|
CMouseEventResult SAboutDialog::onMouseDown(CPoint& where, const CButtonState& buttons)
|
||||||
{
|
{
|
||||||
CMouseEventResult result = CViewContainer::onMouseDown(where, buttons);
|
CMouseEventResult result = CViewContainer::onMouseDown(where, buttons);
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ public:
|
||||||
explicit SAboutDialog(const CRect& bounds);
|
explicit SAboutDialog(const CRect& bounds);
|
||||||
|
|
||||||
void setPluginFormat(const std::string& pluginFormat);
|
void setPluginFormat(const std::string& pluginFormat);
|
||||||
|
void setPluginHost(const std::string& pluginHost);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CMouseEventResult onMouseDown(CPoint& where, const CButtonState& buttons) override;
|
CMouseEventResult onMouseDown(CPoint& where, const CButtonState& buttons) override;
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ enum class EditId : int {
|
||||||
BackgroundImage,
|
BackgroundImage,
|
||||||
//
|
//
|
||||||
PluginFormat,
|
PluginFormat,
|
||||||
|
PluginHost,
|
||||||
//
|
//
|
||||||
#undef KEY_RANGE
|
#undef KEY_RANGE
|
||||||
#undef CC_RANGE
|
#undef CC_RANGE
|
||||||
|
|
|
||||||
|
|
@ -406,6 +406,9 @@ void Editor::Impl::uiReceiveValue(EditId id, const EditValue& v)
|
||||||
case EditId::PluginFormat:
|
case EditId::PluginFormat:
|
||||||
aboutDialog_->setPluginFormat(v.to_string());
|
aboutDialog_->setPluginFormat(v.to_string());
|
||||||
break;
|
break;
|
||||||
|
case EditId::PluginHost:
|
||||||
|
aboutDialog_->setPluginHost(v.to_string());
|
||||||
|
break;
|
||||||
case EditId::UINumCurves:
|
case EditId::UINumCurves:
|
||||||
{
|
{
|
||||||
const int value = static_cast<int>(v.to_float());
|
const int value = static_cast<int>(v.to_float());
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,12 @@ bool PLUGIN_API SfizzVstEditor::open(void* parent, const VSTGUI::PlatformType& p
|
||||||
// let the editor know about plugin format
|
// let the editor know about plugin format
|
||||||
uiReceiveValue(EditId::PluginFormat, std::string("VST3"));
|
uiReceiveValue(EditId::PluginFormat, std::string("VST3"));
|
||||||
|
|
||||||
|
if (FUnknownPtr<Vst::IHostApplication> app { controller->getHostContext() }) {
|
||||||
|
Vst::String128 name;
|
||||||
|
app->getName(name);
|
||||||
|
uiReceiveValue(EditId::PluginHost, std::string(Steinberg::String(name).text8()));
|
||||||
|
}
|
||||||
|
|
||||||
absl::optional<fs::path> userFilesDir = SfizzPaths::getSfzConfigDefaultPath();
|
absl::optional<fs::path> userFilesDir = SfizzPaths::getSfzConfigDefaultPath();
|
||||||
uiReceiveValue(EditId::CanEditUserFilesDir, 1);
|
uiReceiveValue(EditId::CanEditUserFilesDir, 1);
|
||||||
uiReceiveValue(EditId::UserFilesDir, userFilesDir.value_or(fs::path()).u8string());
|
uiReceiveValue(EditId::UserFilesDir, userFilesDir.value_or(fs::path()).u8string());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue