A class that can be used to run a simple standalone application containing your filter. More...
Inherits DocumentWindow.
Public Member Functions | |
| StandaloneFilterWindow (const String &title, const Colour &backgroundColour, PropertySet *settingsToUse) | |
| Creates a window with a given title and colour. | |
| ~StandaloneFilterWindow () | |
| void | resetFilter () |
| Deletes and re-creates the filter and its UI. | |
| void | saveState () |
| Pops up a dialog letting the user save the filter's state to a file. | |
| void | loadState () |
| Pops up a dialog letting the user re-load the filter's state from a file. | |
| virtual void | showAudioSettingsDialog () |
| Shows the audio properties dialog box modally. | |
| void | closeButtonPressed () |
| void | buttonClicked (Button *) |
| void | resized () |
A class that can be used to run a simple standalone application containing your filter.
Just create one of these objects in your JUCEApplication::initialise() method, and let it do its work. It will create your filter object using the same createFilter() function that the other plugin wrappers use.
| StandaloneFilterWindow::StandaloneFilterWindow | ( | const String & | title, |
| const Colour & | backgroundColour, | ||
| PropertySet * | settingsToUse | ||
| ) |
Creates a window with a given title and colour.
The settings object can be a PropertySet that the class should use to store its settings - the object that is passed-in will be owned by this class and deleted automatically when no longer needed. (It can also be null)
References Component::addAndMakeVisible(), AudioDeviceManager::addAudioCallback(), Button::addListener(), AudioDeviceManager::addMidiInputCallback(), Component::centreWithSize(), DocumentWindow::closeButton, AudioProcessor::createEditorIfNeeded(), createPluginFilter(), String::empty, MemoryBlock::fromBase64Encoding(), MemoryBlock::getData(), Component::getHeight(), PropertySet::getIntValue(), AudioProcessor::getNumInputChannels(), AudioProcessor::getNumOutputChannels(), MemoryBlock::getSize(), PropertySet::getValue(), Component::getWidth(), PropertySet::getXmlValue(), AudioDeviceManager::initialise(), jassertfalse, JUCE_CATCH_ALL, JUCE_TRY, DocumentWindow::minimiseButton, JUCEApplication::quit(), ResizableWindow::setBoundsConstrained(), ResizableWindow::setContentOwned(), AudioProcessor::setPlayConfigDetails(), AudioProcessorPlayer::setProcessor(), AudioProcessor::setStateInformation(), DocumentWindow::setTitleBarButtonsRequired(), and Button::setTriggeredOnMouseDown().
| void StandaloneFilterWindow::resetFilter | ( | ) |
Deletes and re-creates the filter and its UI.
References AudioProcessor::createEditorIfNeeded(), createPluginFilter(), PropertySet::removeValue(), ResizableWindow::setContentOwned(), and AudioProcessorPlayer::setProcessor().
Referenced by buttonClicked().
| void StandaloneFilterWindow::saveState | ( | ) |
Pops up a dialog letting the user save the filter's state to a file.
References FileChooser::browseForFileToSave(), MemoryBlock::getData(), FileChooser::getResult(), MemoryBlock::getSize(), AudioProcessor::getStateInformation(), PropertySet::getValue(), File::nonexistent, File::replaceWithData(), TRANS, and AlertWindow::WarningIcon.
Referenced by buttonClicked().
| void StandaloneFilterWindow::loadState | ( | ) |
Pops up a dialog letting the user re-load the filter's state from a file.
References FileChooser::browseForFileToOpen(), MemoryBlock::getData(), FileChooser::getResult(), MemoryBlock::getSize(), PropertySet::getValue(), File::loadFileAsData(), File::nonexistent, AudioProcessor::setStateInformation(), TRANS, and AlertWindow::WarningIcon.
Referenced by buttonClicked().
| virtual void StandaloneFilterWindow::showAudioSettingsDialog | ( | ) | [virtual] |
Shows the audio properties dialog box modally.
References AudioProcessor::getNumInputChannels(), AudioProcessor::getNumOutputChannels(), Colours::lightgrey, Component::setSize(), DialogWindow::showModalDialog(), and TRANS.
Referenced by buttonClicked().
| void StandaloneFilterWindow::closeButtonPressed | ( | ) | [virtual] |
Reimplemented from DocumentWindow.
References JUCEApplication::quit().
| void StandaloneFilterWindow::buttonClicked | ( | Button * | ) |
References PopupMenu::addItem(), PopupMenu::addSeparator(), loadState(), resetFilter(), saveState(), showAudioSettingsDialog(), and TRANS.
| void StandaloneFilterWindow::resized | ( | ) | [virtual] |
Reimplemented from ResizableWindow.
References DocumentWindow::getTitleBarHeight(), and Component::setBounds().