| @@ -43,7 +43,7 @@ PluginWindow::PluginWindow (Component* const uiComp, | |||||
| { | { | ||||
| setSize (400, 300); | setSize (400, 300); | ||||
| setContentComponent (uiComp, true, true); | |||||
| setContentOwned (uiComp, true); | |||||
| setTopLeftPosition (owner->properties.getWithDefault ("uiLastX", Random::getSystemRandom().nextInt (500)), | setTopLeftPosition (owner->properties.getWithDefault ("uiLastX", Random::getSystemRandom().nextInt (500)), | ||||
| owner->properties.getWithDefault ("uiLastY", Random::getSystemRandom().nextInt (500))); | owner->properties.getWithDefault ("uiLastY", Random::getSystemRandom().nextInt (500))); | ||||
| @@ -104,7 +104,7 @@ PluginWindow* PluginWindow::getWindowFor (AudioProcessorGraph::Node* node, | |||||
| PluginWindow::~PluginWindow() | PluginWindow::~PluginWindow() | ||||
| { | { | ||||
| activePluginWindows.removeValue (this); | activePluginWindows.removeValue (this); | ||||
| setContentComponent (0); | |||||
| clearContentComponent(); | |||||
| } | } | ||||
| void PluginWindow::moved() | void PluginWindow::moved() | ||||
| @@ -41,9 +41,9 @@ public: | |||||
| const File deadMansPedalFile (ApplicationProperties::getInstance()->getUserSettings() | const File deadMansPedalFile (ApplicationProperties::getInstance()->getUserSettings() | ||||
| ->getFile().getSiblingFile ("RecentlyCrashedPluginsList")); | ->getFile().getSiblingFile ("RecentlyCrashedPluginsList")); | ||||
| setContentComponent (new PluginListComponent (knownPluginList, | |||||
| deadMansPedalFile, | |||||
| ApplicationProperties::getInstance()->getUserSettings()), true, true); | |||||
| setContentOwned (new PluginListComponent (knownPluginList, | |||||
| deadMansPedalFile, | |||||
| ApplicationProperties::getInstance()->getUserSettings()), true); | |||||
| setResizable (true, false); | setResizable (true, false); | ||||
| setResizeLimits (300, 400, 800, 1500); | setResizeLimits (300, 400, 800, 1500); | ||||
| @@ -57,7 +57,7 @@ public: | |||||
| { | { | ||||
| ApplicationProperties::getInstance()->getUserSettings()->setValue ("listWindowPos", getWindowStateAsString()); | ApplicationProperties::getInstance()->getUserSettings()->setValue ("listWindowPos", getWindowStateAsString()); | ||||
| setContentComponent (0); | |||||
| clearContentComponent(); | |||||
| jassert (currentPluginListWindow == this); | jassert (currentPluginListWindow == this); | ||||
| currentPluginListWindow = 0; | currentPluginListWindow = 0; | ||||
| @@ -90,7 +90,7 @@ MainHostWindow::MainHostWindow() | |||||
| setResizeLimits (500, 400, 10000, 10000); | setResizeLimits (500, 400, 10000, 10000); | ||||
| centreWithSize (800, 600); | centreWithSize (800, 600); | ||||
| setContentComponent (new GraphDocumentComponent (&deviceManager)); | |||||
| setContentOwned (new GraphDocumentComponent (&deviceManager), false); | |||||
| restoreWindowStateFromString (ApplicationProperties::getInstance()->getUserSettings()->getValue ("mainWindowPos")); | restoreWindowStateFromString (ApplicationProperties::getInstance()->getUserSettings()->getValue ("mainWindowPos")); | ||||
| @@ -138,7 +138,7 @@ MainHostWindow::~MainHostWindow() | |||||
| knownPluginList.removeChangeListener (this); | knownPluginList.removeChangeListener (this); | ||||
| ApplicationProperties::getInstance()->getUserSettings()->setValue ("mainWindowPos", getWindowStateAsString()); | ApplicationProperties::getInstance()->getUserSettings()->setValue ("mainWindowPos", getWindowStateAsString()); | ||||
| setContentComponent (0); | |||||
| clearContentComponent(); | |||||
| } | } | ||||
| void MainHostWindow::closeButtonPressed() | void MainHostWindow::closeButtonPressed() | ||||
| @@ -83,7 +83,7 @@ StandaloneFilterWindow::StandaloneFilterWindow (const String& title, | |||||
| } | } | ||||
| } | } | ||||
| setContentComponent (filter->createEditorIfNeeded(), true, true); | |||||
| setContentOwned (filter->createEditorIfNeeded(), true); | |||||
| const int x = globalSettings->getIntValue ("windowX", -100); | const int x = globalSettings->getIntValue ("windowX", -100); | ||||
| const int y = globalSettings->getIntValue ("windowY", -100); | const int y = globalSettings->getIntValue ("windowY", -100); | ||||
| @@ -138,7 +138,7 @@ void StandaloneFilterWindow::deleteFilter() | |||||
| if (filter != 0 && getContentComponent() != 0) | if (filter != 0 && getContentComponent() != 0) | ||||
| { | { | ||||
| filter->editorBeingDeleted (dynamic_cast <AudioProcessorEditor*> (getContentComponent())); | filter->editorBeingDeleted (dynamic_cast <AudioProcessorEditor*> (getContentComponent())); | ||||
| setContentComponent (0, true); | |||||
| clearContentComponent(); | |||||
| } | } | ||||
| filter = 0; | filter = 0; | ||||
| @@ -155,7 +155,7 @@ void StandaloneFilterWindow::resetFilter() | |||||
| if (deviceManager != 0) | if (deviceManager != 0) | ||||
| deviceManager->setFilter (filter); | deviceManager->setFilter (filter); | ||||
| setContentComponent (filter->createEditorIfNeeded(), true, true); | |||||
| setContentOwned (filter->createEditorIfNeeded(), true); | |||||
| } | } | ||||
| PropertySet* const globalSettings = getGlobalSettings(); | PropertySet* const globalSettings = getGlobalSettings(); | ||||
| @@ -21,7 +21,7 @@ class HelloWorldWindow : public DocumentWindow | |||||
| public: | public: | ||||
| //============================================================================== | //============================================================================== | ||||
| HelloWorldWindow() | HelloWorldWindow() | ||||
| : DocumentWindow (T("JUCE Hello World!"), | |||||
| : DocumentWindow ("JUCE Hello World!", | |||||
| Colours::lightgrey, | Colours::lightgrey, | ||||
| DocumentWindow::allButtons, | DocumentWindow::allButtons, | ||||
| true) | true) | ||||
| @@ -31,7 +31,7 @@ public: | |||||
| MainComponent* const contentComponent = new MainComponent(); | MainComponent* const contentComponent = new MainComponent(); | ||||
| setContentComponent (contentComponent, true, true); | |||||
| setContentOwned (contentComponent, true); | |||||
| centreWithSize (getWidth(), getHeight()); | centreWithSize (getWidth(), getHeight()); | ||||
| @@ -68,7 +68,7 @@ MainWindow::MainWindow() | |||||
| if (oldLook == 0) | if (oldLook == 0) | ||||
| oldLook = new OldSchoolLookAndFeel(); | oldLook = new OldSchoolLookAndFeel(); | ||||
| setContentComponent (multiDocHolder = new MultiDocHolder()); | |||||
| setContentOwned (multiDocHolder = new MultiDocHolder(), false); | |||||
| setApplicationCommandManagerToWatch (commandManager); | setApplicationCommandManagerToWatch (commandManager); | ||||
| @@ -131,7 +131,7 @@ MainWindow::~MainWindow() | |||||
| StoredSettings::getInstance()->getProps() | StoredSettings::getInstance()->getProps() | ||||
| .setValue (T("lastMainWindowPos"), getWindowStateAsString()); | .setValue (T("lastMainWindowPos"), getWindowStateAsString()); | ||||
| setContentComponent (0); | |||||
| clearContentComponent(); | |||||
| LookAndFeel::setDefaultLookAndFeel (0); | LookAndFeel::setDefaultLookAndFeel (0); | ||||
| deleteAndZero (oldLook); | deleteAndZero (oldLook); | ||||
| @@ -162,7 +162,7 @@ PrefsPanel::PrefsPanel() | |||||
| PrefsTabComp* const p = new PrefsTabComp(); | PrefsTabComp* const p = new PrefsTabComp(); | ||||
| p->setSize (456, 510); | p->setSize (456, 510); | ||||
| setContentComponent (p, true, true); | |||||
| setContentOwned (p, true); | |||||
| if (! restoreWindowStateFromString (prefsWindowPos)) | if (! restoreWindowStateFromString (prefsWindowPos)) | ||||
| centreAroundComponent (0, getWidth(), getHeight()); | centreAroundComponent (0, getWidth(), getHeight()); | ||||
| @@ -78605,7 +78605,7 @@ void ResizableWindow::addChildComponent (Component* const child, int zOrder) | |||||
| If you really know what you're doing and want to avoid this assertion, just call | If you really know what you're doing and want to avoid this assertion, just call | ||||
| Component::addChildComponent directly. | Component::addChildComponent directly. | ||||
| */ | |||||
| */ | |||||
| jassertfalse; | jassertfalse; | ||||
| Component::addChildComponent (child, zOrder); | Component::addChildComponent (child, zOrder); | ||||
| @@ -78622,7 +78622,7 @@ void ResizableWindow::addAndMakeVisible (Component* const child, int zOrder) | |||||
| If you really know what you're doing and want to avoid this assertion, just call | If you really know what you're doing and want to avoid this assertion, just call | ||||
| Component::addAndMakeVisible directly. | Component::addAndMakeVisible directly. | ||||
| */ | |||||
| */ | |||||
| jassertfalse; | jassertfalse; | ||||
| Component::addAndMakeVisible (child, zOrder); | Component::addAndMakeVisible (child, zOrder); | ||||
| @@ -55305,8 +55305,8 @@ private: | |||||
| /** | /** | ||||
| A base class for top-level windows that can be dragged around and resized. | A base class for top-level windows that can be dragged around and resized. | ||||
| To add content to the window, use its setContentComponent() method to | |||||
| give it a component that will remain positioned inside it (leaving a gap around | |||||
| To add content to the window, use its setContentOwned() or setContentNonOwned() methods | |||||
| to give it a component that will remain positioned inside it (leaving a gap around | |||||
| the edges for a border). | the edges for a border). | ||||
| It's not advisable to add child components directly to a ResizableWindow: put them | It's not advisable to add child components directly to a ResizableWindow: put them | ||||
| @@ -55349,9 +55349,7 @@ public: | |||||
| bool addToDesktop); | bool addToDesktop); | ||||
| /** Destructor. | /** Destructor. | ||||
| If a content component has been set with setContentComponent(), it | |||||
| will be deleted. | |||||
| If a content component has been set with setContentOwned(), it will be deleted. | |||||
| */ | */ | ||||
| ~ResizableWindow(); | ~ResizableWindow(); | ||||
| @@ -55492,10 +55490,10 @@ public: | |||||
| /** Returns the current content component. | /** Returns the current content component. | ||||
| This will be the component set by setContentComponent(), or 0 if none | |||||
| This will be the component set by setContentOwned() or setContentNonOwned, or 0 if none | |||||
| has yet been specified. | has yet been specified. | ||||
| @see setContentComponent | |||||
| @see setContentOwned, setContentNonOwned | |||||
| */ | */ | ||||
| Component* getContentComponent() const throw() { return contentComponent; } | Component* getContentComponent() const throw() { return contentComponent; } | ||||
| @@ -55604,20 +55602,19 @@ protected: | |||||
| #if JUCE_DEBUG | #if JUCE_DEBUG | ||||
| /** Overridden to warn people about adding components directly to this component | /** Overridden to warn people about adding components directly to this component | ||||
| instead of using setContentComponent(). | |||||
| instead of using setContentOwned(). | |||||
| If you know what you're doing and are sure you really want to add a component, specify | If you know what you're doing and are sure you really want to add a component, specify | ||||
| a base-class method call to Component::addAndMakeVisible(), to side-step this warning. | a base-class method call to Component::addAndMakeVisible(), to side-step this warning. | ||||
| */ | */ | ||||
| void addChildComponent (Component* child, int zOrder = -1); | void addChildComponent (Component* child, int zOrder = -1); | ||||
| /** Overridden to warn people about adding components directly to this component | /** Overridden to warn people about adding components directly to this component | ||||
| instead of using setContentComponent(). | |||||
| instead of using setContentOwned(). | |||||
| If you know what you're doing and are sure you really want to add a component, specify | If you know what you're doing and are sure you really want to add a component, specify | ||||
| a base-class method call to Component::addAndMakeVisible(), to side-step this warning. | a base-class method call to Component::addAndMakeVisible(), to side-step this warning. | ||||
| */ | */ | ||||
| void addAndMakeVisible (Component* child, int zOrder = -1); | void addAndMakeVisible (Component* child, int zOrder = -1); | ||||
| #endif | #endif | ||||
| ScopedPointer <ResizableCornerComponent> resizableCorner; | ScopedPointer <ResizableCornerComponent> resizableCorner; | ||||
| @@ -58342,9 +58339,7 @@ public: | |||||
| bool addToDesktop = true); | bool addToDesktop = true); | ||||
| /** Destructor. | /** Destructor. | ||||
| If a content component has been set with setContentComponent(), it | |||||
| will be deleted. | |||||
| If a content component has been set with setContentOwned(), it will be deleted. | |||||
| */ | */ | ||||
| ~DocumentWindow(); | ~DocumentWindow(); | ||||
| @@ -63721,8 +63716,9 @@ private: | |||||
| Any of the methods available to a DocumentWindow or ResizableWindow are also | Any of the methods available to a DocumentWindow or ResizableWindow are also | ||||
| available to this, so it can be made resizable, have a menu bar, etc. | available to this, so it can be made resizable, have a menu bar, etc. | ||||
| To add items to the box, see the ResizableWindow::setContentComponent() method. | |||||
| Don't add components directly to this class - always put them in a content component! | |||||
| To add items to the box, see the ResizableWindow::setContentOwned() or | |||||
| ResizableWindow::setContentNonOwned() methods. Don't add components directly to this | |||||
| class - always put them in a content component! | |||||
| You'll need to override the DocumentWindow::closeButtonPressed() method to handle | You'll need to override the DocumentWindow::closeButtonPressed() method to handle | ||||
| the user clicking the close button - for more info, see the DocumentWindow | the user clicking the close button - for more info, see the DocumentWindow | ||||
| @@ -63751,9 +63747,7 @@ public: | |||||
| bool addToDesktop = true); | bool addToDesktop = true); | ||||
| /** Destructor. | /** Destructor. | ||||
| If a content component has been set with setContentComponent(), it | |||||
| will be deleted. | |||||
| If a content component has been set with setContentOwned(), it will be deleted. | |||||
| */ | */ | ||||
| ~DialogWindow(); | ~DialogWindow(); | ||||
| @@ -40,8 +40,9 @@ | |||||
| Any of the methods available to a DocumentWindow or ResizableWindow are also | Any of the methods available to a DocumentWindow or ResizableWindow are also | ||||
| available to this, so it can be made resizable, have a menu bar, etc. | available to this, so it can be made resizable, have a menu bar, etc. | ||||
| To add items to the box, see the ResizableWindow::setContentComponent() method. | |||||
| Don't add components directly to this class - always put them in a content component! | |||||
| To add items to the box, see the ResizableWindow::setContentOwned() or | |||||
| ResizableWindow::setContentNonOwned() methods. Don't add components directly to this | |||||
| class - always put them in a content component! | |||||
| You'll need to override the DocumentWindow::closeButtonPressed() method to handle | You'll need to override the DocumentWindow::closeButtonPressed() method to handle | ||||
| the user clicking the close button - for more info, see the DocumentWindow | the user clicking the close button - for more info, see the DocumentWindow | ||||
| @@ -70,9 +71,7 @@ public: | |||||
| bool addToDesktop = true); | bool addToDesktop = true); | ||||
| /** Destructor. | /** Destructor. | ||||
| If a content component has been set with setContentComponent(), it | |||||
| will be deleted. | |||||
| If a content component has been set with setContentOwned(), it will be deleted. | |||||
| */ | */ | ||||
| ~DialogWindow(); | ~DialogWindow(); | ||||
| @@ -95,9 +95,7 @@ public: | |||||
| bool addToDesktop = true); | bool addToDesktop = true); | ||||
| /** Destructor. | /** Destructor. | ||||
| If a content component has been set with setContentComponent(), it | |||||
| will be deleted. | |||||
| If a content component has been set with setContentOwned(), it will be deleted. | |||||
| */ | */ | ||||
| ~DocumentWindow(); | ~DocumentWindow(); | ||||
| @@ -592,7 +592,7 @@ void ResizableWindow::addChildComponent (Component* const child, int zOrder) | |||||
| If you really know what you're doing and want to avoid this assertion, just call | If you really know what you're doing and want to avoid this assertion, just call | ||||
| Component::addChildComponent directly. | Component::addChildComponent directly. | ||||
| */ | |||||
| */ | |||||
| jassertfalse; | jassertfalse; | ||||
| Component::addChildComponent (child, zOrder); | Component::addChildComponent (child, zOrder); | ||||
| @@ -609,7 +609,7 @@ void ResizableWindow::addAndMakeVisible (Component* const child, int zOrder) | |||||
| If you really know what you're doing and want to avoid this assertion, just call | If you really know what you're doing and want to avoid this assertion, just call | ||||
| Component::addAndMakeVisible directly. | Component::addAndMakeVisible directly. | ||||
| */ | |||||
| */ | |||||
| jassertfalse; | jassertfalse; | ||||
| Component::addAndMakeVisible (child, zOrder); | Component::addAndMakeVisible (child, zOrder); | ||||
| @@ -36,8 +36,8 @@ | |||||
| /** | /** | ||||
| A base class for top-level windows that can be dragged around and resized. | A base class for top-level windows that can be dragged around and resized. | ||||
| To add content to the window, use its setContentComponent() method to | |||||
| give it a component that will remain positioned inside it (leaving a gap around | |||||
| To add content to the window, use its setContentOwned() or setContentNonOwned() methods | |||||
| to give it a component that will remain positioned inside it (leaving a gap around | |||||
| the edges for a border). | the edges for a border). | ||||
| It's not advisable to add child components directly to a ResizableWindow: put them | It's not advisable to add child components directly to a ResizableWindow: put them | ||||
| @@ -80,9 +80,7 @@ public: | |||||
| bool addToDesktop); | bool addToDesktop); | ||||
| /** Destructor. | /** Destructor. | ||||
| If a content component has been set with setContentComponent(), it | |||||
| will be deleted. | |||||
| If a content component has been set with setContentOwned(), it will be deleted. | |||||
| */ | */ | ||||
| ~ResizableWindow(); | ~ResizableWindow(); | ||||
| @@ -230,10 +228,10 @@ public: | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Returns the current content component. | /** Returns the current content component. | ||||
| This will be the component set by setContentComponent(), or 0 if none | |||||
| This will be the component set by setContentOwned() or setContentNonOwned, or 0 if none | |||||
| has yet been specified. | has yet been specified. | ||||
| @see setContentComponent | |||||
| @see setContentOwned, setContentNonOwned | |||||
| */ | */ | ||||
| Component* getContentComponent() const throw() { return contentComponent; } | Component* getContentComponent() const throw() { return contentComponent; } | ||||
| @@ -344,20 +342,19 @@ protected: | |||||
| #if JUCE_DEBUG | #if JUCE_DEBUG | ||||
| /** Overridden to warn people about adding components directly to this component | /** Overridden to warn people about adding components directly to this component | ||||
| instead of using setContentComponent(). | |||||
| instead of using setContentOwned(). | |||||
| If you know what you're doing and are sure you really want to add a component, specify | If you know what you're doing and are sure you really want to add a component, specify | ||||
| a base-class method call to Component::addAndMakeVisible(), to side-step this warning. | a base-class method call to Component::addAndMakeVisible(), to side-step this warning. | ||||
| */ | */ | ||||
| void addChildComponent (Component* child, int zOrder = -1); | void addChildComponent (Component* child, int zOrder = -1); | ||||
| /** Overridden to warn people about adding components directly to this component | /** Overridden to warn people about adding components directly to this component | ||||
| instead of using setContentComponent(). | |||||
| instead of using setContentOwned(). | |||||
| If you know what you're doing and are sure you really want to add a component, specify | If you know what you're doing and are sure you really want to add a component, specify | ||||
| a base-class method call to Component::addAndMakeVisible(), to side-step this warning. | a base-class method call to Component::addAndMakeVisible(), to side-step this warning. | ||||
| */ | */ | ||||
| void addAndMakeVisible (Component* child, int zOrder = -1); | void addAndMakeVisible (Component* child, int zOrder = -1); | ||||
| #endif | #endif | ||||
| ScopedPointer <ResizableCornerComponent> resizableCorner; | ScopedPointer <ResizableCornerComponent> resizableCorner; | ||||