bool MainWindow::closeProject (Project* project) { jassert (project == currentProject && project != nullptr); if (project == nullptr) return true; project->getStoredProperties().setValue (getProjectWindowPosName(), getWindowStateAsString()); if (ProjectContentComponent* const pcc = getProjectContentComponent()) { pcc->saveTreeViewState(); pcc->saveOpenDocumentList(); pcc->hideEditor(); } if (! ProjucerApplication::getApp().openDocumentManager.closeAllDocumentsUsingProject (*project, true)) return false; FileBasedDocument::SaveResult r = project->saveIfNeededAndUserAgrees(); if (r == FileBasedDocument::savedOk) { setProject (nullptr); return true; } return false; }
void CtrlrStandaloneWindow::moved() { DocumentWindow::moved(); if (appProperties != nullptr) { appProperties->getUserSettings()->setValue (CTRLR_PROPERTIES_WINDOW_STATE, getWindowStateAsString()); } }
MainWindow::~MainWindow() { #if ! JUCE_MAC setMenuBar (nullptr); #endif removeKeyListener (ProjucerApplication::getCommandManager().getKeyMappings()); // save the current size and position to our settings file.. getGlobalProperties().setValue ("lastMainWindowPos", getWindowStateAsString()); clearContentComponent(); currentProject = nullptr; }
//------------------------------------------------------------------------------ StupidWindow::~StupidWindow() { saveKeyMappings(); PropertiesSingleton::getInstance().getUserSettings()->setValue("WindowState", getWindowStateAsString()); setMenuBar(0); setContentOwned(0, true); LookAndFeel::setDefaultLookAndFeel(0); AudioPluginFormatManagerSingleton::killInstance(); AudioFormatManagerSingleton::killInstance(); AudioThumbnailCacheSingleton::killInstance(); PropertiesSingleton::killInstance(); }
//================================================================================================= MainWindow::~MainWindow() { #if JUCE_MAC setMacMainMenu (nullptr); #else setMenuBar(nullptr); #endif removeKeyListener (commandManager->getKeyMappings()); appDoc->removeChangeListener(this); // 保存窗口状态 setSize(getWidth(), getHeight()); // 不加此句,每次保存的窗口高度均莫名其妙的增加22,断定是JUCE的BUG appProperties->getUserSettings()->setValue("mainWindowState", getWindowStateAsString()); }
MainHostWindow::~MainHostWindow() { pluginListWindow = nullptr; #if JUCE_MAC setMacMainMenu (nullptr); #else setMenuBar (nullptr); #endif knownPluginList.removeChangeListener (this); appProperties->getUserSettings()->setValue ("mainWindowPos", getWindowStateAsString()); clearContentComponent(); }
MainWindow::~MainWindow() { #if ! JUCE_MAC setMenuBar (nullptr); #endif removeKeyListener (commandManager->getKeyMappings()); // save the current size and position to our settings file.. StoredSettings::getInstance()->getProps() .setValue ("lastMainWindowPos", getWindowStateAsString()); clearContentComponent(); currentProject = nullptr; }
MainWindow::~MainWindow() { #if JUCE_MAC setMacMainMenu (0); #else setMenuBar (0); #endif removeKeyListener (commandManager->getKeyMappings()); // save the current size and position to our settings file.. StoredSettings::getInstance()->getProps() .setValue ("lastMainWindowPos", getWindowStateAsString()); clearContentComponent(); deleteAndZero (oldLook); }
void CtrlrStandaloneWindow::saveStateNow() { _DBG("CtrlrStandaloneWindow::saveStateNow"); if (ctrlrProcessor != nullptr && appProperties != nullptr) { appProperties->getUserSettings()->setValue (CTRLR_PROPERTIES_WINDOW_STATE, getWindowStateAsString()); MemoryBlock data; ctrlrProcessor->getStateInformation(data); if (data.getSize() > 0) { ScopedPointer <XmlElement> xml(CtrlrProcessor::getXmlFromBinary(data.getData(), data.getSize())); if (xml) { appProperties->getUserSettings()->setValue (CTRLR_PROPERTIES_FILTER_STATE, xml); } } } }
bool MainWindow::closeProject (Project* project) { jassert (project == currentProject && project != nullptr); if (project == nullptr) return true; StoredSettings::getInstance()->getProps() .setValue (getProjectWindowPosName(), getWindowStateAsString()); if (! OpenDocumentManager::getInstance()->closeAllDocumentsUsingProject (*project, true)) return false; FileBasedDocument::SaveResult r = project->saveIfNeededAndUserAgrees(); if (r == FileBasedDocument::savedOk) { setProject (nullptr); return true; } return false; }
PrefsPanel::~PrefsPanel() { prefsWindowPos = getWindowStateAsString(); }
~PluginListWindow() { getAppProperties().getUserSettings()->setValue ("listWindowPos", getWindowStateAsString()); clearContentComponent(); }
~PluginListWindow() { ApplicationProperties::getInstance()->getUserSettings()->setValue ("listWindowPos", getWindowStateAsString()); setContentComponent (0); jassert (currentPluginListWindow == this); currentPluginListWindow = 0; }
MainHostWindow::~MainHostWindow() { delete PluginListWindow::currentPluginListWindow; #if JUCE_MAC setMacMainMenu (0); #else setMenuBar (0); #endif knownPluginList.removeChangeListener (this); ApplicationProperties::getInstance()->getUserSettings()->setValue ("mainWindowPos", getWindowStateAsString()); setContentComponent (0); }