本文整理汇总了C++中GraphComponent::loadAndAppendPlugin方法的典型用法代码示例。如果您正苦于以下问题:C++ GraphComponent::loadAndAppendPlugin方法的具体用法?C++ GraphComponent::loadAndAppendPlugin怎么用?C++ GraphComponent::loadAndAppendPlugin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphComponent
的用法示例。
在下文中一共展示了GraphComponent::loadAndAppendPlugin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadPluginFromFile
//==============================================================================
void HostFilterComponent::loadPluginFromFile (const File& file)
{
DBG ("HostFilterComponent::loadPluginFromFile");
GraphComponent* graph = main->getGraph ();
if (graph) graph->loadAndAppendPlugin (file, 100, 100);
}
示例2: menuItemSelected
void HostFilterComponent::menuItemSelected (int menuItemID,
int topLevelMenuIndex)
{
Config* config = Config::getInstance();
GraphComponent* graph = main->getGraph ();
switch (topLevelMenuIndex)
{
case 0: // CommandCategories::file
{
// handle recent plugins selection
int fileID = menuItemID - CommandIDs::recentPlugins;
if (fileID >= 0 && fileID < config->recentPlugins.getNumFiles())
{
File fileToLoad = config->recentPlugins.getFile (fileID);
if (graph)
graph->loadAndAppendPlugin (config->recentPlugins.getFile (fileID), 100, 100);
break;
}
// handle recent session selection
fileID = menuItemID - CommandIDs::recentSessions;
if (fileID >= 0 && fileID < config->recentSessions.getNumFiles())
{
MemoryBlock fileData;
File fileToLoad = config->recentSessions.getFile (fileID);
if (fileToLoad.existsAsFile()
&& fileToLoad.loadFileAsData (fileData))
{
getFilter ()->setStateInformation (fileData.getData (), fileData.getSize());
Config::getInstance()->addRecentSession (fileToLoad);
Config::getInstance()->lastSessionFile = fileToLoad;
}
}
break;
}
}
toFront (true);
}
示例3: perform
bool HostFilterComponent::perform (const InvocationInfo& info)
{
Config* config = Config::getInstance();
GraphComponent* graph = main->getGraph ();
Transport* transport = getFilter()->getTransport();
switch (info.commandID)
{
//----------------------------------------------------------------------------------------------
case CommandIDs::pluginOpen:
{
graph->loadAndAppendPlugin ();
break;
}
case CommandIDs::pluginClose:
{
graph->closeSelectedPlugins ();
break;
}
case CommandIDs::pluginClear:
{
graph->closeAllPlugins ();
break;
}
case CommandIDs::showPluginListEditor:
{
if (PluginListWindow::currentPluginListWindow == 0)
PluginListWindow::currentPluginListWindow = new PluginListWindow (knownPluginList);
PluginListWindow::currentPluginListWindow->toFront (true);
break;
}
//----------------------------------------------------------------------------------------------
#ifndef JOST_VST_PLUGIN
case CommandIDs::audioOptions:
{
StandaloneFilterWindow* window = findParentComponentOfClass ((StandaloneFilterWindow*) 0);
if (window)
window->showAudioSettingsDialog ();
break;
}
#endif
case CommandIDs::audioPlay:
{
transport->play ();
break;
}
case CommandIDs::audioPlayPause:
{
transport->togglePlay ();
break;
}
case CommandIDs::audioStop:
{
transport->stop ();
break;
}
case CommandIDs::audioRecord:
{
transport->record ();
break;
}
case CommandIDs::audioRewind:
{
transport->rewind ();
break;
}
case CommandIDs::audioLoop:
{
transport->setLooping (! transport->isLooping());
break;
}
//----------------------------------------------------------------------------------------------
case CommandIDs::sessionNew:
{
bool retValue =
AlertWindow::showYesNoCancelBox (AlertWindow::WarningIcon,
T("Unsaved Changes"),
T("Are you sure you want to close the current session? You may lose any unsaved changes."));
if (retValue)
{
closePluginEditorWindows ();
getFilter()->getHost ()->closeAllPlugins (true);
clearComponents ();
Config::getInstance()->lastSessionFile = File::nonexistent;
rebuildComponents ();
}
break;
}
case CommandIDs::sessionLoad:
{
FileChooser myChooser (T("Load a session file..."),
//.........这里部分代码省略.........